summaryrefslogtreecommitdiff
path: root/src/cat
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-07-25 23:43:25 (GMT)
committer jacob1 <jfu614@gmail.com>2013-07-25 23:43:25 (GMT)
commitbfc1cf99cabd5b75f70a8de39cc4b00c408fc6b8 (patch)
tree644bbe8435b3f31c738325cf55419860dd9fa6f4 /src/cat
parentbeff3db8d291b00b47fc13a1b936fa4419e3d78d (diff)
downloadpowder-bfc1cf99cabd5b75f70a8de39cc4b00c408fc6b8.zip
powder-bfc1cf99cabd5b75f70a8de39cc4b00c408fc6b8.tar.gz
instant save option option, hold ctrl when clicking a save in the save preview to skip the entire preview and not load the comments
Diffstat (limited to 'src/cat')
-rw-r--r--src/cat/LuaScriptInterface.cpp5
-rw-r--r--src/cat/TPTScriptInterface.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index 4bea8ed..d1319f7 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -1378,8 +1378,9 @@ int LuaScriptInterface::simulation_loadStamp(lua_State * l)
int LuaScriptInterface::simulation_loadSave(lua_State * l)
{
int saveID = luaL_optint(l,1,0);
- int history = luaL_optint(l,2,0); //Exact second a previous save was saved
- luacon_controller->OpenSavePreview(saveID, history);
+ int instant = luaL_optint(l,2,0);
+ int history = luaL_optint(l,3,0); //Exact second a previous save was saved
+ luacon_controller->OpenSavePreview(saveID, history, instant?true:false);
return 0;
}
diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp
index a91f2d8..21e93ab 100644
--- a/src/cat/TPTScriptInterface.cpp
+++ b/src/cat/TPTScriptInterface.cpp
@@ -426,7 +426,7 @@ AnyType TPTScriptInterface::tptS_load(std::deque<std::string> * words)
//Arguments from stack
NumberType saveID = eval(words);
- c->OpenSavePreview(saveID.Value(), 0);
+ c->OpenSavePreview(saveID.Value(), 0, false);
return NumberType(0);
}