diff options
| author | cracker64 <cracker642@gmail.com> | 2011-07-22 13:47:43 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2011-07-22 13:47:43 (GMT) |
| commit | f064227b7accb6d88185b3bdaf92581f4d32e3c0 (patch) | |
| tree | 73b286a4a3c2115511ca359361b49bbb71af5714 /src | |
| parent | 68404608f69a03546b91b4e1fe800abf48a88e74 (diff) | |
| download | powder-f064227b7accb6d88185b3bdaf92581f4d32e3c0.zip powder-f064227b7accb6d88185b3bdaf92581f4d32e3c0.tar.gz | |
me4502 luaconsole functions, edited from github.
Diffstat (limited to 'src')
| -rw-r--r-- | src/luaconsole.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c index 22e528b..7f78949 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -36,6 +36,12 @@ void luacon_open(){ {"start_getPartIndex", &luatpt_start_getPartIndex}, {"next_getPartIndex", &luatpt_next_getPartIndex}, {"getPartIndex", &luatpt_getPartIndex}, + {"hud", &luatpt_hud}, + {"newtonian_gravity", &luatpt_gravity}, + {"ambient_heat", &luatpt_airheat}, + {"active_menu", &luatpt_active_menu}, + {"decorations_enable", &luatpt_decorations_enable}, + {"display_mode", &luatpt_cmode_set} {NULL,NULL} }; @@ -810,4 +816,50 @@ int luatpt_getPartIndex(lua_State* l) lua_pushinteger(l, getPartIndex_curIdx); return 1; } +int luatpt_hud(lua_State* l) +{ + int hudstate; + hudstate = luaL_optint(l, 1, 0); + hud_enable = (hudstate==0?0:1); + return 0; +} +int luatpt_gravity(lua_State* l) +{ + int gravstate; + gravstate = luaL_optint(l, 1, 0); + if(gravstate) + start_grav_async(); + else + stop_grav_async(); + ngrav_enable = (gravstate==0?0:1); + return 0; +} +int luatpt_airheat(lua_State* l) +{ + int aheatstate; + aheatstate = luaL_optint(l, 1, 0); + aheat_enable = (aheatstate==0?0:1); + return 0; +} +int luatpt_active_menu(lua_State* l) +{ + int aheatstate; + aheatstate = luaL_optint(l, 1, menu_count); + active_menu = aheatstate; + return 0; +} +int luatpt_decorations_enable(lua_State* l) +{ + int aheatstate; + aheatstate = luaL_optint(l, 1, 0); + decorations_enable = (aheatstate==0?0:1); + return 0; +} +int luatpt_cmode_set(lua_State* l) +{ + int aheatstate; + aheatstate = luaL_optint(l, 1, CM_COUNT); + cmode = aheatstate; + return 0; +} #endif |
