1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00

Revert small part of 8472718fb7

Re-add incrFlag(), decrFlag() Lua functions
This commit is contained in:
fgenesis 2017-01-20 00:38:04 +01:00
parent d7cdb72143
commit e35a309732

View file

@ -5030,6 +5030,26 @@ luaFunc(getWallNormal)
luaReturnVec2(n.x, n.y); luaReturnVec2(n.x, n.y);
} }
luaFunc(incrFlag)
{
std::string f = getString(L, 1);
int v = 1;
if (lua_isnumber(L, 2))
v = lua_tointeger(L, 2);
dsq->continuity.setFlag(f, dsq->continuity.getFlag(f)+v);
luaReturnNil();
}
luaFunc(decrFlag)
{
std::string f = getString(L, 1);
int v = 1;
if (lua_isnumber(L, 2))
v = lua_tointeger(L, 2);
dsq->continuity.setFlag(f, dsq->continuity.getFlag(f)-v);
luaReturnNil();
}
luaFunc(setFlag) luaFunc(setFlag)
{ {
@ -10024,6 +10044,8 @@ static const struct {
luaRegister(setNaijaHeadTexture), luaRegister(setNaijaHeadTexture),
luaRegister(incrFlag),
luaRegister(decrFlag),
luaRegister(setFlag), luaRegister(setFlag),
luaRegister(getFlag), luaRegister(getFlag),
luaRegister(setStringFlag), luaRegister(setStringFlag),