diff --git a/setage.py b/setage.py index 7e16d29..96b0843 100755 --- a/setage.py +++ b/setage.py @@ -123,18 +123,20 @@ class SetageShell(Cmd): print(manifest["items"][arg]["examine"]) else: print("It doesn't seem to be all that interesting...") - elif arg in cur_room["items"].keys(): - manifest["items"][arg]["hidden"] = False - if "examine" in manifest["items"][arg]: - print(manifest["items"][arg]["examine"]) - else: - print("It doesn't seem to be all that interesting...") - elif arg in cur_room["interactables"].keys(): - cur_room["interactables"][arg]["hidden"] = False - if "examine" in cur_room["interactables"][arg]: - print(cur_room["interactables"][arg]["examine"]) - else: - print("It doesn't seem to be all that interesting...") + elif "items" in cur_room: + if arg in cur_room["items"].keys(): + manifest["items"][arg]["hidden"] = False + if "examine" in manifest["items"][arg]: + print(manifest["items"][arg]["examine"]) + else: + print("It doesn't seem to be all that interesting...") + elif "interactables" in cur_room: + if arg in cur_room["interactables"].keys(): + cur_room["interactables"][arg]["hidden"] = False + if "examine" in cur_room["interactables"][arg]: + print(cur_room["interactables"][arg]["examine"]) + else: + print("It doesn't seem to be all that interesting...") else: print("> I don't see anything like that...")