1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-09 13:37:02 +02:00

45 lines
1.0 KiB
Lua
Raw Normal View History

2021-11-14 21:01:01 +01:00
local Public = require 'modules.wave_defense.table'
2021-11-14 13:02:00 +01:00
2021-11-14 21:01:01 +01:00
if _DEBUG then
2021-11-14 13:02:00 +01:00
commands.add_command(
2021-11-14 21:01:01 +01:00
'wd_debug_module',
2021-11-14 13:02:00 +01:00
'',
2021-11-14 21:01:01 +01:00
function(cmd)
2021-11-14 13:02:00 +01:00
local player = game.player
2021-11-14 21:01:01 +01:00
local param = tostring(cmd.parameter)
if param == nil then
return
end
2021-11-14 13:02:00 +01:00
if not (player and player.valid) then
return
end
if not player.admin then
return
end
2021-11-14 21:01:01 +01:00
if param == 'spawn_wave' then
return Public.spawn_unit_group(true, true)
2021-11-14 13:02:00 +01:00
end
2021-11-14 21:01:01 +01:00
if param == 'log_all' then
return Public.toggle_debug()
2021-11-14 13:02:00 +01:00
end
2021-11-14 21:01:01 +01:00
if param == 'debug_health' then
local this = Public.get()
2021-11-14 13:02:00 +01:00
2021-11-14 21:01:01 +01:00
Public.toggle_debug_health()
2021-11-14 13:02:00 +01:00
2021-11-14 21:01:01 +01:00
this.next_wave = 1000
this.wave_interval = 200
this.wave_enforced = true
this.debug_only_on_wave_500 = true
2021-11-14 13:02:00 +01:00
end
end
)
end
2021-11-14 21:01:01 +01:00
return Public