SensoryEmanation class | objects.t[144]

A sensory emanation. This is an intangible object that represents a sound, odor, or the like.

`class SensoryEmanation : Intangible`

Superclass Tree (in declaration order)

`SensoryEmanation`
`Intangible`
`Thing`
`VocabObject`
`object`

Subclass Tree

`SensoryEmanation`
`Noise`
`SimpleNoise`
`Odor`
`SimpleOdor`

Global Objects

(none)

Summary of Properties

`descWithoutSource descWithSource displayCount displaySchedule hereWithoutSource hereWithSource isAmbient isEmanating nextDisplayTime noiseList noLongerHere odorList scheduleIndex sourceDesc`

Inherited from `Intangible` :
`isListed isListedInContents isListedInInventory sightPresence smellPresence soundPresence touchPresence`

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 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 sightSize smellSize soundSize specialContentsLister specialDesc specialDescBeforeContents specialDescListWith specialDescOrder specialNominalRoomPartLocation suppressAutoSeen takeFromNotInMessage theDisambigName theName theNamePossNoun tmpAmbient_ tmpAmbientFill_ tmpAmbientWithin_ tmpFillMedium_ tmpObstructor_ tmpObstructorWithin_ tmpPathIsIn_ tmpTrans_ tmpTransWithin_ 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

`calcNextDisplayTime cannotSeeSource canSeeSource continueEmanation dobjFor(Examine) emanationHereDesc endEmanation getSource noteDisplay noteIndirectDisplay noteSenseChanges noteSenseChangesFor startEmanation`

Inherited from `Intangible` :
`dobjFor(Default) hideFromAll hideFromDefault iobjFor(Default)`

Inherited from `Thing` :
`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(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 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`

Properties

`descWithoutSource` | `objects.t[161]`

no description available

`descWithSource` | `objects.t[160]`

our description, with and without being able to see the source

`displayCount` | `objects.t[489]`

no description available

`displaySchedule` | `objects.t[246]`

The schedule for displaying messages about the emanation. This is a list of intervals between messages, in game clock times. When the player character can repeatedly sense this emanation for multiple consecutive turns, we'll use this schedule to display messages periodically about the noise/odor/etc.

Human sensory perception tends to be "edge-sensitive," which means that we tend to perceive sensory input most acutely when something changes. When a sound or odor is continually present without variation for an extended period, it tends to fade into the background of our awareness, so that even though it remains audible, we gradually stop noticing it. This message display schedule mechanism is meant to approximate this perceptual model by allowing the sensory emanation to specify how noticeable the emanation remains during continuous exposure. Typically, a continuous emanation would have relatively frequent messages (every two turns, say) for a couple of iterations, then would switch to infrequent messages. Emanations that are analogous to white noise would probably not be mentioned at all after the first couple of messages, because the human senses are especially given to treating such input as background.

We use this list by applying each interval in the list once and then moving to the next entry in the list. The first entry in the list is the interval between first sensing the emanation and displaying the first "still here" message. When we reach the end of the list, we simply repeat the last interval in the list indefinitely. If the last entry in the list is nil, though, we simply never produce another message.

`hereWithoutSource` | `objects.t[194]`

no description available

`hereWithSource` | `objects.t[193]`

Our "I am here" message, with and without being able to see the source. These are displayed in room descriptions, inventory descriptions, and by the daemon that schedules background messages for sensory emanations.

If different messages are desired as the emanation is mentioned repeatedly while the emanation remains continuously within sense range of the player character ("A phone is ringing", "The phone is still ringing", etc), you can do one of two things. The easier way is to use a Script object; each time we need to show a message, we'll invoke the script. The other way, which is more manual but gives you greater control, is to write a method that checks the displayCount property of self to determine which iteration of the message is being shown. displayCount is set to 1 the first time a message is displayed for the object when the object can first be sensed, and is incremented each we invoke one of these display routines. Note that displayCount resets to nil when the object leaves sense scope, so the sequence of messages will automatically start over each time the object comes back into scope.

The manual way (writing a method that checks the displayCount) might be desirable if you want the emanation to fade into the background gradually as the player character stays in the same location repeatedly. This mimics human perception: we notice a noise or odor most when we first hear it, but if it continues for an extended period without changing, we'll eventually stop noticing it.

`isAmbient` | `objects.t[213]`

Flag: I'm an "ambient" emanation. This means we essentially are part of the background, and are not worth mentioning in our own right. If this is set to true, then we won't mention this emanation at all when it first becomes reachable in its sense. This should be used for background noises and the like: we won't ever make an unsolicited mention of them, but they'll still show up in explicit 'listen' commands and so on.

`isEmanating` | `objects.t[149]`

Are we currently emanating our sensory information? This can be used as an on/off switch to control when we're active.

`nextDisplayTime` | `objects.t[486]`

no description available

`noiseList` | `objects.t[487]`

no description available

`noLongerHere` | `objects.t[202]`

A message to display when the emanation ceases to be within sense range. In most cases, this displays nothing at all, but some emanations might want to note explicitly when the noise/etc stops.

`odorList` | `objects.t[488]`

no description available

`scheduleIndex` | `objects.t[485]`

Internal counters that keep track of our display scheduling. scheduleIndex is the index in the displaySchedule list of the interval we're waiting to expire; nextDisplayTime is the game clock time of our next display. noiseList and odorList are lists of senseInfo entries for the sound and smell senses, respectively, indicating which objects were within sense range on the last turn. displayCount is the number of times in a row we've displayed a message already.

`sourceDesc` | `objects.t[157]`

The description shown when the *source* is examined (with "listen to", "smell", or whatever verb is appropriate to the type of sense the subclass involves). This will also be appended to the regular "examine" description, if we're not marked as ambient.

Methods

`calcNextDisplayTime ( )` | `objects.t[440]`

Calculate our next display time. The caller must set our scheduleIndex to the correct index prior to calling this.

`cannotSeeSource (obs)` | `objects.t[292]`

Show a message describing that we cannot see the source of this emanation because the given obstructor is in the way. This should be overridden for each subclass.

`canSeeSource (actor)` | `objects.t[306]`

determine if our source is apparent and visible

`continueEmanation ( )` | `objects.t[394]`

Continue the emanation. This is called on each turn in which the emanation remains continuously within sense range of the player character.

`dobjFor(Examine)`OVERRIDDEN | `objects.t[595]`

Examine the sensory emanation. We'll show our descWithSource or descWithoutSource, according to whether or not we can see the source object.

`emanationHereDesc ( )` | `objects.t[254]`

Show our "I am here" description. This is the description shown as part of our room's description. We show our hereWithSource or hereWithoutSource message, according to whether or not we can see the source object.

`endEmanation ( )` | `objects.t[423]`

End the emanation. This is called when the player character can no longer sense the emanation.

`getSource ( )` | `objects.t[303]`

Get the source of the noise/odor/whatever, as perceived by the current actor. This is the object we appear to be coming from. By default, an emanation is generated by its direct container, and by default this is apparent to actors, so we'll simply return our direct container.

If the source is not apparent, this should simply return nil.

`noteDisplay ( )` | `objects.t[333]`

Note that we're displaying a message about the emanation. This method should be called any time a message about the emanation is displayed, either by an explicit action or by our background daemon.

We'll adjust our next display time so that we wait the full interval at the current point in the display schedule before we show any background message about this object. Note we do not advance through the schedule list; instead, we merely delay any further message by the interval at the current point in the schedule list.

`noteIndirectDisplay ( )` | `objects.t[355]`

Note an indirect message about the emanation. This can be used when we don't actually display a message ourselves, but another object (usually our source object) describes the emanation; for example, if our source object mentions the noise it's making when it is examined, it should call this method to let us know we have been described indirectly. This method advances our next display time, just as noteDisplay() does, but this method doesn't count the display as a direct display.

`noteSenseChanges ( )` | `objects.t[497]`

Class method implementing the sensory change daemon. This runs on each turn to check for changes in the set of objects the player can hear and smell, and to generate "still here" messages for objects continuously within sense range for multiple turns.

`noteSenseChangesFor (sense, listProp, sub)` | `objects.t[519]`

Note sense changes for a particular sense. 'listProp' is the property of SensoryEmanation giving the list of SenseInfo entries for the sense on the previous turn. 'sub' is a subclass of ours (such as Noise) giving the type of sensory emanation used for this sense.

`startEmanation ( )` | `objects.t[368]`

Begin the emanation. This is called from the sense change daemon when the item first becomes noticeable to the player character - for example, when the player character first enters the room containing the emanation, or when the emanation is first activated.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3