summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2011-07-31 00:31:34 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2011-07-31 00:31:34 (GMT)
commitd7a55f1f50bf7eaefdaf7c5758430b68e733680a (patch)
tree6bec5032e12d4cc2a5b5bc8287deb131892e618a /src
parent58d96de4ce2eacbda5b63ed1ac6ee19d17f03d39 (diff)
downloadpowder-d7a55f1f50bf7eaefdaf7c5758430b68e733680a.zip
powder-d7a55f1f50bf7eaefdaf7c5758430b68e733680a.tar.gz
me4502 added tpt.throw_error and tpt.heat as lua commands
Diffstat (limited to 'src')
-rw-r--r--src/luaconsole.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c
index c854d67..02ec11b 100644
--- a/src/luaconsole.c
+++ b/src/luaconsole.c
@@ -42,6 +42,8 @@ void luacon_open(){
{"active_menu", &luatpt_active_menu},
{"decorations_enable", &luatpt_decorations_enable},
{"display_mode", &luatpt_cmode_set},
+ {"throw_error", &luatpt_error},
+ {"heat", &luatpt_heat},
{NULL,NULL}
};
@@ -138,6 +140,13 @@ int luatpt_test(lua_State* l)
printf("Test successful, got %d\n", testint);
return 0;
}
+int luatpt_error(lua_State* l)
+{
+ char *error = "";
+ error = luaL_optstring(l, 1, 0);
+ error_ui(vid_buf, 0, error);
+ return 0;
+}
int luatpt_drawtext(lua_State* l)
{
char *string;
@@ -853,6 +862,14 @@ int luatpt_decorations_enable(lua_State* l)
decorations_enable = (aheatstate==0?0:1);
return 0;
}
+
+int luatpt_heat(lua_State* l)
+{
+ int heatstate;
+ heatstate = luaL_optint(l, 1, 0);
+ legacy_enable = (heatstate==1?0:1);
+ return 0;
+}
int luatpt_cmode_set(lua_State* l)
{
int aheatstate;