mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2024-12-30 23:17:53 +02:00
minor changes
This commit is contained in:
parent
1f2fa4d910
commit
3e92eb9dc0
@ -269,6 +269,8 @@ function Public.reset_map()
|
||||
AntiGrief.enable_capsule_warning(true)
|
||||
AntiGrief.enable_capsule_cursor_warning(false)
|
||||
AntiGrief.enable_jail(true)
|
||||
AntiGrief.damage_entity_threshold(20)
|
||||
AntiGrief.explosive_threshold(32)
|
||||
|
||||
PL.show_roles_in_list(true)
|
||||
|
||||
|
@ -12,23 +12,27 @@ local error_offline = '[ERROR] Webpanel is offline.'
|
||||
local session = {}
|
||||
local online_track = {}
|
||||
local trusted = {}
|
||||
local settings = {
|
||||
-- local trusted_value = 2592000 -- 12h
|
||||
trusted_value = 5184000, -- 24h
|
||||
nth_tick = 18000 -- nearest prime to 5 minutes in ticks
|
||||
}
|
||||
local set_data = Server.set_data
|
||||
local try_get_data = Server.try_get_data
|
||||
local concat = table.concat
|
||||
-- local trusted_value = 2592000 -- 12h
|
||||
local trusted_value = 5184000 -- 24h
|
||||
local nth_tick = 18000 -- nearest prime to 5 minutes in ticks
|
||||
|
||||
Global.register(
|
||||
{
|
||||
session = session,
|
||||
online_track = online_track,
|
||||
trusted = trusted
|
||||
trusted = trusted,
|
||||
settings = settings
|
||||
},
|
||||
function(tbl)
|
||||
session = tbl.session
|
||||
online_track = tbl.online_track
|
||||
trusted = tbl.trusted
|
||||
settings = tbl.settings
|
||||
end
|
||||
)
|
||||
|
||||
@ -41,7 +45,7 @@ local try_download_data =
|
||||
local value = data.value
|
||||
if value then
|
||||
session[key] = value
|
||||
if value > trusted_value then
|
||||
if value > settings.trusted_value then
|
||||
trusted[key] = true
|
||||
end
|
||||
else
|
||||
@ -183,13 +187,13 @@ Event.add(
|
||||
end
|
||||
)
|
||||
|
||||
Event.on_nth_tick(nth_tick, upload_data)
|
||||
Event.on_nth_tick(settings.nth_tick, upload_data)
|
||||
|
||||
Server.on_data_set_changed(
|
||||
session_data_set,
|
||||
function(data)
|
||||
session[data.key] = data.value
|
||||
if data.value > trusted_value then
|
||||
if data.value > settings.trusted_value then
|
||||
trusted[data.key] = true
|
||||
else
|
||||
if trusted[data.key] then
|
||||
|
Loading…
Reference in New Issue
Block a user