From 42d19f5a2832dd481fc3507b30ce916fc6d5e9ca Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 20 Oct 2021 05:22:13 +0300 Subject: [PATCH 50/50] civ1: Remove infra from city center tile when city destroyed Based on lua script by nef Requested by nef See osdn #43039 Signed-off-by: Marko Lindqvist --- data/civ1/script.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/data/civ1/script.lua b/data/civ1/script.lua index f0bdf05caa..520c2d28a0 100644 --- a/data/civ1/script.lua +++ b/data/civ1/script.lua @@ -13,3 +13,14 @@ -- ruleset. When freeciv loads a ruleset, it also loads script -- file called 'default.lua'. The one loaded if your ruleset -- does not provide an override is default/default.lua. + +function clear_city_spot(city, loser, destroyer) + city.tile:remove_extra("Railroad") + city.tile:remove_extra("Road") + city.tile:remove_extra("Irrigation") + city.tile:remove_extra("Mine") + -- continue processing + return false +end + +signal.connect("city_destroyed", "clear_city_spot") -- 2.33.0