introduction of items

This commit is contained in:
2025-07-31 11:28:09 -07:00
parent 68ef7c1591
commit eb9e9476ef
10 changed files with 133 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ import subprocess
import flask
from . import core
from . import core, items
def generate_flavor_text():
if core.desktop_mode:
@@ -45,7 +45,11 @@ def tick():
case 1: # FLAVOR
result["log"] = generate_flavor_text()
case 10: # ENCHUMAN
result["items"] = {} # TODO: implement items
result["items"] = {
# TODO: read ranges from XML rule files
"food": [items.TickItem("food", random.uniform(0.0, 20.0), "humans")],
"shinies": [items.TickItem("food", random.uniform(0.0, 20.0), "humans")]
}
case _:
core.log.warning("undefined tick: {0}".format(result["event_type"]))