From cb524954720c2c5e4f7917004293973bb1cfbe19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Sat, 19 Jun 2021 21:55:08 +0200 Subject: [PATCH] Use GameController::ClearSim in sim.clearSim Unlike Simulation::clear_sim, this also resets the save info in GameModel, i.e. is equivalent to pressing the 'Erase everything' button. --- src/lua/LuaScriptInterface.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lua/LuaScriptInterface.cpp b/src/lua/LuaScriptInterface.cpp index 8c2e37299..ed135e7ad 100644 --- a/src/lua/LuaScriptInterface.cpp +++ b/src/lua/LuaScriptInterface.cpp @@ -1669,8 +1669,7 @@ int LuaScriptInterface::simulation_decoColor(lua_State * l) int LuaScriptInterface::simulation_clearSim(lua_State * l) { - luacon_sim->clear_sim(); - Client::Ref().ClearAuthorInfo(); + luacon_controller->ClearSim(); return 0; }