From 2c94efb79689e8b2d3f55921bdf175c52c90c07d Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Sun, 2 Feb 2025 01:59:27 +0300 Subject: [PATCH] /apps/twnlua: add error on attempt to import twnapi.lua --- apps/twnlua/docgen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/twnlua/docgen.py b/apps/twnlua/docgen.py index 734443e..f7ef860 100755 --- a/apps/twnlua/docgen.py +++ b/apps/twnlua/docgen.py @@ -31,6 +31,8 @@ def to_lua_type_annot(typedesc): return "unknown" # raise BaseException("Unhandled type for annotation: %s" % typedesc) +print("error(\"townengine lua api file is not supposed to be imported!\")") + type_annotations, enum_annotations = {}, {} type_annotations["ctx"] = r"{ %s, udata: table }" % \ ', '.join("%s: %s" % (f["name"], to_lua_type_annot(f["type"])) for f in api["types"]["Context"]["fields"])