From 44cd85e9ed632bb34d1b35e8f4a8b6e28f1515a1 Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Thu, 22 Sep 2022 22:14:23 +0200 Subject: [PATCH] Towny fixes --- maps/scrap_towny_ffa/main.lua | 5 +++++ modules/scrap_towny_ffa/building.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/maps/scrap_towny_ffa/main.lua b/maps/scrap_towny_ffa/main.lua index bae0c8da..fcbb2189 100644 --- a/maps/scrap_towny_ffa/main.lua +++ b/maps/scrap_towny_ffa/main.lua @@ -92,6 +92,11 @@ end local function init_score_board(player) local ffatable = Table.get_table() + local saved_frame = ffatable.score_gui_frame[player.index] + if saved_frame and saved_frame.valid then + return + end + local flow = mod_gui.get_frame_flow(player) local frame = flow.add {type = 'frame', style = mod_gui.frame_style, caption = 'Town survival', direction = 'vertical'} frame.style.vertically_stretchable = false diff --git a/modules/scrap_towny_ffa/building.lua b/modules/scrap_towny_ffa/building.lua index 0a62cb56..7e4158c2 100644 --- a/modules/scrap_towny_ffa/building.lua +++ b/modules/scrap_towny_ffa/building.lua @@ -269,7 +269,7 @@ function Public.near_another_town(force_name, position, surface, radius) if entity_force_name ~= nil then if entity_force_name ~= force_name then if blacklist_entity_types[e.type] ~= true then - log('XDB prevent_entity, e.type:' .. e.type) + -- log('XDB prevent_entity, e.type:' .. e.type) fail = true break end