Changeset 150
- Timestamp:
- 04/26/08 21:39:33 (2 years ago)
- Files:
-
- 1 modified
-
adventure/thing.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adventure/thing.py
r148 r150 73 73 action_obj = dict() 74 74 action_obj['name'] = action_element.localName 75 for i in ('target', 'count'): 76 action_obj[i] = action_element.getAttribute(i) 75 76 action_obj['target'] = action_element.getAttribute('target') 77 if action_element.has_key('count'): 78 action_obj['count'] = int(action_element.getAttribute('count')) 77 79 78 80 if action_element.firstChild and action_element.firstChild.data: … … 166 168 target = player 167 169 if target: 168 if not action ['count']or target.inventory.count(params) < action['count']:170 if not action.has_key('count') or target.inventory.count(params) < action['count']: 169 171 target.inventory.append(params) 170 172 # <use target="target">object</give>
