예제 #1
0
 def realHelp(actor, text, info):
     #maybe TODO: implement some sort of adjective search thing. Or perhaps
     #a full-text search.
     text = wsnormalise(text.lower())
     if text in hdict:
         actor.receiveEvent(HelpEvent(text, hdict[text]))
     else:
         actor.receiveEvent(HelpNotFoundEvent(text))
예제 #2
0
 def realHelp(actor, text, info):
     #maybe TODO: implement some sort of adjective search thing. Or perhaps
     #a full-text search.
     text = wsnormalise(text.lower())
     if text in hdict:
         actor.receiveEvent(HelpEvent(text, hdict[text]))
     else:
         actor.receiveEvent(HelpNotFoundEvent(text))
예제 #3
0
파일: emote.py 프로젝트: ViKingIX/grailmud
def process(text):
    text = wsnormalise(text)
    text = text.replace(' ~', ' %(actor.sdesc)s')
    text = text.replace(' @', ' %(target.sdesc)s')
    return text