summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asciifarm/client/display.py5
-rw-r--r--asciifarm/client/loaders.py6
2 files changed, 1 insertions, 10 deletions
diff --git a/asciifarm/client/display.py b/asciifarm/client/display.py
index 13e4f6a..2e8cc6c 100644
--- a/asciifarm/client/display.py
+++ b/asciifarm/client/display.py
@@ -43,10 +43,7 @@ class Display:
self.messageColours = charMap.get("msgcolours", {})
fname = os.path.join(os.path.dirname(__file__), "layout.xml")
- with open(fname) as f:
- layouttext = f.read()
-
- self.layout = Layout(layouttext)
+ self.layout = Layout.from_xml_file(fname)
self.layout.get("field").set_char_size(charMap.get("charwidth", 1))
self.screen = Screen()
diff --git a/asciifarm/client/loaders.py b/asciifarm/client/loaders.py
index d3d7ed1..9e32277 100644
--- a/asciifarm/client/loaders.py
+++ b/asciifarm/client/loaders.py
@@ -61,8 +61,6 @@ def loadCharmap(name):
writable = {}
default = None
charwidth = 1
- healthfull = None
- healthempty = None
alphabet = ""
msgcolours = {}
@@ -71,8 +69,6 @@ def loadCharmap(name):
writable.update(template.get("writable", {}))
default = template.get("default", default)
charwidth = template.get("charwidth", charwidth)
- healthfull = template.get("healthfull", healthfull)
- healthempty = template.get("healthempty", healthempty)
alphabet = template.get("alphabet", alphabet)
msgcolours.update(template.get("msgcolours", {}))
return {
@@ -80,8 +76,6 @@ def loadCharmap(name):
"writable": writable,
"default": default,
"charwidth": charwidth,
- "healthfull": healthfull,
- "healthempty": healthempty,
"alphabet": alphabet,
"msgcolours": msgcolours
}