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))
def process(text): text = wsnormalise(text) text = text.replace(' ~', ' %(actor.sdesc)s') text = text.replace(' @', ' %(target.sdesc)s') return text