projects
/
koperkapel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5e352d
)
Gain items.
author
Simon Cross
<hodgestar@gmail.com>
Sat, 5 Mar 2016 19:20:17 +0000
(21:20 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Sat, 5 Mar 2016 19:20:17 +0000
(21:20 +0200)
koperkapel/gamelib/items.py
patch
|
blob
|
history
diff --git
a/koperkapel/gamelib/items.py
b/koperkapel/gamelib/items.py
index 9ef2ff61fbb51369f7aeb040a3018021be61f95f..af66dd991e194f5abfa73540c7cf9a02c1b720b4 100644
(file)
--- a/
koperkapel/gamelib/items.py
+++ b/
koperkapel/gamelib/items.py
@@
-14,7
+14,7
@@
def build_weapon(item):
return actor
-ITEM_
TYPE
S = {
+ITEM_
BUILDER
S = {
"serum": build_serum,
"weapon": build_weapon,
}
@@
-23,7
+23,9
@@
ITEM_TYPES = {
def get_item(item):
item_type = item.pop("type")
game_pos = tuple(item.pop("pos"))
- actor = ITEM_TYPES[item_type](item)
+ actor = ITEM_BUILDERS[item_type](item)
+ actor.item_type = item_type
+ actor.item_data = item
actor.game_pos = game_pos
actor.anchor = (0, 0)
return actor