mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
|
@ -10024,6 +10044,8 @@ static const struct {
|
|||
|
||||
luaRegister(setNaijaHeadTexture),
|
||||
|
||||
luaRegister(incrFlag),
|
||||
luaRegister(decrFlag),
|
||||
luaRegister(setFlag),
|
||||
luaRegister(getFlag),
|
||||
luaRegister(setStringFlag),
|
||||
|
|
Loading…
Reference in a new issue