Changeset 143 for adventure/thing.py
- Timestamp:
- 04/26/08 19:31:59 (2 years ago)
- Files:
-
- 1 modified
-
adventure/thing.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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':
