hedgewars/uScript.pas
changeset 13576 e5761b37e99c
parent 13463 f1d349a52bc7
child 13577 66460d5f0d9b
equal deleted inserted replaced
13575:213f2bef8a24 13576:e5761b37e99c
  3088     if CheckLuaParamCount(L, 1, 'SetVampiric', 'bool') then
  3088     if CheckLuaParamCount(L, 1, 'SetVampiric', 'bool') then
  3089         cVampiric := lua_toboolean(L, 1);
  3089         cVampiric := lua_toboolean(L, 1);
  3090     lc_setvampiric := 0;
  3090     lc_setvampiric := 0;
  3091 end;
  3091 end;
  3092 
  3092 
       
  3093 function lc_getvampiric(L : Plua_state) : LongInt; Cdecl;
       
  3094 begin
       
  3095     lua_pushboolean(L, cVampiric);
       
  3096     lc_getvampiric := 1;
       
  3097 end;
       
  3098 
  3093 function lc_setlasersight(L : Plua_state) : LongInt; Cdecl;
  3099 function lc_setlasersight(L : Plua_state) : LongInt; Cdecl;
  3094 begin
  3100 begin
  3095     if CheckLuaParamCount(L, 1, 'SetLaserSight', 'bool') then
  3101     if CheckLuaParamCount(L, 1, 'SetLaserSight', 'bool') then
  3096         cLaserSighting:= lua_toboolean(L, 1);
  3102         cLaserSighting:= lua_toboolean(L, 1);
  3097     lc_setlasersight:= 0;
  3103     lc_setlasersight:= 0;
       
  3104 end;
       
  3105 
       
  3106 function lc_getlasersight(L : Plua_state) : LongInt; Cdecl;
       
  3107 begin
       
  3108     lua_pushboolean(L, cLaserSighting);
       
  3109     lc_getlasersight:= 1;
  3098 end;
  3110 end;
  3099 
  3111 
  3100 function lc_explode(L : Plua_state) : LongInt; Cdecl;
  3112 function lc_explode(L : Plua_state) : LongInt; Cdecl;
  3101 var mask: LongWord;
  3113 var mask: LongWord;
  3102     n: LongInt;
  3114     n: LongInt;
  4080 lua_register(luaState, _P'SetCinematicMode', @lc_setcinematicmode);
  4092 lua_register(luaState, _P'SetCinematicMode', @lc_setcinematicmode);
  4081 lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance);
  4093 lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance);
  4082 lua_register(luaState, _P'GetAmmoName', @lc_getammoname);
  4094 lua_register(luaState, _P'GetAmmoName', @lc_getammoname);
  4083 lua_register(luaState, _P'GetAmmoTimer', @lc_getammotimer);
  4095 lua_register(luaState, _P'GetAmmoTimer', @lc_getammotimer);
  4084 lua_register(luaState, _P'SetVampiric', @lc_setvampiric);
  4096 lua_register(luaState, _P'SetVampiric', @lc_setvampiric);
       
  4097 lua_register(luaState, _P'GetVampiric', @lc_getvampiric);
  4085 lua_register(luaState, _P'SetLaserSight', @lc_setlasersight);
  4098 lua_register(luaState, _P'SetLaserSight', @lc_setlasersight);
       
  4099 lua_register(luaState, _P'GetLaserSight', @lc_getlasersight);
  4086 lua_register(luaState, _P'Explode', @lc_explode);
  4100 lua_register(luaState, _P'Explode', @lc_explode);
  4087 // drawn map functions
  4101 // drawn map functions
  4088 lua_register(luaState, _P'AddPoint', @lc_addPoint);
  4102 lua_register(luaState, _P'AddPoint', @lc_addPoint);
  4089 lua_register(luaState, _P'FlushPoints', @lc_flushPoints);
  4103 lua_register(luaState, _P'FlushPoints', @lc_flushPoints);
  4090 
  4104