From 730e3d604d412b464afcb9257f86e38c2c6f76ae Mon Sep 17 00:00:00 2001 From: Cheri Dawn Date: Thu, 23 May 2024 11:02:22 +0300 Subject: [PATCH] bugfixing --- setage.py | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/setage.py b/setage.py index c42003e..dd9ae8d 100755 --- a/setage.py +++ b/setage.py @@ -11,7 +11,7 @@ from base64 import b64decode __author__ = "Cheri Dawn" __copyright__ = "Copyright 2024, Cheri Dawn" __license__ = "GPL-3.0-only" -__version__ = "0.4.0" +__version__ = "0.4.0.1" __maintainer__ = "Cheri Dawn" __status__ = "Prototype" @@ -143,28 +143,20 @@ class SetageShell(Cmd): if "items" not in cur_room and "interactables" not in cur_room: print("> I don't see anything to examine here...") return - no_items = False if "items" in cur_room: - if len(cur_room["items"]) == 0: - no_items = True - no_interactables = False + 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...") if "interactables" in cur_room: - if len(cur_room["interactables"]) == 0: - no_interactables = True - if no_items and no_interactables: - print("> I don't see anything to examine here...") - 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 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...") + 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...") else: