ThingStateclass | thing.t[471], en_us.t[175] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
The 'listName', 'inventoryName', and 'wornName' give the names of state as displayed in room/contents listings, inventory listings, and listings of items being worn by an actor. This state name is displayed along with the item name (usually parenthetically after the item name, but the exact nature of the display is controlled by the language-specific part of the library).
The 'listingOrder' is an integer giving the listing order of this state relative to other states of the same kind of object. When we show a list of equivalent items in different states, we'll order the state names in ascending order of listingOrder.
Modified in en_us.t[175]:
Language-specific modifications for ThingState.
class
ThingState : object
(none)
ThingState
object
lightSourceStateOff
lightSourceStateOn
matchStateLit
matchStateUnlit
unwornState
wornState
listingOrder
listName_
stateTokens
listingOrder | thing.t[504] |
listName_ | en_us.t[267] |
stateTokens | en_us.t[188] |
If a noun phrase contains a word from this list, it means that the noun phrase CAN refer to an object in this state, and that the noun phrase CANNOT refer to an object in any other state that is possible for objects that can assume this state.
findStateToken (toks) | en_us.t[235] |
'toks' is the *adjusted* token list used in matchName().
inventoryName (lst) | thing.t[494] |
listName (lst) | thing.t[488], en_us.t[258] |
'lst' is a list of the objects being listed in this state. If we're only listing a single object, this will be a list with one element giving the object being listed. If we're listing a counted set of equivalent items all in this same state, this will be the list of items. Everything in 'lst' will be equivalent (in the isEquivalent sense).
Modified in en_us.t[258]:
get our name
matchName (obj, origTokens, adjustedTokens, states) | thing.t[520], en_us.t[196] |
Implementation of this is always language-specific. In most cases, this should do something along the lines of checking for the presence (in the token list) of words that only apply to other states, rejecting the match if any such words are found. For example, the ThingState object representing the unlit state of a light source might check for the presence of 'lit' as an adjective, and reject the object if it's found.
Modified in en_us.t[196]:
Match the name of an object in this state. We'll check the token list for any words that apply only to *other* states the object can assume; if we find any, we'll reject the match, since the phrase must be referring to an object in a different state.
wornName (lst) | thing.t[501] |