projects
/
koperkapel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Display a serum on level1.
[koperkapel.git]
/
koperkapel
/
gamelib
/
items.py
1
# Item utilities
2
3
from ..serums import default_serums
4
5
6
def build_serum(item):
7
actor = default_serums.assemble(item["serum"])
8
return actor
9
10
11
ITEM_TYPES = {
12
"serum": build_serum,
13
}
14
15
16
def get_item(item):
17
item_type = item.pop("type")
18
game_pos = item.pop("pos")
19
actor = ITEM_TYPES[item_type](item)
20
actor.game_pos = game_pos
21
actor.anchor = (0, 0)
22
return actor