me4502 added tpt.throw_error and tpt.heat as lua commands
This commit is contained in:
parent
58d96de4ce
commit
d7a55f1f50
@ -57,4 +57,6 @@ int luatpt_airheat(lua_State* l);
|
||||
int luatpt_active_menu(lua_State* l);
|
||||
int luatpt_decorations_enable(lua_State* l);
|
||||
int luatpt_cmode_set(lua_State* l);
|
||||
int luatpt_error(lua_State* l);
|
||||
int luatpt_heat(lua_State* l);
|
||||
#endif
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user