Keyring class | extras.t[1277]

Keyring - a place to stash keys

Keyrings have some special properties:

- A keyring is a bag of holding with special affinity for keys.

- A keyring can only contain keys.

- Keys are considered to be on the outside of the ring, so a key can be used even if attached to the keyring (in other words, if the ring itself is held, a key attached to the ring is also considered held).

- If an actor in possession of a keyring executes an "unlock" command without specifying what key to use, we will automatically test each key on the ring to find the one that works.

- When an actor takes one of our keys, and the actor is in possession of this keyring, we'll automatically attach the key to the keyring immediately.

`class Keyring : BagOfHolding Thing`

Superclass Tree (in declaration order)

`Keyring`
`BagOfHolding`
`object`
`Thing`
`VocabObject`
`object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

`descContentsLister inlineContentsLister moveAfterTake`

``

Inherited from `Thing` :
`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 described disambigEquivName disambigName distantDesc distantInitSpecialDesc distantSpecialDesc distinguishers dummyName effectiveFollowLocation equivalenceKey equivalentGrouper equivalentGrouperClass equivalentGrouperTable esEndingPat explicitVisualSenseInfo getState globalParamName holdingIndex iesEndingPat initDesc initNominalRoomPartLocation initSpecialDesc 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`

Summary of Methods

`affinityFor afterAction announceDefaultObject appendHeldContents beforeAction dobjFor(Take) findWorkingKey getLooseKeys iobjFor(AttachTo) iobjFor(DetachFrom) iobjFor(LockWith) iobjFor(PutOn) iobjFor(UnlockWith) isMyKey tryPuttingObjInBag`

Inherited from `BagOfHolding` :
`getBagsOfHolding`

Inherited from `Thing` :
`acceptCommand addAllContents addDirectConnections addObjectNotifyItem addToContents addToSenseInfoTable adjustLookAroundTable adjustThrowDestination afterTravel allContents aNameFrom aNameObj aNameOwnerLoc atmosphereList baseMoveInto basicExamine basicExamineFeel basicExamineListen basicExamineSmell basicExamineTaste 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(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 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(AttackWith) iobjFor(BurnWith) iobjFor(CleanWith) iobjFor(CutWith) iobjFor(DigWith) iobjFor(FastenTo) iobjFor(GiveTo) iobjFor(MoveWith) iobjFor(PlugInto) iobjFor(PourInto) iobjFor(PourOnto) iobjFor(PutBehind) iobjFor(PutIn) iobjFor(PutUnder) iobjFor(ScrewWith) iobjFor(ShowTo) iobjFor(TakeFrom) iobjFor(ThrowAt) iobjFor(ThrowTo) iobjFor(TurnWith) iobjFor(UnfastenFrom) 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`

Properties

`descContentsLister` OVERRIDDEN | `extras.t[1282]`

lister for showing our contents as part of "examine"

`inlineContentsLister` OVERRIDDEN | `extras.t[1279]`

lister for showing our contents in-line as part of a list entry

`moveAfterTake` | `extras.t[1419]`

flag: consider moving to keyring after this "take" action

Methods

`affinityFor (obj)`OVERRIDDEN | `extras.t[1299]`

we have high affinity for our keys

`afterAction ( )`OVERRIDDEN | `extras.t[1422]`

receive notification after an action

`announceDefaultObject (whichObj, action, resolvedAllObjects)`OVERRIDDEN | `extras.t[1515]`

Announce myself as a default object for an action.

Do not announce a keyring as a default for "lock with" or "unlock with". Although we can use a keyring as the indirect object of a lock/unlock command, we don't actually do the unlocking with the keyring; so, when we're chosen as the default, suppress the announcement, since it would imply that we're being used to lock or unlock something.

`appendHeldContents (vec)`OVERRIDDEN | `extras.t[1499]`

Append my directly-held contents to a vector when I'm directly held. We consider all of the keys on the keyring to be effectively at the same containment level as the keyring, so if the keyring is held, so are its attached keys.

`beforeAction ( )`OVERRIDDEN | `extras.t[1395]`

receive notification before an action

`dobjFor(Take)`OVERRIDDEN | `extras.t[1319]`

on taking the keyring, attach any loose keys

`findWorkingKey (lock)` | `extras.t[1469]`

find among our keys a key that works the direct object

`getLooseKeys (actor)` | `extras.t[1351]`

Get the loose keys in the given actor's possession. On taking the keyring, we'll attach these loose keys to the keyring automatically. By default, we return any keys the actor is directly holding.

`iobjFor(AttachTo)`OVERRIDDEN | `extras.t[1389]`

treat "attach x to keyring" as "put x on keyring"

`iobjFor(DetachFrom)`OVERRIDDEN | `extras.t[1392]`

treat "detach x from keyring" as "take x from keyring"

`iobjFor(LockWith)`OVERRIDDEN | `extras.t[1534]`

Allow locking or unlocking an object with a keyring. This will automatically try each key on the keyring to see if it fits the lock.

`iobjFor(PutOn)`OVERRIDDEN | `extras.t[1354]`

allow putting a key on the keyring

`iobjFor(UnlockWith)`OVERRIDDEN | `extras.t[1609]`

Try finding a working key. If we find one, replace the command with 'lock <lock> with <key>, so that we have the full effect of the 'lock with' command using the key itself.

`isMyKey (key)` | `extras.t[1292]`

Determine if a key fits our keyring. By default, we will accept any object of class Key. However, subclasses might want to override this to associate particular keys with particular keyrings rather than having a single generic keyring. To allow only particular keys onto this keyring, override this routine to return true only for the desired keys.

`tryPuttingObjInBag (target)` | `extras.t[1312]`

implicitly put a key on the keyring

TADS 3 Library Manual
Generated on 8/21/2012 from TADS version 3.1.2