diff --git a/game/common/enums.py b/game/common/enums.py index 77f51340..0cd31962 100644 --- a/game/common/enums.py +++ b/game/common/enums.py @@ -11,7 +11,8 @@ class ObjectType: player = 2 game_board = 3 map_object = 4 - gun = 5 + item = 5 + gun = 6 class GunType: none = 0 diff --git a/game/common/gun.py b/game/common/items/gun.py similarity index 100% rename from game/common/gun.py rename to game/common/items/gun.py diff --git a/game/common/items/item.py b/game/common/items/item.py index 5f48bf8b..1e132fa7 100644 --- a/game/common/items/item.py +++ b/game/common/items/item.py @@ -3,6 +3,7 @@ class Item(MapObject): def __init__(self, coordinates, hitbox, health=None, count = 1): super().__init__(health, coordinates, hitbox, True) + self.object_type = ObjectType.item self.count = count def to_json(self): @@ -12,4 +13,4 @@ def to_json(self): def from_json(self, data): super().from_json(data) - self.count = data['count'] \ No newline at end of file + self.count = data['count']