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

77 lines
1.5 KiB
Lua
Raw Normal View History

local Public = {}
-- one table to rule them all!
local Global = require 'utils.global'
local Event = require 'utils.event'
local this = {}
Global.register(
this,
function(tbl)
this = tbl
end
)
function Public.reset_table()
this.key = {}
this.rocket_launches = {}
this.requests = {}
this.town_centers = {}
this.cooldowns_town_placement = {}
this.last_respawn = {}
this.last_death = {}
this.strikes = {}
this.score_gui_frame = {}
this.testing_mode = false
this.spawn_point = {}
this.buffs = {}
this.players = 0
this.towns_enabled = true
this.nuke_tick_schedule = {}
this.swarms = {}
this.explosion_schedule = {}
this.fluid_explosion_schedule = {}
this.mining = {}
this.mining_entity = {}
this.mining_target = {}
this.spaceships = {}
2022-10-17 22:11:38 -04:00
this.suicides = {}
2022-10-21 21:49:17 +02:00
this.required_time_to_win = 48
2022-12-20 13:48:28 +01:00
this.required_time_to_win_in_ticks = 10368000
2022-10-21 21:49:17 +02:00
this.announced_message = nil
this.soft_reset = true
this.winner = nil
end
function Public.get_table()
return this
end
function Public.get(key)
if key then
return this[key]
else
return this
end
end
function Public.set(key, value)
if key and (value or value == false) then
this[key] = value
return this[key]
elseif key then
return this[key]
else
return this
end
end
Event.on_init(
function()
Public.reset_table()
end
)
return Public