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:
parent
d7cdb72143
commit
e35a309732
1 changed files with 22 additions and 0 deletions
|
@ -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),
|
||||||
|
|
Loading…
Reference in a new issue