Skip to content

Commit

Permalink
Free build improvements in town map (CorsixTH#2616)
Browse files Browse the repository at this point in the history
* Display 0$ parcel cost if playing in free build

- now heating costs is changed in free build mode to 0$, not display

Co-authored-by: lewri <[email protected]>
  • Loading branch information
Matroftt and lewri authored Oct 19, 2024
1 parent e4e185c commit 70387a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CorsixTH/Lua/dialogs/fullscreen/town_map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ function UITownMap:draw(canvas, x, y)
self.info_font:draw(canvas, radiators, x + 95, y + 265)

-- Heating costs
local heating_costs = math.floor(((hospital.heating.radiator_heat *10)* radiators)* 7.5)
local heating_costs = app.config.free_build_mode and 0 or
math.floor(((hospital.heating.radiator_heat *10)* radiators)* 7.5)
self.info_font:draw(canvas, ("%8i"):format(heating_costs), x + 100, y + 355)

-- Draw balance with temporary offset in unicode languages
Expand Down Expand Up @@ -303,7 +304,8 @@ function UITownMap:draw(canvas, x, y)
local owner_num = map.th:getPlotOwner(self.hover_plot)
if owner_num == 0 then
owner = _S.town_map.for_sale
price = "$" .. map:getParcelPrice(self.hover_plot)
price = app.config.free_build_mode and "$0" or
("$" .. map:getParcelPrice(self.hover_plot))
else
owner = world.hospitals[owner_num].name
end
Expand Down

0 comments on commit 70387a7

Please sign in to comment.