The Four-Eyed Guide to TADS 3 by David Welbourn index
>lock >lock floor >lock floor with comic book |
lock floor matches VerbRule(Lock) which invokes LockAction. [TODO]
>lock bathroom door >lock diary with tiny key |
actions.t |
Short description |
---|---|
DefineTAction(Lock) |
Defines class LockAction: TAction |
DefineTIAction(LockWith) |
Defines class LockWithAction: TIAction |
Note: DefineTAction(name) and DefineTIAction(name) are macros defined in adv3.h. |
Note: TAction and TIAction are classes defined in action.t. |
extras.t |
Short description |
Keyring.iobjFor(LockWith) | |
Key.iobjFor(LockWith) | |
Key.keyNotPlausibleMsg | |
objects.t |
Short description |
Openable.dobjFor(Lock) Openable.dobjFor(LockWith) |
/* can't lock an openable that isn't closed */ dobjFor(Lock) { preCond { return nilToList(inherited()) + objClosed; } } dobjFor(LockWith) { preCond { return nilToList(inherited()) + objClosed; } } |
class Lockable: Linkable | |
Lockable.dobjFor(Lock) | dobjFor(Lock) { preCond = (nilToList(inherited()) + [touchObj]) verify() { /* if we're already locked, there's no point in locking us */ if (isLocked) illogicalNow(&alreadyLocked); } action() { /* make it locked */ makeLocked(true); /* make the default report */ defaultReport(&okayLock); } } |
Lockable.dobjFor(LockWith) | dobjFor(LockWith) { preCond = (nilToList(inherited()) + [touchObj]) verify() { illogical(&noKeyNeeded); } } |
class IndirectLockable: Lockable | |
IndirectLockable.dobjFor(Lock) IndirectLockable.dobjFor(LockWith) |
dobjFor(Lock) { check() { reportFailure(cannotLockMsg); exit; } } dobjFor(LockWith) asDobjFor(Lock) |
IndirectLockable.cannotLockMsg | |
class LockableWithKey: Lockable | |
LockableWithKey.dobjFor(Lock) | dobjFor(Lock) { preCond { /* * remove any objClosed from our precondition - since we * won't actually do any locking but will instead merely ask * for an indirect object, we don't want to apply the normal * closed precondition here */ return inherited() - objClosed; } verify() { /* if we're already locked, there's no point in locking us */ if (isLocked) illogicalNow(&alreadyLocked); } action() { /* ask for an indirect object to use as the key */ askForIobj(LockWith); } } |
LockableWithKey.dobjFor(LockWith) | dobjFor(LockWith) { verify() { /* if we're already locked, there's no point in locking us */ if (isLocked) illogicalNow(&alreadyLocked); } action() { /* perform the generic lock/unlock action processing */ lockOrUnlockAction(true); } } |
class LockableContainer: Lockable, OpenableContainer | |
class KeyedContainer: LockableWithKey, OpenableContainer | |
precond.t |
Short description |
objClosed | |
objHeld | |
touchObj | |
thing.t |
Short description |
Thing.dobjFor(Lock) | dobjFor(Lock) { preCond = [touchObj] verify() { illogical(&cannotLock); } } |
Thing.dobjFor(LockWith) | dobjFor(LockWith) { preCond = [touchObj] verify() { illogical(&cannotLock); } } |
Thing.iobjFor(LockWith) | iobjFor(LockWith) { preCond = [objHeld] verify() { illogical(&cannotLockWith); } } |
en_us\en_us.t |
Short description |
VerbRule(Lock) |
Associates the grammar "lock dobjList" with LockAction. |
VerbRule(LockWith) |
Associates the grammar "lock singleDobj with singleIobj" with LockWithAction. |
Note: VerbRule(tag) is a macro defined in en_us.h. |
Note: LockAction and LockWithAction are defined in actions.t (see above). |
en_us\msg_neu.t |
Short description |
libMessages.currentlyLocked | |
libMessages.currentlyUnlocked | |
libMessages.lockedMsg(obj) | 'locked' |
libMessages.unlockedMsg(obj) | 'unlocked' |
playerActionMessages.alreadyLocked | '{The dobj/he} {is} already locked. ' |
playerActionMessages.cannotLock | '{That dobj/he} {is} not something {you/he} can lock. ' |
playerActionMessages.cannotLockWith | '{The iobj/he} do{es}n\'t look suitable for locking that. ' |
playerActionMessages.currentlyLocked | '{It\'s dobj} currently locked. ' |
playerActionMessages.currentlyUnlocked | '{It\'s dobj} currently unlocked. ' |
playerActionMessages.foundKeyOnKeyring(ring, key) | '{You/he} tr{ies} each key on {the ring/him}, and find{s actor} that {the key/he} fit{s} the lock. ' |
playerActionMessages.foundNoKeyOnKeyring(ring) | '{You/he} tr{ies} each key on {the ring/him}, but {you/he} can\'t find anything that fits the lock. ' |
playerActionMessages.keyDoesNotFitLock | '{The iobj/he} does not fit the lock. ' |
playerActionMessages.noKeyNeeded | '{The dobj/he} do{es} not appear to take a key. ' |
playerActionMessages.okayLock | 'Locked. ' |
playerActionMessages.unknownHowToLock | 'It\'s not clear how to lock {the dobj/him}. ' |
npcActionMessages.okayLock | '{You/he} lock{s} {the dobj/him}. ' |
npcActionMessages.keyDoesNotFitLock | '{You/he} tr{ies} {the iobj/he}, but {it iobj/he} do{es} not fit the lock. ' |