Thingclass | thing.t[1075], en_us.t[684] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Modified in en_us.t[684]:
Language-specific modifications for Thing. This class contains the methods and properties of Thing that need to be replaced when the library is translated to another language.
The properties and methods defined here should generally never be used by language-independent library code, because everything defined here is specific to English. Translators are thus free to change the entire scheme defined here. For example, the notions of number and gender are confined to the English part of the library; other language implementations can completely replace these attributes, so they're not constrained to emulate their own number and gender systems with the English system.
class
Thing : VocabObject
Thing
VocabObject
object
Thing
Actor
UntakeableActor
Person
BasicLocation
NestedRoom
BasicChair
BasicBed
BasicPlatform
Booth
Platform
NominalPlatform
Bed
Chair
HighNestedRoom
Vehicle
Room
DarkRoom
FloorlessRoom
OutdoorRoom
ShipboardRoom
BulkLimiter
BasicContainer
Container
Booth
Dispenser
Matchbook
OpenableContainer
KeyedContainer
LockableContainer
RestrictedContainer
SingleContainer
StretchyContainer
SpaceOverlay
RearContainer
RearSurface
RestrictedRearSurface
RestrictedRearContainer
Underside
RestrictedUnderside
Surface
Bed
Chair
Platform
NominalPlatform
RestrictedSurface
Button
CollectiveGroup
ItemizingCollectiveGroup
ComplexContainer
Consultable
Dispensable
FillMedium
Food
Hidden
Intangible
DistanceConnector
SensoryEmanation
Noise
SimpleNoise
Odor
SimpleOdor
Vaporous
Key
Keyring
Lever
SpringLever
LightSource
Flashlight
FueledLightSource
Candle
Matchstick
NonPortable
Fixture
Component
ComplexComponent
ContainerDoor
CustomFixture
Decoration
Unthing
Distant
Enterable
EntryPortal
Exitable
ExitPortal
NestedRoomFloor
NominalPlatform
Passage
Stairway
StairwayDown
StairwayUp
ThroughPassage
BasicDoor
Door
AutoClosingDoor
SecretDoor
HiddenDoor
ExitOnlyPassage
PathPassage
Room
DarkRoom
FloorlessRoom
OutdoorRoom
ShipboardRoom
RoomPart
DefaultWall
Floor
SecretFixture
Immovable
CustomImmovable
Heavy
TravelPushable
UntakeableActor
Person
OnOffControl
Switch
Flashlight
Readable
Settable
Dial
LabeledDial
NumberedDial
TravelConnector
AskConnector
DefaultAskConnector
Passage
Stairway
StairwayDown
StairwayUp
ThroughPassage
BasicDoor
Door
AutoClosingDoor
SecretDoor
HiddenDoor
ExitOnlyPassage
PathPassage
RoomConnector
OneWayRoomConnector
RoomAutoConnector
Room
DarkRoom
FloorlessRoom
OutdoorRoom
ShipboardRoom
TravelMessage
DeadEndConnector
NoTravelMessage
FakeConnector
Wearable
actorInAName
actorInName
actorInPrep
actorIntoName
actorOutOfName
actorOutOfPrep
aDisambigName
allStates
aName
brightness
bulk
canBeHeard
canBeSeen
canBeSmelled
canBeTouched
canMatchHer
canMatchHim
canMatchIt
canMatchThem
circularlyInMessage
collectiveGroup
collectiveGroups
contents
contentsListed
contentsListedInExamine
contentsListedSeparately
contentsLister
descContentsLister
described
disambigEquivName
disambigName
distantDesc
distantInitSpecialDesc
distantSpecialDesc
distinguishers
dummyName
effectiveFollowLocation
equivalenceKey
equivalentGrouper
equivalentGrouperClass
equivalentGrouperTable
esEndingPat
explicitVisualSenseInfo
getState
globalParamName
holdingIndex
iesEndingPat
initDesc
initNominalRoomPartLocation
initSpecialDesc
inlineContentsLister
isEquivalent
isHer
isHim
isInInitState
isKnown
isLikelyCommandTarget
isListedAboardVehicle
isMassNoun
isPlural
isProperName
isQualifiedName
isThingConstructed
isTopLevel
listName
listWith
location
lookInLister
moved
name
nameDoes
nameSays
nameSees
notTravelReadyMsg
objectNotifyList
objInPrep
obscuredInitSpecialDesc
obscuredSpecialDesc
owner
patElevenEighteen
patIsAlpha
patLeadingTagOrQuote
patOfPhrase
patOneLetterAnWord
patOneLetterWord
patSingleApostropheS
patTagOrQuoteChar
patUpperOrDigit
patVowelY
pluralDisambigName
pluralName
pronounSelector
roomDarkName
roomLocation
roomName
seen
sightPresence
sightSize
smellPresence
smellSize
soundPresence
soundSize
specialContentsLister
specialDesc
specialDescBeforeContents
specialDescListWith
specialDescOrder
specialNominalRoomPartLocation
suppressAutoSeen
takeFromNotInMessage
theDisambigName
theName
theNamePossNoun
tmpAmbient_
tmpAmbientFill_
tmpAmbientWithin_
tmpFillMedium_
tmpObstructor_
tmpObstructorWithin_
tmpPathIsIn_
tmpTrans_
tmpTransWithin_
touchPresence
touchSize
verbCan
verbCannot
verbCant
verbEndingSD
verbEndingSEd
verbEndingSMessageBuilder_
verbMust
verbToCome
verbToDo
verbToGo
verbToLeave
verbToSay
verbToSee
verbWill
verbWont
weight
Inherited from VocabObject
:
canResolvePossessive
disambigPromptOrder
pluralOrder
vocabLikelihood
vocabWords
weakTokens
acceptCommand
addAllContents
addDirectConnections
addObjectNotifyItem
addToContents
addToSenseInfoTable
adjustLookAroundTable
adjustThrowDestination
afterAction
afterTravel
allContents
aNameFrom
aNameObj
aNameOwnerLoc
announceDefaultObject
appendHeldContents
atmosphereList
baseMoveInto
basicExamine
basicExamineFeel
basicExamineListen
basicExamineSmell
basicExamineTaste
beforeAction
beforeTravel
buildContainmentPaths
cacheAmbientInfo
cacheSenseInfo
cacheSensePath
canBeHeardBy
canBeSeenBy
canBeSensed
canBeSmelledBy
canBeTouchedBy
canDetailsBeSensed
canHear
canMatchPronounType
canMoveViaPath
cannotGoShowExits
cannotReachObject
cannotSeeSmellSource
cannotSeeSoundSource
canOwn
canSee
canSmell
canThrowViaPath
canTouch
canTouchViaPath
checkActorOutOfNested
checkBulkChange
checkBulkChangeWithin
checkMoveViaPath
checkStagingLocation
checkThrowViaPath
checkTouchViaPath
checkTravelerDirectlyInRoom
childInName
childInNameGen
childInNameWithOwner
childInRemoteName
clearSenseInfo
cloneForMultiInstanceContents
cloneMultiInstanceContents
conjugateRegularVerb
connectionTable
construct
contentsInFixedIn
countDisambigName
countListName
countName
countNameFrom
countNameOwnerLoc
darkRoomContentsLister
defaultDistantDesc
defaultObscuredDesc
desc
directionForConnector
distantSmellDesc
distantSoundDesc
dobjFor(AskAbout)
dobjFor(AskFor)
dobjFor(AskVague)
dobjFor(AttachTo)
dobjFor(Attack)
dobjFor(AttackWith)
dobjFor(Board)
dobjFor(Break)
dobjFor(Burn)
dobjFor(BurnWith)
dobjFor(Clean)
dobjFor(CleanWith)
dobjFor(Climb)
dobjFor(ClimbDown)
dobjFor(ClimbUp)
dobjFor(Close)
dobjFor(Consult)
dobjFor(ConsultAbout)
dobjFor(CutWith)
dobjFor(Detach)
dobjFor(DetachFrom)
dobjFor(Dig)
dobjFor(DigWith)
dobjFor(Doff)
dobjFor(Drink)
dobjFor(Drop)
dobjFor(Eat)
dobjFor(Enter)
dobjFor(EnterOn)
dobjFor(Examine)
dobjFor(Extinguish)
dobjFor(Fasten)
dobjFor(FastenTo)
dobjFor(Feel)
dobjFor(Flip)
dobjFor(Follow)
dobjFor(GetOffOf)
dobjFor(GetOutOf)
dobjFor(GiveTo)
dobjFor(GoThrough)
dobjFor(JumpOff)
dobjFor(JumpOver)
dobjFor(Kiss)
dobjFor(LieOn)
dobjFor(Light)
dobjFor(ListenTo)
dobjFor(Lock)
dobjFor(LockWith)
dobjFor(LookBehind)
dobjFor(LookIn)
dobjFor(LookThrough)
dobjFor(LookUnder)
dobjFor(Move)
dobjFor(MoveTo)
dobjFor(MoveWith)
dobjFor(Open)
dobjFor(PlugIn)
dobjFor(PlugInto)
dobjFor(Pour)
dobjFor(PourInto)
dobjFor(PourOnto)
dobjFor(Pull)
dobjFor(Push)
dobjFor(PushTravel)
dobjFor(PutBehind)
dobjFor(PutIn)
dobjFor(PutOn)
dobjFor(PutUnder)
dobjFor(Read)
dobjFor(Remove)
dobjFor(Screw)
dobjFor(ScrewWith)
dobjFor(Search)
dobjFor(Set)
dobjFor(SetTo)
dobjFor(ShowTo)
dobjFor(SitOn)
dobjFor(Smell)
dobjFor(StandOn)
dobjFor(Strike)
dobjFor(Switch)
dobjFor(Take)
dobjFor(TakeFrom)
dobjFor(TalkTo)
dobjFor(Taste)
dobjFor(TellAbout)
dobjFor(TellVague)
dobjFor(Throw)
dobjFor(ThrowAt)
dobjFor(ThrowDir)
dobjFor(ThrowTo)
dobjFor(Turn)
dobjFor(TurnOff)
dobjFor(TurnOn)
dobjFor(TurnTo)
dobjFor(TurnWith)
dobjFor(TypeLiteralOn)
dobjFor(TypeOn)
dobjFor(Unfasten)
dobjFor(UnfastenFrom)
dobjFor(Unlock)
dobjFor(UnlockWith)
dobjFor(Unplug)
dobjFor(UnplugFrom)
dobjFor(Unscrew)
dobjFor(UnscrewWith)
dobjFor(Wear)
examineListContents
examineListContentsWith
examineSpecialContents
examineStatus
failCheck
feelDesc
fillMedium
findOpaqueObstructor
findTouchObstructor
forEachConnectedContainer
forEachContainer
fromPOV
getAllForTakeFrom
getAllPathsTo
getAnnouncementDistinguisher
getBagAffinities
getBagsOfHolding
getBestDistinguisher
getBulk
getBulkWithin
getCarryingActor
getCommonContainer
getCommonDirectContainer
getConnectedContainers
getConnectorTo
getContentsForExamine
getDestName
getDropDestination
getEncumberingBulk
getEncumberingWeight
getExtraScopeItems
getHitFallDestination
getIdentityObject
getInScopeDistinguisher
getListedContents
getLocPushTraveler
getLocTraveler
getMovePathTo
getNoise
getNominalDropDestination
getNominalOwner
getObjectNotifyList
getOdor
getOutermostRoom
getOutermostVisibleRoom
getRoomNotifyList
getRoomPartLocation
getStateWithInfo
getStatuslineExitsHeight
getThrowPathTo
getTouchPathTo
getTravelConnector
getVisualSenseInfo
getWeight
hasCollectiveGroup
hideFromAll
hideFromDefault
initializeEquivalent
initializeLocation
initializeThing
inRoomName
iobjFor(AttachTo)
iobjFor(AttackWith)
iobjFor(BurnWith)
iobjFor(CleanWith)
iobjFor(CutWith)
iobjFor(DetachFrom)
iobjFor(DigWith)
iobjFor(FastenTo)
iobjFor(GiveTo)
iobjFor(LockWith)
iobjFor(MoveWith)
iobjFor(PlugInto)
iobjFor(PourInto)
iobjFor(PourOnto)
iobjFor(PutBehind)
iobjFor(PutIn)
iobjFor(PutOn)
iobjFor(PutUnder)
iobjFor(ScrewWith)
iobjFor(ShowTo)
iobjFor(TakeFrom)
iobjFor(ThrowAt)
iobjFor(ThrowTo)
iobjFor(TurnWith)
iobjFor(UnfastenFrom)
iobjFor(UnlockWith)
iobjFor(UnplugFrom)
iobjFor(UnscrewWith)
isActorTravelReady
isComponentOf
isDirectlyIn
isHeldBy
isIn
isInFixedIn
isListed
isListedInContents
isListedInInventory
isListedInRoomPart
isLookAroundCeiling
isNominallyIn
isNominallyInRoomPart
isOccludedBy
isOrIsIn
isOwnedBy
isShipboard
isVocabEquivalent
itIs
itNom
itObj
itPossAdj
itPossNoun
itVerb
listCardinality
localDirectionLinkForConnector
lookAround
lookAroundPov
lookAroundWithin
lookAroundWithinContents
lookAroundWithinDesc
lookAroundWithinName
lookAroundWithinSense
lookAroundWithinShowExits
lookInDesc
mainExamine
mainMoveInto
mapPushTravelHandlers
mapPushTravelHandlers
mapPushTravelHandlers
mapPushTravelHandlers
mapPushTravelHandlers
meetsObjHeld
mergeSenseInfo
mergeSenseInfoTable
moveInto
moveIntoForTravel
moveIntoNotifyPath
mustMoveObjInto
nameIs
nameIsnt
nameVerb
normalizePath
notePromptByOwnerLoc
notePromptByPossAdj
noteSeenBy
notifyInsert
notifyMoveInto
notifyMoveViaPath
notifyRemove
obscuredDesc
obscuredSmellDesc
obscuredSoundDesc
pluralNameFrom
processThrow
propHidesProp
propWithPresent
putInName
receiveDrop
remoteDesc
remoteInitSpecialDesc
remoteRoomContentsLister
remoteSpecialDesc
removeFromContents
removeObjectNotifyItem
restoreLocation
roomActorThereDesc
roomContentsLister
roomDaemon
roomDarkDesc
roomDesc
roomFirstDesc
roomRemoteDesc
roomTravelPreCond
saveLocation
selectPathTo
sendNotifyInsert
sendNotifyRemove
senseAmbientMax
senseInfoTable
senseObj
sensePathFromWithin
sensePathFromWithout
sensePathToContents
sensePathToLoc
sensePresenceList
setAllSeenBy
setContentsSeenBy
setGlobalParamName
setVisualSenseInfo
shineFromWithin
shineFromWithout
shineOnContents
shineOnLoc
showDistantSpecialDesc
showDistantSpecialDescInContents
showInventoryContents
showInventoryItem
showInventoryItemCounted
showListItem
showListItemCounted
showListItemCountedGen
showListItemGen
showObjectContents
showObscuredSpecialDesc
showObscuredSpecialDescInContents
showRemoteSpecialDesc
showRemoteSpecialDescInContents
showSpecialDesc
showSpecialDescInContents
showSpecialDescInContentsWithInfo
showSpecialDescWithInfo
showStatuslineExits
showWornItem
showWornItemCounted
smellDesc
smellHereDesc
soundDesc
soundHereDesc
specialDescList
specialPathFrom
statusName
stopThrowViaPath
superHidesSuper
tasteDesc
thatNom
thatObj
theNameFrom
theNameObj
theNameOwnerLoc
theNameWithOwner
throwTargetCatch
throwTargetHitWith
throwViaPath
transmitAmbient
transSensingIn
transSensingOut
traversePath
tryHolding
tryImplicitRemoveObstructor
tryMovingObjInto
useInitDesc
useInitSpecialDesc
useSpecialDesc
useSpecialDescInContents
useSpecialDescInRoom
useSpecialDescInRoomPart
verbEndingEs
verbEndingIes
verbEndingS
verbToHave
verbWas
verifyFollowable
verifyInsert
verifyMoveTo
verifyRemove
whatIf
whatIfHeldBy
withVisualSenseInfo
Inherited from VocabObject
:
addToDictionary
expandPronounList
filterResolveList
getFacets
inheritVocab
initializeVocab
initializeVocabWith
matchName
matchNameCommon
matchNameDisambig
throwNoMatchForLocation
throwNoMatchForPossessive
throwNothingInLocation
actorInAName | en_us.t[1269] |
actorInName | en_us.t[1268] |
actorInPrep | en_us.t[1250] |
actorIntoName | en_us.t[1271] |
actorOutOfName | en_us.t[1270] |
actorOutOfPrep | en_us.t[1253] |
aDisambigName | en_us.t[903] |
allStates | thing.t[2153] |
aName | en_us.t[1472] |
In rare cases, the automatic determination might get it wrong, since some English spellings defy all of the standard orthographic rules and must simply be handled as special cases; for example, the algorithmic determination doesn't know about silent-h words like "hour". When the automatic determination gets it wrong, simply override this routine to specify the correct article explicitly.
brightness | thing.t[4396] |
0: The object is giving off no light at all.
1: The object is self-illuminating, but doesn't give off enough light to illuminate any other objects. This is suitable for something like an LED digital clock.
2: The object gives off dim light. This level is bright enough to illuminate nearby objects, but not enough to go through obscuring media, and not enough for certain activities requiring strong lighting, such as reading.
3: The object gives off medium light. This level is bright enough to illuminate nearby objects, and is enough for most activities, including reading and the like. Traveling through an obscuring medium reduces this level to dim (2).
4: The object gives off strong light. This level is bright enough to illuminate nearby objects, and travel through an obscuring medium reduces it to medium light (3).
Note that the special value -1 is reserved as an invalid level, used to flag certain events (such as the need to recalculate the ambient light level from a new point of view).
Most objects do not give off light at all.
bulk | thing.t[3737] |
canBeHeard | thing.t[6681] |
canBeSeen | thing.t[6680] |
canBeSmelled | thing.t[6682] |
canBeTouched | thing.t[6683] |
canMatchHer | en_us.t[737] |
canMatchHim | en_us.t[736] |
canMatchIt | en_us.t[738] |
canMatchThem | en_us.t[739] |
circularlyInMessage | thing.t[7841] |
collectiveGroup | thing.t[2513] |
collectiveGroups | thing.t[2506] |
The value is a list because this object can be associated with more than one collective group. For example, a diamond could be in a "treasure" group as well as a "jewelry" group.
The associated collective objects are normally of class CollectiveGroup. By default, if our 'collectiveGroup' property is not nil, our list consists of that one item; otherwise we just use an empty list.
contents | thing.t[4802] |
contentsListed | thing.t[1875] |
Note that this doesn't affect listing my contents when I'm *directly* examined - use contentsListedInExamine to control that.
By default, we'll list our contents in these situations if (1) we have some kind of presence in the description of whatever it is the player is looking at, either by being listed in the ordinary way (that is, isListed is true) or in a custom way (via a specialDesc), and (2) contentsListedInExamine is true. The reasoning behind this default is that if the object itself shows up in the description, then we usually want its contents to be mentioned as well, but if the object itself isn't mentioned, then its contents probably shouldn't be, either. And in any case, if the contents aren't listed even when we *directly* examine the object, then we almost certainly don't want its contents mentioned when we only indirectly mention the object in the course of describing something enclosing it.
contentsListedInExamine | thing.t[1883] |
contentsListedSeparately | thing.t[1907] |
You are carrying a box. The box contains a key and a book.
By default, this is nil, which means that we list our contents parenthetically after our name:
You are carrying a box (which contains a key and a book).
Using a separate listing is sometimes desirable for an object that will routinely contain listable objects that in turn have listable contents of their own, because it can help break up a long listing that would otherwise use too many nested parentheticals.
Note that this only applies to "wide" listings; "tall" listings will show contents in the indented tree format regardless of this setting.
contentsLister | thing.t[4444] |
descContentsLister | thing.t[4450] |
described | thing.t[1564] |
disambigEquivName | en_us.t[947] |
This is used in disambiguation prompts in place of the actual text typed by the user. For example, suppose the user types ">take coin", then we ask for help disambiguating, and the player types ">gold". This narrows things down to, say, three gold coins, but they're in different locations so we need to ask for further disambiguation. Normally, we ask "which gold do you mean", because the player typed "gold" in the input. Once we're down to equivalents, we don't have to rely on the input text any more, which is good because the input text could be fragmentary (as in our present example). Since we have only equivalents, we can use the actual name of the objects (they're all the same, after all). This property gives the name we use.
For English, this is simply the object's ordinary disambiguation name. This property is separate from 'name' and 'disambigName' for the sake of languages that need to use an inflected form in this context.
disambigName | en_us.t[842] |
In rare cases, it might be desirable to override this. In particular, if a game has two objects that are NOT defined as basic equivalents of one another (which means that the parser will always ask for disambiguation when the two are ambiguous with one another), but the two nonetheless have identical 'name' properties, this property should be overridden for one or both objects to give them different names. This will ensure that we avoid asking questions of the form "which do you mean, the coin, or the coin?". In most cases, non-equivalent objects will have distinct 'name' properties to begin with, so this is not usually an issue.
When overriding this method, take care to override theDisambigName, aDisambigName, countDisambigName, and/or pluralDisambigName as needed. Those routines must be overridden only when the default algorithms for determining articles and plurals fail to work properly for the disambigName (for example, the indefinite article algorithm fails with silent-h words like "hour", so if disambigName is "hour", aDisambigName must be overridden). In most cases, the automatic algorithms will produce acceptable results, so the default implementations of these other routines can be used without customization.
// distantDesc Interface description only | thing.t[2207] |
If this property is left undefined for an object, then we'll describe this object when it's distant in one of two ways. If the object has its 'sightSize' property set to 'large', we'll display the ordinary 'desc', because its large visual size makes its details visible at a distance. If the 'sightSize' is anything else, we'll instead display the default library message indicating that the object is too far away to see any details.
To display a specific description when the object is distant, set this to a double-quoted string, or to a method that displays a message.
distantInitSpecialDesc | thing.t[1460] |
distantSpecialDesc | thing.t[1195] |
Note that if you override these alternative special descriptions, you MUST also provide a base specialDesc. The library figures out whether or not to show any sort of specialDesc first, based on the presence of a non-nil specialDesc; only then does the library figure out which particular variation to use.
Note that remoteSpecialDesc takes precedence over these methods. That is, when 'self' is in a separate top-level room from the point-of-view actor, we'll use remoteSpecialDesc to generate our description, even if the sense path to 'self' is distant or obscured.
distinguishers | thing.t[2343] |
Distinguishers are listed in order of priority. The disambiguation process looks for distinguishers capable of telling objects apart, starting with the first in the list. The BasicDistinguisher is generally first in every object's list, because any two objects can be told apart if they come from different classes.
By default, each object has the "basic" distinguisher, which tells objects apart on the basis of the "isEquivalent" property and their superclasses; the ownership distinguisher, which tells objects apart based on ownership; and the location distinguisher, which identifies objects by their immediate containers.
dummyName | en_us.t[1920] |
effectiveFollowLocation | thing.t[3776] |
For most objects, we simply defer to the location.
equivalenceKey | en_us.t[855] |
Since the main point of equivalence is to allow creation of groups of like-named objects that are interchangeable in listings and in command input, we use the basic disambiguation name as the equivalence key.
equivalentGrouper | thing.t[4796] |
equivalentGrouperClass | thing.t[4786] |
equivalentGrouperTable | thing.t[4780] |
esEndingPat | en_us.t[1145] |
explicitVisualSenseInfo | thing.t[6577] |
getState | thing.t[2145] |
globalParamName | thing.t[1132] |
Global parameter names can be especially useful for objects whose names change in the course of the game, such as actors who are known by one name until introduced, after which they're known by another name. It's a little nicer to write "{He/the bob}" than "<<bob.theName>>". We can do this with a global parameter name, because it allows us to use {bob} as a message parameter, even when the actor isn't involved directly in any command.
Note that these parameter names are global, so no two objects are allowed to have the same name. These names are also subordinate to the parameter names in the current Action, so names that the actions define, such as 'dobj' and 'actor', should usually be avoided.
holdingIndex | thing.t[3729] |
iesEndingPat | en_us.t[1144] |
initDesc | thing.t[1472] |
initNominalRoomPartLocation | thing.t[1832] |
initSpecialDesc | thing.t[1444] |
If this is non-nil, and the object is portable, this will be used (as long as the object is in its initial state) instead of showing the object in an ordinary room-contents listing. This can be used to give the object a special mention in its initial location in the game, rather than letting the ordinary room-contents lister lump it in with all of the other portable object lying around.
inlineContentsLister | thing.t[4463] |
isEquivalent | thing.t[2324] |
By default, this property is nil, since we want most objects to be treated as unique.
isHer | en_us.t[714] |
isHim | en_us.t[713] |
Note that these flags aren't mutually exclusive, so it's legal for the object to have both masculine and feminine usage. This can be useful when creating collective objects that represent more than one individual, for example.
isInInitState | thing.t[1486] |
You can override this to achieve other effects. For example, if you want to use the initial description only the first time the object is examined, and then revert to the ordinary description, you could override this to return (!described).
isKnown | thing.t[1631] |
Like the 'seen' property, this is merely the DEFAULT 'known' property that we use for actors. Each actor can individually use a separate property to track its own knowledge if it prefers; it can do this simply by overriding its isKnownProp property.
isLikelyCommandTarget | thing.t[5704] |
isListedAboardVehicle | thing.t[1705] |
isMassNoun | en_us.t[702] |
isPlural | en_us.t[691] |
isProperName | en_us.t[792] |
isQualifiedName | en_us.t[802] |
isThingConstructed | thing.t[1109] |
isTopLevel | thing.t[4976] |
If an object has no location and is not itself a top-level location, then the object is not part of the game world. It's sometimes useful to remove objects from the game world, such as when they're destroyed within the context of the game.
listName | en_us.t[954] |
listWith | thing.t[2543] |
An object can be grouped in more than one way. When multiple groups are specified here, the order is significant:
- To the extent two groups entirely overlap, which is to say that one of the pair entirely contains the other (for example, if every coin is a kind of money, then the "money" listing group would contain every object in the "coin" group, plus other objects as well: the coin group is a subset of the money group), the groups must be listed from most general to most specific (for our money/coin example, then, money would come before coin in the group list).
- When two groups do not overlap, then the earlier one in our list is given higher priority.
By default, we return an empty list.
location | thing.t[4600] |
If the location is nil, the object does not exist anywhere in the simulation's physical model. A nil location can be used to remove an object from the game world, temporarily or permanently.
In general, the 'location' property should be declared for each statically defined object (explicitly or implicitly via the '+' syntax). 'location' is a private property - it should never be evaluated or changed by any subclass or by any other object. Only Thing methods may evaluate or change the 'location' property. So, you can declare a 'location' property when defining an object, but you should essentially never refer to 'location' directly in any other context; instead, use the location and containment methods (isIn, etc) when you want to know an object's containment relationship to another object.
lookInLister | thing.t[4456] |
moved | thing.t[1516] |
name | en_us.t[812] |
nameDoes | en_us.t[1858] |
nameSays | en_us.t[1865] |
nameSees | en_us.t[1863] |
notTravelReadyMsg | thing.t[3432] |
objectNotifyList | thing.t[7716] |
objInPrep | en_us.t[1242] |
obscuredInitSpecialDesc | thing.t[1459] |
Note that in order for one of these alternative initial descriptions to be shown, the regular initSpecialDesc MUST be defined, even if it's never actually used. We make the decision to display these other descriptions based on the existence of a non-nil initSpecialDesc, so always define initSpecialDesc whenever these are defined.
obscuredSpecialDesc | thing.t[1196] |
owner OVERRIDDEN | thing.t[5288] |
However, in some cases, an object is inherently owned by a particular other object (usually an actor), and this is invariant even when the object moves to a new location not within the owner. For such cases, this property can be set to the explicit owner object, which will cause self.isOwnedBy(obj) to return true if and only if obj == self.owner.
patElevenEighteen | en_us.t[1697] |
patIsAlpha | en_us.t[1696] |
patLeadingTagOrQuote | en_us.t[1692] |
patOfPhrase | en_us.t[1822] |
patOneLetterAnWord | en_us.t[1695] |
patOneLetterWord | en_us.t[1694] |
patSingleApostropheS | en_us.t[1819] |
patTagOrQuoteChar | en_us.t[1691] |
patUpperOrDigit | en_us.t[1820] |
patVowelY | en_us.t[1821] |
pluralDisambigName | en_us.t[920] |
pluralName | en_us.t[1710] |
The algorithm won't always get it right, since some English plurals are irregular ("men", "children", "Attorneys General"). When the name doesn't fit the regular spelling patterns for plurals, the object should simply override this routine to return the correct plural name string.
pronounSelector | en_us.t[995] |
- singular neuter = 1
- singular masculine = 2
- singular feminine = 3
- plural = 4
roomDarkName | thing.t[2610] |
roomLocation | thing.t[3624] |
roomName | thing.t[2561] |
By default, we'll use our regular name.
seen | thing.t[1532] |
Note that this is only the DEFAULT 'seen' property, which all Actor objects use by default. The ACTUAL property that a given Actor uses depends on the actor's seenProp, which allows a game to keep track separately of what each actor has seen by using different 'seen' properties for different actors.
sightPresence | thing.t[4434] |
Presence in a given sense is an intrinsic (which does not imply unchanging) property of the object, in that presence is independent of the relationship to any given actor. If an alarm clock is ringing, it has a hearing presence, unconditionally; it doesn't matter if the alarm clock is sealed inside a sound-proof box, because whether or not a given actor has a sense path to the object is a matter for a different computation.
Note that presence doesn't control access: an actor might have access to an object for a sense even if the object has no presence in the sense. Presence indicates whether or not the object is actively emitting sensory data that would make an actor aware of the object without specifically trying to apply the sense to the object.
By default, an object is visible and touchable, but does not emit any sound or odor.
sightSize | thing.t[4404] |
smellPresence | thing.t[4436] |
smellSize | thing.t[4406] |
soundPresence | thing.t[4435] |
soundSize | thing.t[4405] |
specialContentsLister | thing.t[4471] |
specialDesc | thing.t[1175] |
By default, we have no special description. If a special description is desired, define this to a double-quoted string containing the special description, or to a method that displays the special description.
specialDescBeforeContents | thing.t[1256] |
By default, we show our special description (if any) before the room's contents listing, because most special descriptions act like extensions of the room's main description and thus should be grouped directly with the room's descriptive text. Objects with special descriptions that are meant to indicate more ephemeral properties of the location can override this to be listed after the room's portable contents.
One situation where you usually will want to list a special description after contents is when the special description applies to an item that's contained in a portable item. Since the container will be listed with the room contents, as it's portable, we'll usually want the special description of this child item to show up after the contents listing, so that it shows up after its container is mentioned.
Note that the specialDescOrder is secondary to this phase grouping, because we essentially list special items in two separate groups.
specialDescListWith | thing.t[2550] |
specialDescOrder | thing.t[1224] |
specialNominalRoomPartLocation | thing.t[1851] |
This property has a function similar to initNominalRoomPartLocation, but is used to describe the nominal room part container of the object has been moved (and even before it's been moved, if initNominalRoomPartLocation is nil).
It's rare for an object to have a special room part location after it's been moved, because most games simply don't provide commands for things like re-attaching a poster to a wall or re-hanging a fan from the ceiling. When it is possible to move an object to a new special location, though, this property can be used to flag its new special location.
suppressAutoSeen | thing.t[1558] |
Sometimes, an object is not meant to be immediately obvious. For example, a puzzle box might have a hidden button that can't be seen on casual examination. In these cases, you can use suppressAutoSeen to ensure that the object won't be marked as seen merely by virtue of its being visible at the time of a LOOK AROUND or EXAMINE command.
Note that this property does NOT affect the object's actual visibility or other sensory attributes. This property merely controls the automatic setting of the "seen" status of the object.
takeFromNotInMessage | thing.t[8782] |
theDisambigName | en_us.t[896] |
By default, if the disambiguation name is identical to the regular name (i.e, the string returned by self.disambigName is the same as the string returned by self.name), then we simply return self.theName. Since the base name is the same in either case, presumably the definite article names should be the same as well. This way, if the object overrides theName to do something special, then we'll use the same definite-article name for disambiguation prompts.
If the disambigName isn't the same as the regular name, then we'll apply the same algorithm to the base disambigName that we normally do to the regular name to produce the theName. This way, if the disambigName is overridden, we'll use the overridden disambigName to produce the definite-article version, using the standard definite-article algorithm.
Note that there's an aspect of this conditional approach that might not be obvious. It might look as though the test is redundant: if name == disambigName, after all, and the default theName returns theNameFrom(name), then this ought to be identical to returning theNameFrom(disambigName). The subtlety is that theName could be overridden to produce a custom result, in which case returning theNameFrom(disambigName) would return something different, which probably wouldn't be correct: the whole reason theName would be overridden is that the algorithmic determination (theNameFrom) gets it wrong. So, by calling theName directly when disambigName is the same as name, we are assured that we pick up any override in theName.
Note that in rare cases, neither of these default approaches will produce the right result; this will happen if the object uses a custom disambigName, but that name doesn't fit the normal algorithmic pattern for applying a definite article. In these cases, the object should simply override this method to specify the custom name.
theName | en_us.t[1157] |
The name returned must be in the nominative case (which makes no difference unless the name is a pronoun, since in English ordinary nouns don't vary according to how they're used in a sentence).
theNamePossNoun | en_us.t[1216] |
tmpAmbient_ | thing.t[7512] |
tmpAmbientFill_ | thing.t[7520] |
tmpAmbientWithin_ | thing.t[7541] |
tmpFillMedium_ | thing.t[7558] |
tmpObstructor_ | thing.t[7533] |
tmpObstructorWithin_ | thing.t[7543] |
tmpPathIsIn_ | thing.t[7551] |
tmpTrans_ | thing.t[7527] |
tmpTransWithin_ | thing.t[7542] |
touchPresence | thing.t[4437] |
touchSize | thing.t[4407] |
verbCan | en_us.t[1867] |
verbCannot | en_us.t[1868] |
verbCant | en_us.t[1869] |
verbEndingSD | en_us.t[1901] |
verbEndingSEd | en_us.t[1902] |
verbEndingSMessageBuilder_ | en_us.t[1903] |
verbMust | en_us.t[1866] |
verbToCome | en_us.t[1860] |
verbToDo | en_us.t[1857] |
verbToGo | en_us.t[1859] |
verbToLeave | en_us.t[1861] |
verbToSay | en_us.t[1864] |
verbToSee | en_us.t[1862] |
verbWill | en_us.t[1870] |
verbWont | en_us.t[1871] |
weight | thing.t[3736] |
acceptCommand (issuingActor) | thing.t[5692] |
addAllContents (vec) | thing.t[4869] |
addDirectConnections (tab) | thing.t[5758] |
addObjectNotifyItem (obj) | thing.t[7704] |
Items can be added here if they must be notified of actions involving this object regardless of the physical proximity of this item and the notification item.
addToContents (obj) | thing.t[5396] |
Note that this should NOT be overridden to cause side effects - if side effects are desired when inserting a new object into my contents, use notifyInsert(). This routine is not allowed to cause side effects because it is sometimes necessary to bypass side effects when moving an item.
addToSenseInfoTable (sense, tab) | thing.t[6882] |
Our job is to figure out if 'src' can sense us, and add a SenseInfo entry to the LookupTable 'tab' (which is keyed by object, hence our key is simply 'self') if 'src' can indeed sense us.
Note that an object that wants to set up its own special sensory data can do so by overriding this. This routine will only be called on objects connected to 'src' by containment, though, so if an object overrides this in order to implement a special sensory system that's outside of the normal containment model, it must somehow ensure that it gets included in the containment connection table in the first place.
adjustLookAroundTable (tab, pov, actor) | thing.t[2977] |
By default, we simply remove the point-of-view object from the list, to ensure that it's not included among the objects mentioned as being in the room. We don't want to mention the point of view because the POV object because a POV isn't normally in its own field of view.
adjustThrowDestination (thrownObj, path) | thing.t[3839] |
By default, we don't need to make any adjustment, so we simply return 'self' to indicate that this can be used as the actual destination.
afterAction ( ) | thing.t[7648] |
afterTravel (traveler, connector) | thing.t[7673] |
allContents ( ) | thing.t[4836] |
aNameFrom (str) | en_us.t[1509] |
By default, we'll use the article "a" if the name starts with a consonant, or "an" if it starts with a vowel.
If the name starts with a "y", we'll look at the second letter; if it's a consonant, we'll use "an", otherwise "a" (hence "an yttrium block" but "a yellow brick").
If the object is marked as having plural usage, we will use "some" as the article ("some pants" or "some shrubs").
Some objects will want to override the default behavior, because the lexical rules about when to use "a" and "an" are not without exception. For example, silent-"h" words ("honor") are written with "an", and "h" words with a pronounced but weakly stressed initial "h" are sometimes used with "an" ("an historian"). Also, some 'y' words might not follow the generic 'y' rule.
'U' words are especially likely not to follow any lexical rule - any 'u' word that sounds like it starts with 'y' should use 'a' rather than 'an', but there's no good way to figure that out just looking at the spelling (consider "a universal symbol" and "an unimportant word", or "a unanimous decision" and "an unassuming man"). We simply always use 'an' for a word starting with 'u', but this will have to be overridden when the 'u' sounds like 'y'.
aNameObj ( ) | en_us.t[1475] |
aNameOwnerLoc (ownerPriority) | en_us.t[1364] |
If the object has an owner, and either we're giving priority to the owner or our immediate location is the same as the owner, we'll show using a possessive form with the owner ("bob's flashlight"). Otherwise, we'll show the name distinguished by our immediate container ("the flashlight in the backpack").
These are used by the ownership and location distinguishers to list objects according to owners in disambiguation lists. The ownership distinguisher gives priority to naming by ownership, regardless of the containment relationship between owner and self; the location distinguisher gives priority to naming by location, showing the owner only if the owner is the same as the location.
We will presume that objects with proper names are never indistinguishable from other objects with proper names, so we won't worry about cases like "Bob's Bill". This leaves us free to use appropriate articles in all cases.
announceDefaultObject (whichObj, action, resolvedAllObjects) | thing.t[3922] |
appendHeldContents (vec) | thing.t[5160] |
In most cases, we do nothing. Certain types of objects override this because they consider their contents to be held if they're held. For example, a keyring considers all of its keys to be held if the keyring itself is held, because the keys are attached to the keyring rather than contained within it.
atmosphereList ( ) | thing.t[3660] |
By default, if our container is visible to us, we'll use our container's atmospheric messages. This can be overridden to provide our own atmosphere list when the player character is in this object.
baseMoveInto (newContainer) | thing.t[5506] |
basicExamine ( ) | thing.t[8085] |
basicExamineFeel ( ) | thing.t[8397] |
basicExamineListen (explicit) | thing.t[8215] |
If 'explicit' is true, we'll show our soundDesc if we have no associated Noise object; otherwise, we'll show nothing at all unless we have a Noise object.
basicExamineSmell (explicit) | thing.t[8298] |
basicExamineTaste ( ) | thing.t[8385] |
beforeAction ( ) | thing.t[7638] |
beforeTravel (traveler, connector) | thing.t[7665] |
If the traveler is traveling between top-level locations, 'connector' is the TravelConnector object being traversed. If an actor is merely moving between nested locations, 'connector' will be nil.
buildContainmentPaths (vec, pathHere, obj) | thing.t[6334] |
cacheAmbientInfo (objs, sense) | thing.t[7006] |
cacheSenseInfo (objs, sense) | thing.t[6984] |
cacheSensePath (sense) | thing.t[7300] |
canBeHeardBy (actor) | thing.t[6675] |
canBeSeenBy (actor) | thing.t[6674] |
canBeSensed (sense, trans, ambient) | thing.t[4489] |
By default, we return nil if the ambient energy level for the object is zero. If the ambient level is non-zero, we'll return true in 'transparent' conditions, nil for 'opaque', and we'll let the sense decide via its canObjBeSensed() method for any other transparency conditions. Note that 'ambient' as given here is the ambient level *at the object*, not as seen along my sense path - so this should NOT be given as the ambient value from a SenseInfo, which has already been adjusted for the sense path.
canBeSmelledBy (actor) | thing.t[6676] |
canBeTouchedBy (actor) | thing.t[6677] |
canDetailsBeSensed (sense, info, pov) | thing.t[4536] |
canHear (obj) | thing.t[6670] |
canMatchPronounType (typ) | en_us.t[742] |
canMoveViaPath (obj, dest, op) | thing.t[6056] |
Note that this method should generally not be overridden; only checkMoveViaPath() should usually need to be overridden.
cannotGoShowExits (actor) | thing.t[3435] |
cannotReachObject (obj) | thing.t[5839] |
cannotSeeSmellSource (obj) | thing.t[5861] |
cannotSeeSoundSource (obj) | thing.t[5858] |
canOwn (obj) | thing.t[5331] |
This doesn't determine that we *do* own the given object, but only that we *can* own the given object.
canSee (obj) | thing.t[6669] |
canSmell (obj) | thing.t[6671] |
canThrowViaPath (obj, dest, op) | thing.t[6060] |
canTouch (obj) | thing.t[5899] |
canTouchViaPath (obj, dest, op) | thing.t[6064] |
checkActorOutOfNested (allowImplicit) | thing.t[3604] |
This is called when the actor is attempting to move to an object outside of this object while the actor is within this object (for example, if we have a platform containing a box containing a chair, 'self' is the box, and the actor is in the chair, an attempt to move to the platform will trigger a call to box.checkActorOutOfNested).
By default, we're not a nested location, but we could *contain* nested locations. So what we need to do is defer to the child object that actually contains the actor, to let it figure out what it means to move the actor out of itself.
checkBulkChange ( ) | thing.t[4175] |
This routine can be called during the 'check' or 'action' stages of processing a command to determine if a change in my bulk would cause a problem. If so, we'll add a failure report and exit the command.
By default, notify our immediate container of the change to see if there's any objection. A change in an object's bulk typically only aaffects its container or containers.
The usual way to invoke this routine in a 'check' or 'action' routine is with something like this:
whatIf({: checkBulkChange()}, &inflated, true);
This checks to see if the change in my bulk implied by changing self.inflated to true would present a problem for my container, terminating with a reportFailure+exit if so.
checkBulkChangeWithin (changingObj) | thing.t[4197] |
By default, we'll do nothing; subclasses that are sensitive to the bulks of their contents should override this.
checkMoveViaPath (obj, dest, op) | thing.t[6020] |
By default, we'll simply return a success indicator. Subclasses might want to override this for particular conditions. For example, containers would normally override this to return nil when attempting to move an object in or out of a closed container. Some special containers might also want to override this to allow moving an object in or out only if the object is below a certain size threshold, for example.
'obj' is the object being moved, and 'dest' is the destination of the move.
'op' is one of the pathXxx operations - PathIn, PathOut, PathPeer - specifying what kind of movement is being attempted. PathIn indicates that we're moving 'obj' from outside self to inside self; PathOut indicates the opposite. PathPeer indicates that we're moving 'obj' entirely within self - this normally means that we've moved the object out of one of our contents and will move it into another of our contents.
checkStagingLocation (dest) | thing.t[5674] |
If this object is a valid staging location, the routine should simply do nothing. If this object isn't valid as a staging location, this routine should display an appropriate message and terminate the command with 'exit'.
An arbitrary object can't be a staging location, simply because an actor can't enter an arbitrary object. So, by default, we'll explain that we can't enter this object. If the destination is contained within us, we'll provide a more specific explanation indicating that the problem is that the destination is within us.
checkThrowViaPath (obj, dest, op) | thing.t[6030] |
checkTouchViaPath (obj, dest, op) | thing.t[6045] |
By default, this returns the same thing as canMoveViaPath, since touching is in most cases the same as ordinary movement of an object from one location to another. Objects can overridet his when touching an object through this path element should be treated differently from moving an object.
checkTravelerDirectlyInRoom (traveler, allowImplicit) | thing.t[3582] |
childInName (childName) | en_us.t[1308] |
childInNameGen (childName, myName) | en_us.t[1338] |
In most cases, this is the only one of the various childInName methods that needs to be overridden per subclass, since the others are defined in terms of this one. Note also that if the only thing you need to do is change the preposition from 'in' to something else, you can just override objInPrep instead.
childInNameWithOwner (childName) | en_us.t[1317] |
childInRemoteName (childName, pov) | en_us.t[1324] |
clearSenseInfo ( ) | thing.t[7491] |
cloneForMultiInstanceContents (loc) | thing.t[5643] |
cloneMultiInstanceContents ( ) | thing.t[5621] |
conjugateRegularVerb (verb) | en_us.t[1078] |
In the present tense, this is pretty easy: we add an 's' for the third person singular, and leave the verb unchanged for plural (it asks, they ask). The only complication is that we must check some special cases to add the -s suffix: -y -> -ies (it carries), -o -> -oes (it goes).
In the past tense, we can equally easily figure out when to use -d, -ed, or -ied. However, we have a more serious problem: for some verbs, the last consonant of the verb stem should be repeated (as in deter -> deterred), and for others it shouldn't (as in gather -> gathered). To figure out which rule applies, we would sometimes need to know whether the last syllable is stressed, and unfortunately there is no easy way to determine that programmatically.
Therefore, we do *not* handle the case where the last consonant is repeated in the past tense. You shouldn't use this method for this case; instead, treat it as you would handle an irregular verb, by explicitly specifying the correct past tense form via the tSel macro. For example, to generate the properly conjugated form of the verb "deter" for an object named "thing", you could use an expression such as:
'deter' + tSel(thing.verbEndingS, 'red')
This would correctly generate "deter", "deters", or "deterred" depending on the number of the object named "thing" and on the current narrative tense.
connectionTable ( ) | thing.t[5726] |
The table is keyed by object; the associated values are meaningless, as all that matters is whether or not an object is in the table.
construct ( ) OVERRIDDEN | thing.t[1080] |
contentsInFixedIn (loc) | thing.t[5113] |
countDisambigName (cnt) | en_us.t[909] |
countListName (equivCount, pov, info) | thing.t[2079] |
countName (count) | en_us.t[965] |
countNameFrom (count, singularStr, pluralStr) | en_us.t[971] |
countNameOwnerLoc (cnt, ownerPriority) | en_us.t[1408] |
darkRoomContentsLister ( ) | thing.t[3312] |
defaultDistantDesc ( ) | thing.t[2210] |
defaultObscuredDesc (obs) | thing.t[2250] |
desc ( ) | thing.t[2180] |
Note that we show this as a "default descriptive report," because this default message indicates merely that there's nothing special to say about the object. If we generate any additional description messages, such as status reports ("it's open" or "it contains a gold key") or special descriptions for things inside, we clearly *do* have something special to say about the object, so we'll want to suppress the nothing-special message. To accomplish this suppression, all we have to do is report our generic description as a default descriptive report, and the transcript will automatically filter it out if there are any other reports for this same action.
Note that any time this is overridden by an object with any sort of actual description, the override should NOT use defaultDescReport. Instead, simply set this to display the descriptive message directly:
desc = "It's a big green box. "
directionForConnector (conn, actor) | thing.t[3540] |
distantSmellDesc ( ) | thing.t[2277] |
distantSoundDesc ( ) | thing.t[2262] |
dobjFor(AskAbout) | thing.t[9060] |
dobjFor(AskFor) | thing.t[8954] |
dobjFor(AskVague) | thing.t[9079] |
dobjFor(AttachTo) | thing.t[9814] |
dobjFor(Attack) | thing.t[9130] |
dobjFor(AttackWith) | thing.t[9141] |
dobjFor(Board) | thing.t[10092] |
dobjFor(Break) | thing.t[9854] |
dobjFor(Burn) | thing.t[9767] |
dobjFor(BurnWith) | thing.t[9789] |
dobjFor(Clean) | thing.t[10037] |
dobjFor(CleanWith) | thing.t[10047] |
dobjFor(Climb) | thing.t[9881] |
dobjFor(ClimbDown) | thing.t[9893] |
dobjFor(ClimbUp) | thing.t[9887] |
dobjFor(Close) | thing.t[9913] |
dobjFor(Consult) | thing.t[9667] |
dobjFor(ConsultAbout) | thing.t[9673] |
dobjFor(CutWith) | thing.t[9864] |
dobjFor(Detach) | thing.t[9844] |
dobjFor(DetachFrom) | thing.t[9829] |
dobjFor(Dig) | thing.t[9508] |
dobjFor(DigWith) | thing.t[9519] |
dobjFor(Doff) | thing.t[8934] |
dobjFor(Drink) | thing.t[9987] |
dobjFor(Drop) | thing.t[8788] |
dobjFor(Eat) | thing.t[9973] |
dobjFor(Enter) | thing.t[10269] |
dobjFor(EnterOn) | thing.t[9709] |
dobjFor(Examine) | thing.t[8039] |
dobjFor(Extinguish) | thing.t[9804] |
dobjFor(Fasten) | thing.t[10119] |
dobjFor(FastenTo) | thing.t[10129] |
dobjFor(Feel) | thing.t[8613] |
dobjFor(Flip) | thing.t[9729] |
dobjFor(Follow) | thing.t[9092] |
dobjFor(GetOffOf) | thing.t[10110] |
dobjFor(GetOutOf) | thing.t[10102] |
dobjFor(GiveTo) | thing.t[8972] |
dobjFor(GoThrough) | thing.t[10278] |
dobjFor(JumpOff) | thing.t[9543] |
dobjFor(JumpOver) | thing.t[9534] |
dobjFor(Kiss) | thing.t[8943] |
dobjFor(LieOn) | thing.t[10072] |
dobjFor(Light) | thing.t[9760] |
dobjFor(ListenTo) | thing.t[8560] |
dobjFor(Lock) | thing.t[9923] |
dobjFor(LockWith) | thing.t[9943] |
dobjFor(LookBehind) | thing.t[8539] |
dobjFor(LookIn) | thing.t[8501] |
dobjFor(LookThrough) | thing.t[8550] |
dobjFor(LookUnder) | thing.t[8528] |
dobjFor(Move) | thing.t[9574] |
dobjFor(MoveTo) | thing.t[9601] |
dobjFor(MoveWith) | thing.t[9585] |
dobjFor(Open) | thing.t[9903] |
dobjFor(PlugIn) | thing.t[10169] |
dobjFor(PlugInto) | thing.t[10179] |
dobjFor(Pour) | thing.t[9997] |
dobjFor(PourInto) | thing.t[10007] |
dobjFor(PourOnto) | thing.t[10022] |
dobjFor(Pull) | thing.t[9563] |
dobjFor(Push) | thing.t[9552] |
dobjFor(PushTravel) | thing.t[10289] |
dobjFor(PutBehind) | thing.t[8909] |
dobjFor(PutIn) | thing.t[8823] |
dobjFor(PutOn) | thing.t[8861] |
dobjFor(PutUnder) | thing.t[8893] |
dobjFor(Read) | thing.t[8475] |
dobjFor(Remove) | thing.t[8701] |
This should be overridden in certain cases. For clothing, "remove dobj" should be the same as "doff dobj". For removable components, this should imply removing the component from its container.
dobjFor(Screw) | thing.t[10219] |
dobjFor(ScrewWith) | thing.t[10229] |
dobjFor(Search) | thing.t[8522] |
dobjFor(Set) | thing.t[9647] |
dobjFor(SetTo) | thing.t[9657] |
dobjFor(ShowTo) | thing.t[8998] |
dobjFor(SitOn) | thing.t[10062] |
dobjFor(Smell) | thing.t[8575] |
dobjFor(StandOn) | thing.t[10082] |
dobjFor(Strike) | en_us.t[1949] |
dobjFor(Switch) | thing.t[9719] |
dobjFor(Take) | thing.t[8631] |
dobjFor(TakeFrom) | thing.t[8717] |
dobjFor(TalkTo) | thing.t[8963] |
dobjFor(Taste) | thing.t[8593] |
dobjFor(TellAbout) | thing.t[9069] |
dobjFor(TellVague) | thing.t[9083] |
dobjFor(Throw) | thing.t[9169] |
Note that we don't apply an preconditions or verification, since we don't really do anything with the action ourselves. If an object overrides this, it should add any preconditions and verifications that are appropriate.
dobjFor(ThrowAt) | thing.t[9206] |
dobjFor(ThrowDir) | thing.t[9182] |
dobjFor(ThrowTo) | thing.t[9456] |
dobjFor(Turn) | thing.t[9612] |
dobjFor(TurnOff) | thing.t[9749] |
dobjFor(TurnOn) | thing.t[9739] |
dobjFor(TurnTo) | thing.t[9622] |
dobjFor(TurnWith) | thing.t[9632] |
dobjFor(TypeLiteralOn) | thing.t[9699] |
dobjFor(TypeOn) | thing.t[9683] |
dobjFor(Unfasten) | thing.t[10144] |
dobjFor(UnfastenFrom) | thing.t[10154] |
dobjFor(Unlock) | thing.t[9933] |
dobjFor(UnlockWith) | thing.t[9958] |
dobjFor(Unplug) | thing.t[10194] |
dobjFor(UnplugFrom) | thing.t[10204] |
dobjFor(Unscrew) | thing.t[10244] |
dobjFor(UnscrewWith) | thing.t[10254] |
dobjFor(Wear) | thing.t[8925] |
examineListContents ( ) | thing.t[8180] |
examineListContentsWith (lister) | thing.t[8187] |
examineSpecialContents ( ) | thing.t[8409] |
examineStatus ( ) | thing.t[8168] |
By default, we simply show our contents. Even though this base class isn't set up as a container from the player's perspective, we could contain components which are themselves containers. So, to ensure that we properly describe any contents of our contents, we need to list our children.
failCheck (msg, [params]) | thing.t[8029] |
feelDesc ( ) | thing.t[2296] |
fillMedium ( ) | thing.t[6654] |
Note that the FillMedium object is usually a regular object in scope, so that the player can refer to the fill medium. For example, if a room is filled with fog, the player might want to be able to refer to the fog in a command.
By default, our medium is the same as our parent's medium, on the assumption that fill media diffuse throughout the location's interior. Note, though, that Container overrides this so that a closed Container is isolated from its parent's fill medium - think of a closed bottle within a room filled with smoke. However, a fill medium doesn't expand from a child into its containers - it only diffuses into nested containers, never out.
An object at the outermost containment level has no fill medium by default, so we return nil if our location is nil.
Note that, unlike the "surface" material, the fill medium is assumed to be isotropic - that is, it has the same sense-passing characteristics regardless of the direction in which the energy is traversing the medium. Since we don't have any information in our containment model about the positions of our objects relative to one another, we have no way to express anisotropy in the fill medium among our children anyway.
Note further that energy going in or out of this object must traverse both the fill medium and the surface of the object itself. Since we have no other information on the relative positions of our contents, we can only assume that they're uniformly distributed through our interior, so it is necessary to traverse the same amount of fill material to go from one child to any other or from a child to our inner surface.
As a sense is transmitted, several consecutive traversals of a single fill material (i.e., a single object reference) will be treated as a single traversal of the material. Since we don't have a notion of distance in our containment model, we can't assume that we cover a certain amount of distance just because we traverse a certain number of containment levels. So, if we have three nested containment levels all inheriting a single fill material from their outermost parent, traversing from the inner container to the outer container will count as a single traversal of the material.
findOpaqueObstructor (sense, obj) | thing.t[6738] |
senseObj() by itself does not determine the obstructor when the sense path is opaque, because doing so requires extra work. The sense path calculator that senseObj() uses cuts off its search whenever it reaches an opaque point, because beyond that point nothing can be sensed.
This can only be called immediately after calling senseObj() because we re-use the same cached sense path information that senseObj() uses.
findTouchObstructor (obj) | thing.t[5958] |
forEachConnectedContainer (func, [args]) | thing.t[5594] |
forEachContainer (func, [args]) | thing.t[5581] |
(func)(location, args...)
fromPOV (actor, pov, propToCall, [args]) | thing.t[4562] |
getAllForTakeFrom (scopeList) | thing.t[4855] |
getAllPathsTo (obj) | thing.t[6299] |
Each path item in the vector is a list arranged like so:
[obj, op, obj, op, obj]
Each 'obj' is an object, and each 'op' is an operation enum (PathIn, PathOut, PathPeer) that specifies how to get from the preceding object to the next object. The first object in the list is always the starting object (i.e., self), and the last is always the target object ('obj').
getAnnouncementDistinguisher (lst) | thing.t[2362] |
'lst' is the list of other objects from which we're trying to differentiate 'self'. The reason 'lst' is given is that it lets us choose the simplest name for each object that usefully distinguishes it; to do this, we need to know exactly what we're distinguishing it from.
getBagAffinities (lst) | thing.t[4209] |
getBagsOfHolding (vec) | thing.t[4352] |
getBestDistinguisher (lst) | thing.t[2385] |
getBulk ( ) | thing.t[3969] |
Some objects do change shape as contents are added. Such objects can override this routine to provide the appropriate behavior. (We don't try to provide a parameterized total bulk calculator here because there are too many possible ways a container's bulk could be affected by its contents or by other factors.)
If an object's bulk depends on its contents, the object should override notifyInsert() so that it calls checkBulkChange() - this will ensure that an object won't suddenly become too large for its container (or holding actor).
getBulkWithin ( ) | thing.t[3743] |
getCarryingActor ( ) | thing.t[5337] |
getCommonContainer (obj) | thing.t[4630] |
getCommonDirectContainer (obj) | thing.t[4607] |
getConnectedContainers ( ) | thing.t[5604] |
getConnectorTo (actor, dest) | thing.t[3511] |
getContentsForExamine (lister, infoTab) | thing.t[4954] |
getDestName (actor, origin) | thing.t[3760] |
getDropDestination (obj, path) | thing.t[3813] |
By default, objects dropped within us won't stay within us, but will land in our container's drop destination.
'obj' is the object being dropped. In some cases, the drop destination might differ according to the object; for example, if the floor is a metal grating, a large object might land on the grating when dropped, but a small object such as a coin might drop through the grating to the room below. Note that 'obj' can be nil, if the caller simply wants to determine the generic destination where a *typical* object would land if dropped - this routine must therefore not assume that 'obj' is non-nil.
'path' is the sense path (as returned by selectPathTo and the like) traversed by the operation that's seeking the drop destination. For ordinary single-location objects, the path is irrelevant, but this information is sometimes useful for multi-location objects to let them know which "side" we approached them from. Note that the path can be nil, so this routine must not depend upon a path being supplied; if the path is nil, the routine should assume that the ordinary "touch" sense path from the current actor to 'self' is to be used, because the actor is effectively reaching out and placing an object on self. This means that when calling this routine, you can supply a nil path any time the actor is simply dropping an object.
getEncumberingBulk (actor) | thing.t[3988] |
Some types of objects will override this to cause the object to contribute more or less bulk to an actor holding the object. For example, an article of clothing being worn by an actor typically contributes no bulk at all to the actor's encumbrance, because an actor wearing an item typically doesn't also have to hold on to the item. Or, a small animal might encumber an actor more than its normal bulk because it's squirming around trying to get free.
getEncumberingWeight (actor) | thing.t[4008] |
Note that we don't recursively sum the encumbering weights of our contents - we simply sum the actual weights. We do it this way because items within a container aren't being directly held by the actor, so any difference between the encumbering and actual weights should not apply, even though the actor is indirectly holding the items. If a subclass does want the sum of the encumbering weights, it should override this to make that calculation.
getExtraScopeItems (actor) | thing.t[5715] |
By default, we add nothing.
getHitFallDestination (thrownObj, path) | thing.t[9370] |
For example, if the actor is inside a cage, and tries to throw a projectile at an object outside the cage, and the cage blocks the projectile's passage, then this routine is called on the cage to determine where the projectile ends up. The projectile's ultimate destination is the hit-and-fall destination for the cage: it's where the project ends up when it hits me and then falls to the ground, its trajectory cut short.
'thrownObj' is the projectile thrown, 'self' is the target object, and 'path' is the path the projectile took to reach us. The path is of the form returned by getThrowPathTo(). Note that the path could extend beyond 'self', because the original target might have been a different object - we could simply have interrupted the projectile's course.
getIdentityObject ( ) | thing.t[4687] |
In most cases, an object is its own identity object. However, there are times when the object that a player sees isn't the same as the object that the parser resolves, because we're modeling a single physical object with several programming objects. For example, a complex container has one or more secret internal program objects representing the different sub-containers; as far as the player is concerned, all of the sub-containers are just aspects of the parent complex container, not separate object, so the sub-containers all have the identity of the parent complex container.
By default, this is simply 'self'. Objects that take their effective identities from other objects must override this accordingly.
getInScopeDistinguisher ( ) | thing.t[2374] |
getListedContents (lister, infoTab) | thing.t[4939] |
By default, we'll return the same list we'll display on direct examination of this object.
getLocPushTraveler (trav, obj) | thing.t[3379] |
getLocTraveler (trav, conn) | thing.t[3362] |
We defer to our enclosing room by default because this allows for things like a seat in a car: the actor is sitting in the seat and starts traveling in the car, so the seat calls the enclosing room, which is the car, and the car returns itself, since it's the car that will be traveling.
getMovePathTo (newLoc) | thing.t[5971] |
getNoise ( ) | thing.t[4808] |
getNominalDropDestination ( ) | thing.t[3916] |
By default, most objects simply return themselves, so we'll report something like "obj lands {in/on} self". Some objects might want to report a different object as the destination; for example, an indoor room might want to report objects as falling onto the floor.
getNominalOwner ( ) OVERRIDDEN | thing.t[5306] |
By default, if we have an explicit owner, we'll return that. Otherwise, if our immediate container can own us, we'll return our immediate container. Otherwise, we'll return our immediate container's nominal owner. Note that this last case means that a dollar bill inside Bob's wallet will be Bob's dollar bill, even if Bob's wallet is currently being carried by another actor.
getObjectNotifyList ( ) | thing.t[7689] |
The general notification mechanism always includes in the notification list all of the objects connected by containment to the actor; this method allows for explicit registration of additional objects that must be notified when commands are performed on this object even when the other objects are nowhere nearby.
getOdor ( ) | thing.t[4822] |
getOutermostRoom ( ) | thing.t[3318] |
getOutermostVisibleRoom (pov) | thing.t[3325] |
getRoomNotifyList ( ) | thing.t[3674] |
getRoomPartLocation (part) | thing.t[3632] |
getStateWithInfo (info, pov) | thing.t[2128] |
By default, we return a list state if the visual sense path is transparent or attenuated, or we have large visual scale. In other cases, we assume that the details of the object are not visible under the current sense conditions; since the list state is normally a detail of the object, we don't return a list state when the details of the object are not visible.
getStatuslineExitsHeight ( ) | thing.t[3449] |
getThrowPathTo (newLoc) | thing.t[5985] |
getTouchPathTo (obj) | thing.t[5868] |
getTravelConnector (dir, actor) | thing.t[3471] |
Map all of the directional connections to their values in the enclosing location, except for any explicitly defined in this object. (In most cases, ordinary objects won't define any directional connectors directly, since those connections usually apply only to top-level rooms.)
If 'actor' is non-nil, we'll limit our search to enclosing locations that the actor can currently see. If 'actor' is nil, we'll consider any connector in any enclosing location, whether the actor can see the enclosing location or not. It's useful to pass in a nil actor in cases where we're interested in the structure of the map and not actual travel, such as when constructing an automatic map or computing possible courses between locations.
getVisualSenseInfo ( ) | thing.t[6505] |
getWeight ( ) | thing.t[3934] |
hasCollectiveGroup (g) | thing.t[2519] |
hideFromAll (action) | thing.t[1648] |
Note that returning nil doesn't put the object into an 'all' list. Rather, it simply *leaves* it in any 'all' list it should happen to be in. Each action controls its own selection criteria for 'all', and different verbs use different criteria. No matter how an action chooses its 'all' list, though, an item will always be excluded if hideFromAll() returns true for the item.
hideFromDefault (action) | thing.t[1655] |
initializeEquivalent ( ) | thing.t[4739] |
Objects are grouped by their equivalence key - each set of objects with the same key is part of the same group. The key is determined by the language module, but is usually just the basic disambiguation name (the 'disambigName' property in English, for example).
initializeLocation ( ) | thing.t[4722] |
initializeThing ( ) | thing.t[4700] |
inRoomName (pov) | en_us.t[1287] |
'pov' is the point of view from which we're seeing this room; this might be
We use this phrase in cases where we need to describe things in this room when viewed from a point of view outside of the room (i.e., in a different top-level room). By default, we'll use our actorInName.
iobjFor(AttachTo) | thing.t[9819] |
iobjFor(AttackWith) | thing.t[9152] |
iobjFor(BurnWith) | thing.t[9794] |
iobjFor(CleanWith) | thing.t[10052] |
iobjFor(CutWith) | thing.t[9871] |
iobjFor(DetachFrom) | thing.t[9834] |
iobjFor(DigWith) | thing.t[9524] |
iobjFor(FastenTo) | thing.t[10134] |
iobjFor(GiveTo) | thing.t[8988] |
iobjFor(LockWith) | thing.t[9948] |
iobjFor(MoveWith) | thing.t[9591] |
iobjFor(PlugInto) | thing.t[10184] |
iobjFor(PourInto) | thing.t[10012] |
iobjFor(PourOnto) | thing.t[10027] |
iobjFor(PutBehind) | thing.t[8915] |
iobjFor(PutIn) | thing.t[8846] |
iobjFor(PutOn) | thing.t[8879] |
iobjFor(PutUnder) | thing.t[8899] |
iobjFor(ScrewWith) | thing.t[10234] |
iobjFor(ShowTo) | thing.t[9051] |
iobjFor(TakeFrom) | thing.t[8743] |
iobjFor(ThrowAt) | thing.t[9231] |
iobjFor(ThrowTo) | thing.t[9477] |
iobjFor(TurnWith) | thing.t[9637] |
iobjFor(UnfastenFrom) | thing.t[10159] |
iobjFor(UnlockWith) | thing.t[9963] |
iobjFor(UnplugFrom) | thing.t[10209] |
iobjFor(UnscrewWith) | thing.t[10259] |
isActorTravelReady (conn) | thing.t[3418] |
Note that if you override this to return nil, you should also provide a custom 'notTravelReadyMsg' property that explains the objection.
isComponentOf (obj) | thing.t[4693] |
isDirectlyIn (obj) | thing.t[5059] |
isHeldBy (actor) | thing.t[5129] |
Some classes might override this to change the definition of "held" to include things not directly in the actor's inventory or exclude things directly in the inventory. For example, an item being worn is generally not considered held even though it might be in the direct inventory, and a key on a keyring is considered held if the keyring is being held.
isIn (obj) | thing.t[5000] |
isIn(nil) returns true if this object is "outside" the game world, which means that the object is not reachable from anywhere in the game map and is thus not part of the simulation. This is the case if our outermost container is NOT a top-level object, as indicated by its isTopLevel property. If we're inside an object marked as a top-level object, or we're inside an object that's inside a top-level object (and so on), then we're part of the game world, so isIn(nil) will return nil. If our outermost container is has a nil isTopLevel property, isIn(nil) will return true.
Note that our notion of "in" is not limited to enclosing containment, because the same containment hierarchy is used to represent all types of containment relationships, including things being "on" other things and part of other things.
isInFixedIn (loc) | thing.t[5099] |
This is a rather specific check that might seem a bit odd, but for some purposes it's useful to treat objects within fixed containers in a location as though they were in the location itself, because fixtures of a location are to some extent parts of the location.
isListed ( ) | thing.t[1681] |
Most objects should be listed normally, but some types of objects should be suppressed from the normal room listing. For example, fixed-in-place scenery objects are generally described in the custom message for the containing room, so these are normally omitted from the listing of the room's contents.
By default, we'll return the same thing as isListedInContents - that is, if this object is to be listed when its *direct* container is examined, it'll also be listed by default when any further enclosing container (including the enclosing room) is described. Individual objects can override this to use different rules.
Why would we want to be able to list an object when examining in its direct container, but not when examining an enclosing container, or the enclosing room? The most common reason is to control the level of detail, to avoid overloading the broad description of the room and the main things in it with every detail of every deeply-nested container.
isListedInContents ( ) | thing.t[1693] |
By default, we return true as long as we're not using our special description in this particular context. Examining or looking in a container will normally show special message for any contents of the container, so we don't want to list the items with special descriptions in the ordinary list as well.
isListedInInventory ( ) | thing.t[1699] |
isListedInRoomPart (part) | thing.t[1713] |
isLookAroundCeiling (actor, pov) | thing.t[2738] |
By default, we're the ceiling if we're a top-level room (that is, we have no enclosing location), OR it's not possible to see out to our location. In either of these cases, we can't see anything outside of this room, so we have to generate our own interior description. However, if we do have a location that we can see, then we'll assume that this object just represents a facet of its enclosing location, so the enclosing location provides the room interior description.
In some cases, a room might want to provide its own LOOK AROUND interior description directly even if its location is visible. For example, if the player's inside a wooden booth with a small window that can see out to the enclosing location, LOOK AROUND should probably describe the interior of the booth rather than the enclosing location: even though the exterior is technically visible, the booth clearly dominates the view, from the player's perspective. In this case, we'd want to override this routine to indicate that we're the LOOK AROUND ceiling, despite our location's visibility.
isNominallyIn (obj) | thing.t[5070] |
isNominallyInRoomPart (part) | thing.t[1744] |
In most cases, a portable object might start out with a special initial room part location, but once moved and then dropped somewhere, ends up nominally in the nominal drop destination of the location where it was dropped. For example, a poster might start out being nominally attached to a wall, or a light bulb might be nominally hanging from the ceiling; if these objects are taken and then dropped somewhere, they'll simply end up on the floor.
Our default behavior models this. If we've never been moved, we'll indicate that we're in our initial room part location, given by initNominalRoomPartLocation. Once we've been moved (or if our initNominalRoomPartLocation is nil), we'll figure out what the nominal drop destination is for our current container, and then see if we appear to be in that nominal drop destination.
isOccludedBy (occluder, sense, pov) | thing.t[6693] |
isOrIsIn (obj) | thing.t[5106] |
isOwnedBy (obj) OVERRIDDEN | thing.t[5197] |
This is used to determine ownership for the purpose of possessives in commands. Ownership is not always exclusive: it is possible for a given object to have multiple owners in some cases. For example, if Bob and Bill are both sitting on a couch, the couch could be referred to as "bob's couch" or "bill's couch", so the couch is owned by both Bob and Bill. It is also possible for an object to be unowned.
In most cases, ownership is a function of location (possession is nine-tenths of the law, as they say), but not always; in some cases, an object has a particular owner regardless of its location, such as "bob's wallet". This default implementation allows for ownership by location, as well as explicit ownership, with explicit ownership (as indicated by the self.owner property) taking precedence.
isShipboard ( ) | thing.t[3716] |
The purpose of this property is to indicate to the travel system that shipboard directions (fore, aft, port, starboard) make sense here. When this returns true, and an actor attempts travel in a shipboard direction that doesn't allow travel here, we'll use the standard noTravel message. When this returns nil, attempting to move in a shipboard direction will show a different response that indicates that such directions are not meaningful when not aboard a ship of some kind.
Note that we look to our location unconditionally - we don't bother to check to see if we're open, transparent, or anything like that, so we'll check with our location even if the actor can't see the location. The idea is that, no matter how nested within opaque containers we are, we should still know that we're aboard a ship. This might not always be appropriate; if the actor is magically transported into an opaque container that happens to be aboard a ship somewhere, the actor probably shouldn't think of the location as shipboard until escaping the container, unless they'd know because of the rocking of the ship or some other sensory factor that would come through the opaque container. When the shipboard nature of an interior location should not be known to the actor, this should simply be overridden to return nil.
isVocabEquivalent (obj) | thing.t[2473] |
We'll run through our list of distinguishers and check with each one to see if it can tell us apart from the other object. If we can find at least one distinguisher that can tell us apart, we're not equivalent. If we have no distinguisher that can tell us apart from the other object, we're equivalent.
itIs ( ) | en_us.t[1026] |
itNom ( ) | en_us.t[1002] |
itObj ( ) | en_us.t[1003] |
itPossAdj ( ) | en_us.t[1004] |
itPossNoun ( ) | en_us.t[1005] |
itVerb (verb) | en_us.t[1040] |
listCardinality (lister) | en_us.t[784] |
English only distinguishes two degrees of cardinality in its grammar: one, or many. That is, when constructing a sentence, the only thing the grammar cares about is whether an object is singular or plural: IT IS on the table, THEY ARE on the table. Since English only distinguishes these two degrees, two is the same as a hundred is the same as a million for grammatical purposes, so we'll consider our cardinality to be 2 if we're plural, 1 otherwise.
Some languages don't express cardinality at all in their grammar, and others distinguish cardinality in greater detail than just singular-vs-plural, which is why this method has to be in the language-specific part of the library.
localDirectionLinkForConnector (conn) | thing.t[3559] |
lookAround (actor, verbose) | thing.t[2659] |
'verbose' is a combination of LookXxx flags (defined in adv3.h) indicating what style of description we want. This can also be 'true', in which case we'll show the standard verbose listing (LookRoomName | LookRoomDesc | LookListSpecials | LookListPortables); or 'nil', in which case we'll use the standard terse listing (LookRoomName | LookListSpecials | LookListPortables).
lookAroundPov (actor, pov, verbose) | thing.t[2692] |
'actor' is the actor doing the looking, and 'pov' is the point of view of the description. These are usually the same, but need not be. For example, an actor could be looking at a room through a hole in the wall, in which case the POV would be the object representing the "side" of the hole in the room being described. Or, the actor could be observing a remote room via a closed-circuit television system, in which case the POV would be the camera in the remote room. (The POV is the physical object receiving the photons in the location being described, so it's the camera, not the TV monitor that the actor's looking at.)
'verbose' has the same meaning as it does in lookAround().
This routine checks to see if 'self' is the "look-around ceiling," which is for most purposes the outermost visible container of this object; see isLookAroundCeiling() for more. If this object is the look-around ceiling, then we'll call lookAroundWithin() to generate the description of the interior of 'self'; otherwise, we'll recursively defer to our immediate container so that it can make the same test. In most cases, the outermost visible container that actually generates the description will be a Room or a NestedRoom.
lookAroundWithin (actor, pov, verbose) | thing.t[2781] |
The library calls this method when an actor performs a "look around" command, and the actor is within this object, and the actor can't see anything outside of this object; this can happen simply because we're a top-level room, but it can also happen when we're a closed opaque container or there's not enough light to see the enclosing location.
The parameters have the same meaning as they do in lookAroundPov().
Note that this method must be overridden if a room overrides the standard mechanism for representing its contents list (i.e., it doesn't store its complete set of direct contents in its 'contents' list property).
In most cases, this routine will only be called in Room and NestedRoom objects, because actors can normally only enter those types of objects. However, it is possible to try to describe the interior of other types of objects if (1) the game allows actors to enter other types of objects, or (2) the game provides a non-actor point-of-view object, such as a video camera, that can be placed in ordinary containers and which transmit what they see for remote viewing.
lookAroundWithinContents (actor, illum, infoTab) | thing.t[3079] |
lookAroundWithinDesc (actor, illum) | thing.t[3032] |
lookAroundWithinName (actor, illum) | thing.t[3003] |
By default, we show our interior room name or interior dark room name, as appropriate to the ambient light level at the point of view.
lookAroundWithinSense (actor, pov, sense, lister) | thing.t[3233] |
lookAroundWithinShowExits (actor, illum) | thing.t[3267] |
lookInDesc ( ) | thing.t[2187] |
mainExamine ( ) | thing.t[8062] |
mainMoveInto (newContainer) | thing.t[5479] |
mapPushTravelHandlers (PushTravelThrough, GoThrough) | thing.t[10301] |
mapPushTravelHandlers (PushTravelEnter, Enter) | thing.t[10302] |
mapPushTravelHandlers (PushTravelGetOutOf, GetOutOf) | thing.t[10303] |
mapPushTravelHandlers (PushTravelClimbUp, ClimbUp) | thing.t[10304] |
mapPushTravelHandlers (PushTravelClimbDown, ClimbDown) | thing.t[10305] |
meetsObjHeld (actor) | thing.t[5147] |
mergeSenseInfo (a, b) | thing.t[7592] |
mergeSenseInfoTable (a, b) | thing.t[7569] |
moveInto (newContainer) | thing.t[5448] |
All notifications are sent before the object is actually moved. This means that the current game state at the time of the notifications reflects the state before the move.
moveIntoForTravel (newContainer) | thing.t[5465] |
moveIntoNotifyPath (newContainer) | thing.t[5526] |
mustMoveObjInto (obj) | thing.t[5385] |
nameIs ( ) | en_us.t[1826] |
nameIsnt ( ) | en_us.t[1829] |
nameVerb (verb) | en_us.t[1839] |
normalizePath (path) | thing.t[6441] |
First, we expand any sequence of in+out operations that take us out of one root-level containment tree and into another to include a "through" operation for the multi-location object being traversed. For example, if 'a' and 'c' do not share a common container, then we will turn this:
[a PathIn b PathOut c]
into this:
[a PathIn b PathThrough b PathOut c]
This will ensure that when we traverse the path, we will explicitly traverse through the connector material of 'b'.
Second, we replace any sequence of out+in operations through a common container with "peer" operations across the container's contents directly. For example, a path that looks like this
[a PathOut b PathIn c]
will be normalized to this:
[a PathPeer c]
This means that we go directly from a to c, traversing through the fill medium of their common container 'b' but not actually traversing out of 'b' and back into it.
notePromptByOwnerLoc (ownerPriority) | en_us.t[1433] |
notePromptByPossAdj ( ) | en_us.t[1452] |
noteSeenBy (actor, prop) | thing.t[1612] |
notifyInsert (obj, newCont) | thing.t[7869] |
During moveInto(), this is called on the new container tree after notifyRemove has been called on the old container tree. This routine can cancel the move by displaying an explanatory message and calling 'exit'.
notifyMoveInto (newCont) | thing.t[7889] |
During moveInto(), this routine is called after notifyRemove() and notifyInsert() have been called on the old and new container trees (respectively). This routine can cancel the move by displaying an explanatory message and calling 'exit'.
This routine is the last in the notification sequence, so if this routine doesn't cancel the move, then the move will definitely happen (at least to the extent that we'll definitely call baseMoveInto() to carry out the move).
notifyMoveViaPath (obj, dest, op) | thing.t[6078] |
Note that this method should generally not be overridden; only checkMoveViaPath() should usually need to be overridden.
notifyRemove (obj) | thing.t[7854] |
When an object is about to be moved via moveInto(), the library calls notifyRemove on the old container tree, then notifyInsert on the new container tree, then notifyMoveInto on the object being moved. Any of these routines can cancel the operation by displaying an explanatory message and calling 'exit'.
// obscuredDesc (obs) Interface description only | thing.t[2233] |
If this property is left undefined for an object, then we'll describe this object when it's obscured in one of two ways. If the object has its 'sightSize' property set to 'large', we'll display the ordinary 'desc', because its large visual size makes its details visible even when the object is obscured. If the 'sightSize' is anything else, we'll instead display the default library message indicating that the object is too obscured to see any details.
To display a specific description when the object is visually obscured, override this to a method that displays your message. 'obs' is the object that's obstructing the view - this will be something on our sense path, such as a dirty window, that the actor has to look through to see 'self'.
obscuredSmellDesc (obs) | thing.t[2280] |
obscuredSoundDesc (obs) | thing.t[2265] |
pluralNameFrom (str) | en_us.t[1725] |
This can only deal with simple adjective-noun forms. For more complicated forms, particularly for compound words, it must be overridden (e.g., "Attorney General" -> "Attorneys General", "man-of-war" -> "men-of-war"). Likewise, names with irregular plurals ('child' -> 'children', 'man' -> 'men') must be handled with overrides.
processThrow (target, hitProp) | thing.t[9244] |
propHidesProp (prop1, prop2) | thing.t[7911] |
We look at the object to determine where prop1 and prop2 are defined in the class hierarchy. If prop1 isn't defined, it definitely doesn't hide prop2. If prop2 isn't defined, prop1 definitely hides it. If both are defined, then prop1 hides prop2 if and only if it is defined at a point in the class hierarchy that is "more specialized" than prop2. That is, for prop1 to hide prop2, the class that defines prop1 must either be the same as the class that defines prop2, or the class where prop1 is defined must inherit from the class that defines prop2, or the class where prop1 is defined must be earlier in a multiple inheritance list than the class defining prop2.
propWithPresent (prop, [args]) | en_us.t[1927] |
putInName ( ) | en_us.t[1301] |
receiveDrop (obj, desc) | thing.t[3895] |
'desc' is a "drop descriptor": an object of class DropType, which describes how the object is being discarded. This can be a DropTypeDrop for a DROP command, a DropTypeThrow for a THROW command, or custom types defined by the game or by library extensions.
In most cases, the actual *result* of dropping the object will always be the same for a given location, regardless of which command initiated the drop, so this routine won't usually have to look at 'desc' at all to figure out what happens.
However, the *message* we generate does usually vary according to the drop type, because this is the report for the entire command. There are three main ways of handling this variation.
- First, you can check what kind of descriptor it is (using ofKind, for example), and generate a custom message for each kind of descriptor. Be aware that any library extensions you're using might have added new DropType subclasses.
- Second, experienced programmers might prefer the arguably cleaner OO "visitor" pattern: treat 'desc' as a visitor, calling a single method that you define for your custom message. You'll have to define that custom method in each DropType subclass, of course.
- Third, you can build a custom message by combining the standard "message fragment" prefix provided by the drop descriptor with your own suffix. The prefix will always be the start of a sentence describing what the player did: "You drop the box", "The ball hits the wall and bounces off", and so on. Since the fragment always has the form of the start of a sentence, you can always add your own suffix: ", and falls to the floor", for example, or ", and falls into the chasm". Note that if you're using one of the other approaches above, you'll probably want to combine that approach with this one to handle cases where you don't recognize the drop descriptor type.
By default, we simply move the object into self and display the standard message using the descriptor (we use the "visitor" pattern to display that standard message). This can be overridden in cases where it's necessary to move the object to a different location, or to invoke a side effect.
// remoteDesc (pov) Interface description only | thing.t[2247] |
If this property is left undefined, then we'll describe this object when it's distant as though it were in the same room. So, we'll select the obscured, distant, or ordinary description, according to the sense path.
remoteInitSpecialDesc (actor) | thing.t[1463] |
remoteRoomContentsLister (other) | thing.t[3305] |
This is called on the actor's outermost room to get the lister for objects visible in the given remote room. This lets each room customize the way it describes the objects in adjoining rooms as seen from its point of view.
We provide a simple default lister that yields decent results in most cases. However, it's often desirable to customize this, to be more specific about how we see the items: "Through the window, you see..." or "Further down the hall, you see...". An easy way to provide such custom listings is to return a new CustomRoomLister, supplying the prefix and suffix strings as parameters:
return new CustomRoomLister(
'Further down the hall, {you/he} see{s}', '.');
remoteSpecialDesc (actor) | thing.t[1212] |
By default, we just use the special description. It's usually better to customize this to describe the object from the given point of view. 'actor' is the point-of-view actor.
removeFromContents (obj) | thing.t[5409] |
Do NOT override this routine to cause side effects. If side effects are desired when removing an object, use notifyRemove().
removeObjectNotifyItem (obj) | thing.t[7710] |
restoreLocation (oldLoc) | thing.t[5432] |
roomActorThereDesc (actor) | thing.t[2628] |
By default, if we have a location, and the actor doing the looking can see out into the enclosing room, we'll defer to the location. Otherwise, we'll show a default library message ("The actor is nearby").
roomContentsLister ( ) | thing.t[3279] |
roomDaemon ( ) | thing.t[3644] |
roomDarkDesc ( ) | thing.t[2613] |
roomDesc ( ) | thing.t[2582] |
Note that this is used ONLY when the actor cannot see the enclosing room - when the enclosing room is visible (because the nested room is something like a chair that doesn't enclose the actor, or can enclose the actor but is open or transparent), then we'll simply use the description of the enclosing room instead, adding a note to the short name shown at the start of the room description indicating that the actor is in the nested room.
By default, we'll show the appropriate "actor here" description for the posture, so we'll say something like "You are sitting on the red chair" or "You are in the phone booth." Instances can override this to customize the description with something more detailed, if desired.
roomFirstDesc ( ) | thing.t[2591] |
roomRemoteDesc (actor) | thing.t[2607] |
By default, we simply show the normal room description. You'll probably want to override this any time you actually use it, though, to describe what the actor sees from the remote point of view.
roomTravelPreCond ( ) | thing.t[3395] |
saveLocation ( ) | thing.t[5419] |
selectPathTo (obj, traverseProp) | thing.t[6106] |
If we can find a path, but there are no good paths, we'll return the shortest unusable path. This can be useful for explaining why the traversal is impossible.
sendNotifyInsert (obj, newCont, msg) | thing.t[7784] |
This should always be called *before* a change of location is actually put into effect, so that we will still be in our old container when this is called. 'obj' is the object being inserted, and 'newCont' is the new direct container.
sendNotifyRemove (obj, newLoc, msg) | thing.t[7751] |
senseAmbientMax (senses) | thing.t[6943] |
Note that this method changes certain global variables used during sense and scope calculations. Because of this, be careful not to call this method *during* sense or scope calculations. In particular, don't call this from an object's canBeSensed() method or anything it calls. For example, don't call this from a Hidden.discovered method.
senseInfoTable (sense) | thing.t[6818] |
We return a lookup table of each object that can be sensed (in the given sense) from the point of view of 'self'. The key for each entry in the table is an object, and the corresponding value is a SenseInfo object describing the sense conditions for the object.
senseObj (sense, obj) | thing.t[6706] |
Note that, because 'distant', 'attenuated', and 'obscured' transparency levels always compound (with one another and with themselves) to opaque, there will never be more than a single obstructor in a path, because any path with two or more obstructors would be an opaque path, and hence not a path at all.
sensePathFromWithin (fromChild, sense, trans, obs, fill) | thing.t[7380] |
sensePathFromWithout (fromParent, sense, trans, obs, fill) | thing.t[7469] |
sensePathToContents (sense, trans, obs, fill) | thing.t[7332] |
sensePathToLoc (sense, trans, obs, fill) | thing.t[7319] |
sensePresenceList (sense) | thing.t[6916] |
setAllSeenBy (infoTab, actor) | thing.t[1596] |
setContentsSeenBy (infoTab, actor) | thing.t[1576] |
We will NOT mark as seen any objects that have suppressAutoSeen set to true.
setGlobalParamName (name) | thing.t[1147] |
(You only need to use this method if you want to add or change a name dynamically at run-time, because the library automatically initializes the table for objects with globalParamName settings defined at compile-time.)
setVisualSenseInfo (info) | thing.t[6562] |
shineFromWithin (fromChild, sense, ambient, fill) | thing.t[7194] |
shineFromWithout (fromParent, sense, level, fill) | thing.t[7281] |
shineOnContents (sense, ambient, fill) | thing.t[7127] |
shineOnLoc (sense, ambient, fill) | thing.t[7114] |
showDistantSpecialDesc ( ) | thing.t[1336] |
showDistantSpecialDescInContents (actor, cont) | thing.t[1424] |
showInventoryContents (pov, lister, options, indent, infoTab) | thing.t[4924] |
showInventoryItem (options, pov, infoTab) | thing.t[2088] |
showInventoryItemCounted (lst, options, pov, infoTab) | thing.t[2093] |
showListItem (options, pov, infoTab) | thing.t[1934] |
showListItemCounted (lst, options, pov, infoTab) | thing.t[1977] |
showListItemCountedGen (lst, options, pov, infoTab, stateNameProp) | thing.t[1989] |
showListItemGen (options, pov, infoTab, stateNameProp) | thing.t[1945] |
showObjectContents (pov, lister, options, indent, infoTab) | thing.t[4909] |
If the object has any contents, we'll display a listing of the contents. This is used to display the object's contents as part of the description of a room ("look around"), of an object ("examine box"), or of an object's contents ("look in box").
'options' is the set of flags that we'll pass to showList(), and has the same meaning as for that function.
'infoTab' is a lookup table of SenseInfo objects for the objects that the actor to whom we're showing the contents listing can see via the sight-like senses.
This method should be overridden by any object that doesn't store its contents using a simple 'contents' list property.
showObscuredSpecialDesc ( ) | thing.t[1327] |
showObscuredSpecialDescInContents (actor, cont) | thing.t[1422] |
showRemoteSpecialDesc (actor) | thing.t[1345] |
showRemoteSpecialDescInContents (actor, cont) | thing.t[1426] |
showSpecialDesc ( ) | thing.t[1314] |
Note that the initial description overrides the specialDesc property whenever useInitSpecialDesc() returns true. This allows an object to have both an initial description that is used until the object is moved, and a separate special description used thereafter.
showSpecialDescInContents (actor, cont) | thing.t[1420] |
showSpecialDescInContentsWithInfo (info, pov, cont) | thing.t[1396] |
showSpecialDescWithInfo (info, pov) | thing.t[1262] |
showStatuslineExits ( ) | thing.t[3442] |
showWornItem (options, pov, infoTab) | thing.t[2102] |
showWornItemCounted (lst, options, pov, infoTab) | thing.t[2107] |
smellDesc ( ) | thing.t[2274] |
smellHereDesc ( ) | thing.t[2310] |
In most cases, regular objects don't override these, because most regular objects have no direct sensory presence of their own. Instead, a Noise or Odor is created and added to the object's direct contents, and the Noise or Odor provides the object's sense presence.
soundDesc ( ) | thing.t[2259] |
soundHereDesc ( ) | thing.t[2311] |
specialDescList (infoTab, cond) | thing.t[8431] |
specialPathFrom (src, vec) | thing.t[6328] |
By default, we do nothing at all. The purpose of this routine is to allow special objects that exist outside the normal containment model to insinuate themselves into the sense model under special conditions of their choosing.
statusName (actor) | thing.t[2950] |
By long-standing convention, each location in a game usually has a distinctive name that's displayed here. Players usually find these names helpful in forming a mental map of the game.
By default, if we have an enclosing location, and the actor can see the enclosing location, we'll defer to the location. Otherwise, we'll display our roo interior name.
stopThrowViaPath (projectile, path) | thing.t[9341] |
The return value is taken as a path traversal continuation indicator: nil means to stop the traversal, which is to say that the 'throw' command finishes here. If we don't really want to stop the traversal, we can return 'true' to let the traversal continue.
By default, we'll stop the throw by doing the same thing we would have done if we had successfully thrown the object at 'self' - the whole reason we're stopping the throw is that we're in the way, so the effect is the same as though we were the intended target to begin with. This is the normal handling when we can't throw through 'obj' because 'obj' is a closed container or is otherwise impassable by self when thrown. This can be overridden to provide different handling if needed.
superHidesSuper (s1, s2) | thing.t[7962] |
tasteDesc ( ) | thing.t[2289] |
thatNom ( ) | en_us.t[1015] |
thatObj ( ) | en_us.t[1020] |
theNameFrom (str) | en_us.t[1173] |
theNameObj ( ) | en_us.t[1166] |
theNameOwnerLoc (ownerPriority) | en_us.t[1391] |
theNameWithOwner ( ) | en_us.t[1223] |
throwTargetCatch (obj, path) | thing.t[9490] |
throwTargetHitWith (projectile, path) | thing.t[9310] |
throwViaPath (obj, op, target, path) | thing.t[9281] |
By default, we'll use the standard canThrowViaPath handling (which invokes the even more basic checkThrowViaPath) to determine if we can make this traversal. If so, we'll proceed with the throw; otherwise, we'll stop the throw by calling stopThrowViaPath() and returning the result.
transmitAmbient (sense) | thing.t[7066] |
transSensingIn (sense) | thing.t[6584] |
transSensingOut (sense) | thing.t[6603] |
By default, we simply return the same thing as transSensingIn(), since most containers are symmetrical for sense passing from inside to outside or outside to inside. However, we distinguish this as a separate method so that asymmetrical containers can have different effects in the different directions; for example, a box made of one-way mirrors might be transparent when looking from the inside to the outside, but opaque in the other direction.
traversePath (path, func) | thing.t[6195] |
At each stage, the callback returns true to continue the traversal, nil if we are to stop the traversal.
Returns nil if any callback returns nil, true if all callbacks return true.
tryHolding ( ) | thing.t[5355] |
tryImplicitRemoveObstructor (sense, obj) | thing.t[5829] |
If it is possible to perform an implicit command that would clear the obstruction, try performing the command, and return true. Otherwise, simply return nil. The usual implied command rules should be followed (which can be accomplished simply by using tryImplictAction() to execute any implied command).
The particular type of command that would remove this obstructor can vary by obstructor class. For a container, for example, an "open" command is the usual remedy.
tryMovingObjInto (obj) | thing.t[5376] |
useInitDesc ( ) | thing.t[1508] |
useInitSpecialDesc ( ) | thing.t[1498] |
useSpecialDesc ( ) | thing.t[1358] |
useSpecialDescInContents (cont) | thing.t[1382] |
useSpecialDescInRoom (room) | thing.t[1372] |
useSpecialDescInRoomPart (part) | thing.t[1798] |
By default, we'll include our special description with a room part's description if either (1) we are using our initial description, and our initNominalRoomPartLocation is the given part; or (2) we are using our special description, and our specialNominalRoomPartLocation is the given part.
Note that, by default, we do NOT use our special description for the "default" room part location - that is, for the nominal drop destination for our containing room, which is where we end up by default, in the absence of an initial or special room part location setting. We don't use our special description in this default location because special descriptions are most frequently used to describe an object that is specially situated, and hence we don't want to assume a default situation.
verbEndingEs ( ) | en_us.t[1910] |
verbEndingIes ( ) | en_us.t[1911] |
verbEndingS ( ) | en_us.t[1900] |
verbEndingS doesn't try to handle the past tense at all - use it only in places where you know for certain that you'll never need the past tense form, or in expressions constructed with the tSel macro: use verbEndingS as the macro's first argument, and specify the past tense ending explicitly as the second argument. For example, you could generate the correctly conjugated form of the verb "to fit" for an object named "key" with an expression such as:
'fit' + tSel(key.verbEndingS, 'ted')
This would generate 'fit', 'fits', or 'fitted' according to number and tense.
verbEndingSD and verbEndingSEd return 'd' and 'ed' respectively in the past tense.
verbEndingSMessageBuilder_ is for internal use only: it assumes that the correct ending to be displayed in the past tense is stored in langMessageBuilder.pastEnding_. It is used as part of the string parameter substitution mechanism.
verbToHave ( ) | en_us.t[1851] |
verbWas ( ) | en_us.t[1848] |
verifyFollowable ( ) | thing.t[9120] |
verifyInsert (obj, newCont) | thing.t[7827] |
verifyMoveTo (newLoc) | thing.t[7734] |
This routine is called any time an actor action would cause this object to be moved to a new container, so it is the common point at which to intercept any action that would attempt to move the object.
verifyRemove (obj) | thing.t[7818] |
whatIf (func, [changes]) | thing.t[4043] |
The changes are expressed as pairs of argument values. The first value in a pair is a property, and the second is a new value for the property. For each pair, we'll set the given property to the given value. The setting is direct - we don't invoke any method, because we don't want to cause any side effects at this point; we're interested only in what the world would look like if the given changes were to go into effect.
A special property value of 'moveInto' can be used to indicate that the object should be moved into another object for the test. In this case, the second element of the pair is not a value to be stored into the moveInto property, but instead the value is a new location for the object. We'll call the baseMoveInto method to move the object to the given new location.
In any case, after making the changes, we'll invoke the given callback function, which we'll call with no arguments.
Finally, on our way out, we'll restore the properties we changed to their original values. We once again do this without any side effects. Note that we restore the old values even if we exit with an exception.
whatIfHeldBy (func, actor) | thing.t[4143] |
withVisualSenseInfo (pov, senseInfo, methodToCall, [args]) | thing.t[6528] |