diff --git a/tetra/items.py b/tetra/items.py index 3566a19..e059c68 100644 --- a/tetra/items.py +++ b/tetra/items.py @@ -9,7 +9,7 @@ def __init__(self, itempath): jsonobj = json.loads(open(itempath, encoding="utf-8").read()) self.name = jsonobj["name"] self.desc = jsonobj["desc"] - self.char = jsonobj.get("char", None) + self.char = jsonobj.get("char", "?") self.media_path = jsonobj.get("media_path", None) self.need_input = jsonobj["need_input"] self.answerhash = jsonobj.get("answerhash", None) diff --git a/tetra/maps.py b/tetra/maps.py index 346cc79..1c2f4b8 100644 --- a/tetra/maps.py +++ b/tetra/maps.py @@ -63,11 +63,11 @@ def render(self, settings): def place_item(self, item_name, game): if not (item_name in self.items.values()): coord = list(self.items_ref.keys())[list(self.items_ref.values()).index(item_name)] - if(game.item(item_name).char != None): self.fmt[coord] = game.item(item_name).char + self.fmt[coord] = game.item(item_name).char self.items[tuple(coord)] = self.items_ref[tuple(coord)] def remove_item(self, item_name, game): - if(item_name in self.items.values): + if(item_name in self.items.values()): coord = list(self.items_ref.keys())[list(self.items_ref.values()).index(item_name)] self.fmt[coord] = self.fmt_ref[coord] self.items.pop(tuple(coord))