some work done on character sheets

This commit is contained in:
2025-08-22 13:01:58 -07:00
parent 5c3d34aafa
commit 621d65b9e5
10 changed files with 165 additions and 5 deletions

View File

@@ -22,7 +22,8 @@ app = flask.Flask("seagull-game", root_path=path_appdir)
orig_url_for = app.url_for
xml_namespaces = {
"items": "seagull:rules/items"
"items": "seagull:rules/items",
"upgrades": "seagull:rules/upgrades"
}
#REDIS_HOST="stub-implementation.example.net"
@@ -45,6 +46,13 @@ app.url_for = url_for_override
base_context = {}
base_context_live = False
@app.route("/dialog/<dialog>")
def render_dialog(dialog):
if os.path.exists(path_appdir / f"templates/{dialog}.j2"):
return flask.render_template(f"{dialog}.j2")
else:
return "", 404
def render_base_context():
global base_context
global base_context_live

View File

@@ -6,9 +6,6 @@ import lxml.etree as xmltree
from . import core
# NOTE: due to how XML libraries handle namespaces, you have to prepend "{seagull:rules/items}" to every tag value
# this is merely the price you pay for editor autocompletions
valid_resources = [
"food", "shinies", "psi" # early game
]