Updated text parsing and commands

This commit is contained in:
kansaigaijin
2025-07-13 20:49:41 +12:00
parent 54db0c8e6f
commit 56fba22217
2 changed files with 3 additions and 4 deletions

View File

@@ -406,9 +406,8 @@ def parse(input_text):
command = "take" command = "take"
object1 = " ".join(words[2:]) object1 = " ".join(words[2:])
return command, object1 return command, object1
elif words[0] == "look" and words[1] == "around" and len(words) > 2: elif words[0] == "look" and words[1] == "around" and len(words) == 2:
command = "look" command = "look_around"
object1 = " ".join(words[2:])
return command, object1 return command, object1
# Single-word commands # Single-word commands

View File

@@ -296,7 +296,7 @@ def main_game_loop():
get_instructions() get_instructions()
elif command == "scene": elif command == "scene":
game_engine.display_current_scene() game_engine.display_current_scene()
elif command == "look": elif command == "look_around":
game_engine.look_around() game_engine.look_around()
elif command == "inventory": elif command == "inventory":
game_engine.player.inventory.current_inventory() game_engine.player.inventory.current_inventory()