mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-03-21 23:00:03 +01:00
add sim.takeSnapshot lua function
This commit is contained in:
parent
be786d85a7
commit
c34b54d974
@ -765,6 +765,7 @@ void LuaScriptInterface::initSimulationAPI()
|
||||
{"neighbors", simulation_neighbours},
|
||||
{"framerender", simulation_framerender},
|
||||
{"gspeed", simulation_gspeed},
|
||||
{"takeSnapshot", simulation_takeSnapshot},
|
||||
{NULL, NULL}
|
||||
};
|
||||
luaL_register(l, "simulation", simulationAPIMethods);
|
||||
@ -2143,6 +2144,12 @@ int LuaScriptInterface::simulation_gspeed(lua_State * l)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LuaScriptInterface::simulation_takeSnapshot(lua_State * l)
|
||||
{
|
||||
luacon_controller->HistorySnapshot();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//// Begin Renderer API
|
||||
|
||||
void LuaScriptInterface::initRendererAPI()
|
||||
|
@ -108,6 +108,7 @@ class LuaScriptInterface: public CommandInterface
|
||||
static int simulation_neighbours(lua_State * l);
|
||||
static int simulation_framerender(lua_State * l);
|
||||
static int simulation_gspeed(lua_State * l);
|
||||
static int simulation_takeSnapshot(lua_State *l);
|
||||
|
||||
//Renderer
|
||||
void initRendererAPI();
|
||||
|
Loading…
x
Reference in New Issue
Block a user