/apps/twnlua: add error on attempt to import twnapi.lua
This commit is contained in:
parent
11ec35bc8a
commit
2c94efb796
@ -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"])
|
||||
|
Loading…
Reference in New Issue
Block a user