From 58f46147a83c1a802bc51e278b6a99ee765e0373 Mon Sep 17 00:00:00 2001 From: Piratux <58703216+Piratux@users.noreply.github.com> Date: Tue, 26 Jul 2022 18:45:43 +0100 Subject: [PATCH] version + class data fix Changes: - Fixed version string to 1.3.1 - Fixed an issue, where if last player would leave the crew, the class wouldn't become spare --- maps/pirates/coredata.lua | 2 +- maps/pirates/crew.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index cebf0982..f78c55d2 100644 --- a/maps/pirates/coredata.lua +++ b/maps/pirates/coredata.lua @@ -7,7 +7,7 @@ local _inspect = require 'utils.inspect'.inspect local Public = {} Public.scenario_id_name = 'pirates' -Public.version_string = '1.3.0' --major.minor.patch versioning, to match factorio mod portal +Public.version_string = '1.3.1' --major.minor.patch versioning, to match factorio mod portal Public.blueprint_library_allowed = true Public.blueprint_importing_allowed = true diff --git a/maps/pirates/crew.lua b/maps/pirates/crew.lua index b2a8c205..ef811fcc 100644 --- a/maps/pirates/crew.lua +++ b/maps/pirates/crew.lua @@ -451,14 +451,14 @@ function Public.leave_crew(player, to_lobby, quiet) if not (memory.difficulty_votes) then memory.difficulty_votes = {} end memory.difficulty_votes[player.index] = nil + Roles.player_left_so_redestribute_roles(player) + if #Common.crew_get_crew_members() == 0 then if Common.autodisband_ticks then memory.crew_disband_tick = game.tick + Common.autodisband_ticks end -- memory.crew_disband_tick = game.tick + 60*60*2 --give players time to log back in after a crash or save if _DEBUG then memory.crew_disband_tick = game.tick + 30*60*60 end - else - Roles.player_left_so_redestribute_roles(player) end end