diff --git a/flint/interface.py b/flint/interface.py index 8ace6d5..781e4fe 100644 --- a/flint/interface.py +++ b/flint/interface.py @@ -8,6 +8,7 @@ Interface-related functions, such as routines for translating RDL. """ import xml.etree.ElementTree as xml +from . import paths, cached def rdl_to_html(rdl: str) -> str: @@ -34,6 +35,11 @@ def html_to_rdl(html: str) -> str: return result +@cached +def get_constants() -> dict: + path = paths.inis["constants"] + return dict(ini.parse(path)) + # A lookup table mapping RDL (Render Display List) tags to HTML(4). Freelancer, to my eternal horror, uses these for # formatting for strings inside these resource DLLs. Based on work by adoxa and cshake. # More information can be found in this thread: