diff --git a/systems/items.py b/systems/items.py new file mode 100644 index 0000000..d05f31e --- /dev/null +++ b/systems/items.py @@ -0,0 +1,8 @@ +import data.cat + + +def handle_item(cat: data.cat.Cat, item): + match item: + case _: + pass + # TODO: MAKE THIS! diff --git a/systems/world.py b/systems/world.py index 3ed1685..3d00fa0 100644 --- a/systems/world.py +++ b/systems/world.py @@ -3,6 +3,7 @@ import systems.ui as ui import re import data.text import random +import systems.items def check_cat_name(name): @@ -152,12 +153,33 @@ def feed(cat): print(f"You feed {cat.name}, {cat.name} is happy") +def storage(cat: Cat): + while True: + item = ui.select( + "Please choose an item", + [ + ui.Choice(title=f"{name}: {amount}", value=name) + for name, amount in cat.inventory.items() + ] + + ["Back"], + ) + if item == "Back": + break + systems.items.item_menu(cat, item) + + def house(cat: Cat): print("Welcome to your house!") while True: match ui.select( "Please choose an option", - ["Check on your cat", "Pet your cat", "Feed your cat", "Leave your house"], + [ + "Check on your cat", + "Pet your cat", + "Feed your cat", + "Storage", + "Leave your house", + ], ): case "Check on your cat": print( @@ -168,5 +190,7 @@ def house(cat: Cat): pet(cat) case "Feed your cat": feed(cat) + case "Storage": + storage(cat) case "Leave your house": break