summaryrefslogtreecommitdiff
path: root/src/cat/LegacyLuaAPI.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-01-22 01:19:34 (GMT)
committer jacob1 <jfu614@gmail.com>2013-01-22 01:19:34 (GMT)
commit392271a2692a2b764ae346e1f6ec70c1cb4277b7 (patch)
treedf53d3e6a04f168b9de630e8e6edb75edab7341e /src/cat/LegacyLuaAPI.cpp
parent9fb3e75f93e50be7811986928f4d2da0347dbf4b (diff)
downloadpowder-392271a2692a2b764ae346e1f6ec70c1cb4277b7.zip
powder-392271a2692a2b764ae346e1f6ec70c1cb4277b7.tar.gz
fix tpt.set_property setting integers above 255, fix fs.isDir/File, add "Color" as valid property for elements api, fix tpt.display_mode to match tpt, other minor changes
Diffstat (limited to 'src/cat/LegacyLuaAPI.cpp')
-rw-r--r--src/cat/LegacyLuaAPI.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cat/LegacyLuaAPI.cpp b/src/cat/LegacyLuaAPI.cpp
index 951a707..5492e2e 100644
--- a/src/cat/LegacyLuaAPI.cpp
+++ b/src/cat/LegacyLuaAPI.cpp
@@ -1010,7 +1010,7 @@ int luatpt_set_property(lua_State* l)
} else {
t = luaL_optint(l, 2, 0);
}
- if (format == CommandInterface::FormatInt && (t<0 || t>=PT_NUM || !luacon_sim->elements[t].Enabled))
+ if (!strcmp(prop,"type") && (t<0 || t>=PT_NUM || !luacon_sim->elements[t].Enabled))
return luaL_error(l, "Unrecognised element number '%d'", t);
} else {
name = (char*)luaL_optstring(l, 2, "dust");
@@ -1702,7 +1702,7 @@ int luatpt_heat(lua_State* l)
int luatpt_cmode_set(lua_State* l)
{
- int cmode = luaL_optint(l, 1, 0);
+ int cmode = luaL_optint(l, 1, 0)+1;
if (cmode >= 0 && cmode <= 10)
luacon_controller->LoadRenderPreset(cmode);
else