From 2318000476a388a8446d292bf0e761519c2c95cb Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Sat, 16 May 2020 10:02:01 +0200 Subject: [PATCH] Added type fields to entities from JSON --- src/game/Map.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/Map.py b/src/game/Map.py index b5e75b3..07fe2c3 100644 --- a/src/game/Map.py +++ b/src/game/Map.py @@ -68,7 +68,8 @@ class Map: Statistics(entity["effect"]["hp"], entity["effect"]["hunger"], entity["effect"]["thirst"], - entity["effect"]["stamina"]))) + entity["effect"]["stamina"]), + entity["type"])) # Creates an interactable object elif "effect" in entity: actualEntities.append(Interactable(entity["name"] + ".png", @@ -77,7 +78,8 @@ class Map: Statistics(entity["effect"]["hp"], entity["effect"]["hunger"], entity["effect"]["thirst"], - entity["effect"]["stamina"]))) + entity["effect"]["stamina"]), + entity["type"])) # Creates plain entity else: actualEntities.append(Entity(entity["name"] + ".png",