1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-18 20:39:27 +00:00

Add Lua func entity_getSkeletalName() and do not abort when a skin file is not found. Also warn on missing skeletal file.

This commit is contained in:
fgenesis 2013-02-27 01:54:38 +01:00
commit 23e0707c5b
2 changed files with 12 additions and 1 deletions

View file

@ -3369,6 +3369,15 @@ luaFunc(entity_loadSkin)
luaReturnNil();
}
luaFunc(entity_getSkeletalName)
{
Entity *e = entity(L);
const char *s = "";
if (e && e->skeletalSprite.isLoaded())
s = e->skeletalSprite.filenameLoaded.c_str();
luaReturnStr(s);
}
luaFunc(entity_idle)
{
Entity *e = entity(L);
@ -7652,6 +7661,7 @@ static const struct {
luaRegister(entity_warpSegments),
luaRegister(entity_initSkeletal),
luaRegister(entity_loadSkin),
luaRegister(entity_getSkeletalName),
luaRegister(entity_initStrands),
luaRegister(entity_hurtTarget),