Distinguisherclass | disambig.t[25] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Each game object has a list of distinguishers. For most objects, the distinguisher list contains only BasicDistinguisher, since most game objects are unique and thus are inherently distinguishable from all other objects.
class
Distinguisher : object
basicDistinguisher
litUnlitDistinguisher
locationDistinguisher
nullDistinguisher
ownershipDistinguisher
canDistinguish
matchName
notePrompt
objInScope
canDistinguish (a, b) | disambig.t[27] |
matchName (obj, origTokens, adjustedTokens, matchList, fullMatchList) | disambig.t[79] |
Subclasses can override this to check for additional phrasing specific to the subclass. For example, the locational distinguisher checks for a match to the container or owner name, so that the player can simply respond to the question with the location name rather than typing in a whole locational phrase. Note that subclasses will usually want to inherit the default handling if they don't find a match to their own special phrasing, because the player might respond with a simple adjective pertaining to the base object even if there's some external distinguishing characteristic handled by the subclass.
notePrompt (lst) | disambig.t[42] |
By default, we do nothing. Some types of distinguishers might want to do something special here. For example, an ownership distinguisher might want to set pronoun antecedents based on the owners mentioned in the disambiguation prompt, so that the player's response can refer anaphorically to the nouns in the prompt.
objInScope (obj, matchList, fullMatchList) | disambig.t[55] |
Distinguishers that can use related objects to qualify the name should add those related objects to the scope by returning true here. For example, the locational distinguisher can use the location name as a qualifying phrase, so the location name is in scope.