What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
5 posts • Page 1 of 1
Now you can only sell one building/city improvement per turn. Sometimes you want to disband the city if the city is not viable but sell the city improvements before disband to not lose the value of the buildings. Sell all city improvements in a single turn would make it easier and faster.
Something like this (not tested), put in your_ruleset_dir/script.lua (don't apply to a pre-installed ruleset, make a copy to play with it):
Code: Select all
--Destroying city by a non-military action, return buildings cost to the owner
if not oplayer then
local cost = 0;
for b in buildings_iterate() do
if c:has_building(b) and not b:is_wonder() then
cost = cost + b.build_cost -- * game.info.shieldbox / 100 and rounded if needed
if c > 0 then
notify.event(owner, c.tile, E.IMP_SOLD, _("Improvements of %s sold for %d gold"), c.name, gold)