| // | |
| // | |
| // memory.t, a system for remembering memories and thoughts, based on | |
| // (and requiring) Suzanne Skinner's asktell.t | |
| // | |
| // Authored 1999 by dwmyers@my-deja.com. As the original asktell.t | |
| // was released as public domain, so is this modest contribution to | |
| // the original. | |
| // | |
| // Originally coded : 07/08/1999 | |
| // Modified : 07/11/1999 | |
| // | |
| // | |
| class memory : topic | |
| isclear = nil | |
| verDoRemember( actor ) = {} | |
| doRemember( actor ) = { " This memory is unclear to you. "; } | |
| unclearMsg = "You don't seem to recall that very clearly. " | |
| unknownMsg = "That doesn't seem to be something you recall. " | |
| ; | |
| class clearmemory : memory | |
| isclear = true | |
| doRemember( actor ) = | |
| { " This is a default memory. It is clear. "; } | |
| ; | |
| // | |
| // The only difference between the below and Suzanne's verbclasses | |
| // are: | |
| // (a) the disambiguating classes and the null answer classes. | |
| // (b) the fact a memory, once remembered, becomes a known topic. | |
| // | |
| class doMemoryVerb: deepverb | |
| validDoList(actor, prep, io) = (nil) | |
| validDo(actor, obj, seqno) = true | |
| doDefault(actor, prep, io) = (nil) | |
| // Allowing multiple objects can cause erroneous sdescs | |
| // (e.g. catchallNonMemory.sdesc) to get printed. | |
| rejectMultiDobj(prep) = { | |
| "You can't use multiple objects with that verb."; | |
| return true; | |
| } | |
| disambigDobj(actor, prep, io, verprop, wordlist, objlist, flaglist, | |
| numberWanted, isAmbiguous, silent) = | |
| { | |
| local i, len; | |
| local newlist = []; | |
| local unclearMemoriesFound = nil; | |
| len := length(objlist); | |
| for ( i :=1 ; i <= len; i++) { | |
| if (isclass(objlist[i], memory)) { | |
| objlist[i].known := true; | |
| if (objlist[i].isclear) | |
| newlist += objlist[i]; | |
| else | |
| unclearMemoriesFound := true; | |
| } | |
| } | |
| if (length(newlist) < 1) { | |
| if (unclearMemoriesFound) | |
| newlist += catchallFuzzyMemory; | |
| else | |
| newlist += catchallNonMemory; | |
| } | |
| return newlist; | |
| } | |
| ; | |
| catchallFuzzyMemory : clearmemory | |
| sdesc = "da Fuzzy memory " | |
| doRemember( actor ) = { memory.unclearMsg; } | |
| ; | |
| catchallNonMemory : clearmemory | |
| sdesc = " da Baaaaaaad memory " | |
| doRemember( actor ) = { memory.unknownMsg; } | |
| ; | |
| RememberVerb : doMemoryVerb | |
| verb = 'remember' 'recall' | |
| sdesc = "remember" | |
| doAction = 'Remember' | |
| ; | |
| // | |
| // Potential additions: a think verb, allowing the phrases | |
| // 'think about' 'meditate on'. Whether one wants it to respond | |
| // to topics or memories or some combination thereof is left as | |
| // an exercise to someone wishing to rationalize it in a game. | |
| // | |
Xet Storage Details
- Size:
- 2.55 kB
- Xet hash:
- a73173558b3a124af284aeb02c2386b98d67b71d789a29fe9d54b6a1cca5d7e2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.