Added sign

This commit is contained in:
2024-10-06 22:23:26 -05:00
parent b5d7b7e229
commit bf3912bb7f
15 changed files with 180 additions and 112 deletions

View File

@@ -96,6 +96,19 @@ void assetMapLoad(
entityInit(ent, type, map);
entityPositionSet(ent, x, y);
switch(type) {
case ENTITY_TYPE_SIGN:
assetjson_t *val = assetJsonGetObjectValue(jEnt, "text");
if(val != NULL) {
assertTrue(
val->type == ASSET_JSON_DATA_TYPE_STRING,
"assetMapLoad: Sign text is not a string!"
);
signTextSet(&ent->sign, val->string);
}
break;
}
// TODO: Parse any extra data.
}
}