intficpy.thing_base module

class intficpy.thing_base.Thing(game, name)

Bases: intficpy.physical_entity.PhysicalEntity

Thing is the overarching class for all items that exist in the game

addComposite(item)
addSynonym(word)

Adds a synonym (noun) that can be used to refer to a Thing Takes argument word, a string, which should be a single noun

capNameArticle(definite=False)
containsListUpdate()
copyThing()

Copy a Thing, keeping the index of the original. Safe to use for dynamic item duplication.

copyThingUniqueIx()

Copy a Thing, creating a new index. NOT safe to use for dynamic item duplication. The copy object is by default treated as not distinct from the original in Player knowledge (me.knows_about dictionary). To override this behaviour, manually set the copy’s known_ix to its own ix property.

describeChildren(description)
describeThing(description)
getArticle(definite=False)

Gets the correct article for a Thing Takes argument definite (defaults to False), which specifies whether the article is definite Returns a string

lowNameArticle(definite=False)
makeKnown(me)
makeUnique()

Make a Thing unique (use definite article) Creators should use a Thing’s makeUnique method rather than setting its definite property directly

moveTo(location)

Move an item to a new location

removeSynonym(word)

Adds a synonym (noun) that can be used to refer to a Thing Takes argument word, a string, which should be a single noun

setAdjectives(adj_list)

Sets adjectives for a Thing Takes arguments adj_list, a list of one word strings (adjectives), and update_desc, a Boolean defaulting to True Game creators should set update_desc to False if using a custom desc or xdesc for a Thing

setFromPrototype(item)
xdescribeThing(description)
adjectives = None
can_contain_lying_player = False
can_contain_sitting_player = False
can_contain_standing_player = False
cannotTakeMsg = 'You cannot take that.'
cannot_interact_msg = None
child_Containers = None
child_Surfaces = None
child_Things = None
child_UnderSpaces = None
children = None
children_desc = None
commodity = True
property component_desc

How the item is described when it is a component of another item

property composite_desc

Describe the composite parts (children) of the item

connection = None
property contains_desc

Describe the contents of an item

contains_in = False
contains_on = False
contains_preposition = 'on'
contains_preposition_inverse = 'off'
contains_under = False
property default_desc

The base item description, if a description has not been specified.

property default_xdesc

The base item examine description, if an x_description has not been specified.

property desc

The item description that will be used in room descriptions.

desc_reveal = True
description = None
direction = None
far_away = False
full_name = None
give = False
has_lid = False
has_proper_name = False
ignore_if_ambiguous = False
invItem = True
is_composite = False
property is_current_player
is_definite = False
is_numberless = False
is_open = False
is_plural = False
location = None
lock_obj = None
name = None
parent_obj = None
property plural
size = 50
special_plural = None
property state_desc

Describe an item’s state, with aspects such as open/closed or on/off

state_descriptors = None
synonyms = None
twin = None
property verb_to_be
property verbose_name

The name that will be printed for descriptions.

wearable = False
x_description = None
property xdesc

The item description that will be used for examine.

xdesc_reveal = True