113 function lc_hidemission(L : Plua_State) : LongInt; Cdecl; |
113 function lc_hidemission(L : Plua_State) : LongInt; Cdecl; |
114 begin |
114 begin |
115 L:= L; // avoid compiler hint |
115 L:= L; // avoid compiler hint |
116 HideMission; |
116 HideMission; |
117 lc_hidemission:= 0; |
117 lc_hidemission:= 0; |
|
118 end; |
|
119 |
|
120 function lc_spawnhealthcrate(L: Plua_State) : LongInt; Cdecl; |
|
121 var x, y: LongInt; |
|
122 begin |
|
123 if lua_gettop(L) <> 2 then begin |
|
124 LuaError('Lua: Wrong number of parameters passed to SpawnHealthCrate!'); |
|
125 lua_pushnil(L); |
|
126 end |
|
127 else begin |
|
128 x:= lua_tointeger(L, 1); |
|
129 y:= lua_tointeger(L, 2); |
|
130 cCaseFactor := 0; |
|
131 SpawnHealthCrate(x, y); |
|
132 end; |
|
133 lc_spawnhealthCrate := 1; |
118 end; |
134 end; |
119 |
135 |
120 function lc_addgear(L : Plua_State) : LongInt; Cdecl; |
136 function lc_addgear(L : Plua_State) : LongInt; Cdecl; |
121 var gear : PGear; |
137 var gear : PGear; |
122 x, y, s, t: LongInt; |
138 x, y, s, t: LongInt; |
860 for am:= Low(TAmmoType) to High(TAmmoType) do |
876 for am:= Low(TAmmoType) to High(TAmmoType) do |
861 ScriptSetInteger(EnumToStr(am), ord(am)); |
877 ScriptSetInteger(EnumToStr(am), ord(am)); |
862 |
878 |
863 // register functions |
879 // register functions |
864 lua_register(luaState, 'AddGear', @lc_addgear); |
880 lua_register(luaState, 'AddGear', @lc_addgear); |
|
881 lua_register(luaState, 'SpawnHealthCrate', @lc_spawnhealthcrate); |
865 lua_register(luaState, 'WriteLnToConsole', @lc_writelntoconsole); |
882 lua_register(luaState, 'WriteLnToConsole', @lc_writelntoconsole); |
866 lua_register(luaState, 'GetGearType', @lc_getgeartype); |
883 lua_register(luaState, 'GetGearType', @lc_getgeartype); |
867 lua_register(luaState, 'EndGame', @lc_endgame); |
884 lua_register(luaState, 'EndGame', @lc_endgame); |
868 lua_register(luaState, 'FindPlace', @lc_findplace); |
885 lua_register(luaState, 'FindPlace', @lc_findplace); |
869 lua_register(luaState, 'SetGearPosition', @lc_setgearposition); |
886 lua_register(luaState, 'SetGearPosition', @lc_setgearposition); |