From 42d76bce295890a828519c5089701ce707799c43 Mon Sep 17 00:00:00 2001 From: Cheri Dawn Date: Tue, 21 May 2024 23:18:51 +0300 Subject: [PATCH] more bugfixing --- setage.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) 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...")