Added type fields to entities from JSON
This commit is contained in:
parent
454e0ac87d
commit
2318000476
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user