fix(lua): Add missing switch and countdownStart properties (#2979)
Add the switch and countdownStart properties to the getTimer and setTimer Lua functions.
This commit is contained in:
@@ -292,6 +292,8 @@ static int luaModelGetTimer(lua_State *L)
|
|||||||
lua_pushtableinteger(L, "persistent", timer.persistent);
|
lua_pushtableinteger(L, "persistent", timer.persistent);
|
||||||
lua_pushtablenstring(L, "name", timer.name);
|
lua_pushtablenstring(L, "name", timer.name);
|
||||||
lua_pushtableboolean(L, "showElapsed", timer.showElapsed);
|
lua_pushtableboolean(L, "showElapsed", timer.showElapsed);
|
||||||
|
lua_pushtableinteger(L, "switch", timer.swtch);
|
||||||
|
lua_pushtableinteger(L, "countdownStart", timer.countdownStart);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
@@ -348,6 +350,12 @@ static int luaModelSetTimer(lua_State *L)
|
|||||||
else if (!strcmp(key, "showElapsed")) {
|
else if (!strcmp(key, "showElapsed")) {
|
||||||
timer.showElapsed = lua_toboolean(L, -1);
|
timer.showElapsed = lua_toboolean(L, -1);
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(key, "switch")) {
|
||||||
|
timer.swtch = luaL_checkinteger(L, -1);
|
||||||
|
}
|
||||||
|
else if (!strcmp(key, "countdownStart")) {
|
||||||
|
timer.countdownStart = luaL_checkinteger(L, -1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
storageDirty(EE_MODEL);
|
storageDirty(EE_MODEL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user