3 from ..serums import default_serums
4 from ..weapons import default_weapons
5 from ..vehicles.base import Vehicle
9 actor = default_serums.assemble(item["serum"])
13 def build_weapon(item):
14 actor = default_weapons.assemble(item["weapon"])
17 def build_vehicle(item):
18 actor = Vehicle.by_type(item["vehicle"]).get_avatar(dead=True)
24 "weapon": build_weapon,
25 "vehicle": build_vehicle,
30 item_type = item.pop("type")
31 game_pos = tuple(item.pop("pos"))
32 actor = ITEM_BUILDERS[item_type](item)
33 actor.item_type = item_type
34 actor.item_data = item
35 actor.game_pos = game_pos
40 def clone_old_item(item, **new_data):
42 "type": item.item_type,
45 new_item.update(item.item_data)
46 new_item.update(new_data)
47 return get_item(new_item)
50 def create_new_item(item_type, pos, **kwd):
56 return get_item(new_item)