Changeset 143
Legend:
- Unmodified
- Added
- Removed
-
adventure/place.py
r140 r143 113 113 '\n******\n\n\n\n**********\n' 114 114 'Entering %s\n**********' 115 '\n\n%s\n' % (self.name.capitalize(), 116 self.description)) 115 '\n\n%s\nYou can go %s.' % (self.name.capitalize(), 116 self.description, 117 ', '.join(self.exits.keys()))) 117 118 118 119 # Trigger on-enter events -
adventure/thing.py
r135 r143 73 73 action_obj = dict() 74 74 action_obj['name'] = action_element.localName 75 action_obj['target'] = action_element.getAttribute('target') 75 for i in ('target', 'count'): 76 action_obj[i] = action_element.getAttribute(i) 77 76 78 if action_element.firstChild and action_element.firstChild.data: 77 79 action_obj['params'] = action_element.firstChild.data.strip() … … 161 163 target = player 162 164 if target: 163 target.inventory.append(params) 165 if action['count'] or target.inventory.count(params) < count: 166 target.inventory.append(params) 164 167 # <use target="target">object</give> 165 168 elif action['name'] == 'use': -
adventure/tower/tower.xml
r131 r143 172 172 <command signal="Spider_take_the_key"> 173 173 <narration>The kind spider helps you to get the key</narration> 174 <give >wizard's key</give>174 <give count="1">wizard's key</give> 175 175 </command> 176 176 </commands> -
adventure/world.dtd
r132 r143 60 60 <!ELEMENT give (#EMPTY)> 61 61 <!ATTLIST give 62 target CDATA #IMPLIED> 62 target CDATA #IMPLIED 63 count CDATA #IMPLIED> 63 64 64 65 <!ELEMENT signal (#PCDATA)> -
adventure/world.py
r135 r143 273 273 274 274 def handle_message(self, msg): 275 """ Handle message stanzas coming to the room"""275 """ Handle message stanzas coming to the MUC """ 276 276 player = None 277 277
