Zone 1 npcs

This commit is contained in:
2024-02-29 13:20:18 -08:00
parent 1a89e4f3b6
commit 0a3a8cb8ab
7 changed files with 288 additions and 19 deletions

View File

@ -131,13 +131,13 @@ def load_mapdata(fname_ldtk):
def format_field_value(ty, val):
if ty == "Bool":
return "true" if val else "false", "scalar", "bool"
return ("true" if val else "false"), "scalar", "bool"
elif ty == "Int":
return str(val), "scalar", "sys_i32"
elif ty == "String":
if val is None:
return "NULL", "scalar", "const char*"
return json.dumps(wrap(val)), "scalar" # this is close enough to being right in C
return json.dumps(wrap(val)), "scalar", "const char*" # this is close enough to being right in C
elif ty == "Array<Int>":
return [format_field_value("Int", i)[0] for i in val], "array", "sys_i32"
elif ty == "Array<String>":