From 91834b680b86a660a20e2d11f925d5a8c72b2e35 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Fri, 13 Sep 2024 20:14:04 +0100 Subject: [PATCH] autodisband 3 days -> 5 days --- maps/pirates/common.lua | 4 ++-- maps/pirates/crew.lua | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/maps/pirates/common.lua b/maps/pirates/common.lua index 048c5ef3..b343ab02 100644 --- a/maps/pirates/common.lua +++ b/maps/pirates/common.lua @@ -27,8 +27,8 @@ Public.minimumCapacitySliderValue = 1 Public.minimum_run_capacity_to_enforce_space_for = 22 -- auto-disbanding when there are no players left in the crew: --- Public.autodisband_ticks = nil -Public.autodisband_ticks = 60 * 60 * 60 * 24 * 3 -- should not be zero (as this messes with saving and loading a game, which boots the player for a moment.) Also note that the server may run very slowly when no-one is on it. +-- Public.autodisband_hours = nil +Public.autodisband_hours = 24 * 5 -- should not be zero (as this messes with saving and loading a game, which boots the player for a moment.) Also note that the server may run very slowly when no-one is on it. Public.boat_steps_at_a_time = 1 diff --git a/maps/pirates/crew.lua b/maps/pirates/crew.lua index 313b8d03..d0ce7ac5 100644 --- a/maps/pirates/crew.lua +++ b/maps/pirates/crew.lua @@ -279,8 +279,8 @@ function Public.join_spectators(player, crewid) end if #Common.crew_get_crew_members() == 0 then - if Common.autodisband_ticks then - memory.crew_disband_tick = game.tick + Common.autodisband_ticks + if Common.autodisband_hours then + memory.crew_disband_tick = game.tick + Common.autodisband_hours * 60 * 60 * 60 end end @@ -312,8 +312,8 @@ function Public.leave_spectators(player, quiet) memory.spectatorplayerindices = Utils.ordered_table_with_values_removed(memory.spectatorplayerindices, player.index) if #Common.crew_get_crew_members() == 0 then - if Common.autodisband_ticks then - memory.crew_disband_tick = game.tick + Common.autodisband_ticks + if Common.autodisband_hours then + memory.crew_disband_tick = game.tick + Common.autodisband_hours * 60 * 60 * 60 end end @@ -492,8 +492,8 @@ function Public.leave_crew(player, to_lobby, quiet) if #Common.crew_get_crew_members() == 0 then local exists_disband_tick = memory.crew_disband_tick and memory.crew_disband_tick > game.tick - if Common.autodisband_ticks and not exists_disband_tick then - memory.crew_disband_tick = game.tick + Common.autodisband_ticks + if Common.autodisband_hours and not exists_disband_tick then + memory.crew_disband_tick = game.tick + Common.autodisband_hours * 60 * 60 * 60 end -- if _DEBUG then memory.crew_disband_tick = game.tick + 30*60*60 end