some work done on character sheets
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user