Skip to content

Commit 2139bc5

Browse files
committed
FIX: Corrected format of transformer tool icon tooltip
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@11891 8aca7d54-2c30-db11-9de9-000461428c89
1 parent 7b733c7 commit 2139bc5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

simutrans/history.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
FIX: Fatal error message when building a city house that was copied using the pipette tool
6262
CHG: (poppo) extended selection of way resp. their obj with CNTRL and SHIFT and pipette tool
6363
ADD: new settings cost_kw_per_credit (default was 512) to chaneg revenue from power. Smaller numbers more income
64+
FIX: Corrected format of transformer tool icon tooltip
6465

6566

6667
Release of 124.3.1 (r11671 on 5-Apr-2025):

src/simutrans/tool/simtool.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,15 +1713,17 @@ const char *tool_clear_reservation_t::work( player_t *, koord3d pos )
17131713
const char* tool_transformer_t::get_tooltip(const player_t *) const
17141714
{
17151715
settings_t const& s = welt->get_settings();
1716-
sprintf(toolstr, "%s, %ld$ (%ld$)", translator::translate("Build drain"), (long)(s.cst_transformer / -100), (long)(welt->scale_with_month_length(s.cst_maintain_transformer)) / -100);
1717-
return toolstr;
1716+
1717+
return tooltip_with_price_maintenance(welt, "Build drain", s.cst_transformer, -s.cst_maintain_transformer);
17181718
}
17191719

1720+
17201721
image_id tool_transformer_t::get_icon(player_t*) const
17211722
{
17221723
return way_builder_t::waytype_available( powerline_wt, welt->get_timeline_year_month() ) ? icon : IMG_EMPTY;
17231724
}
17241725

1726+
17251727
bool tool_transformer_t::init( player_t *)
17261728
{
17271729
return way_builder_t::waytype_available( powerline_wt, welt->get_timeline_year_month() );

0 commit comments

Comments
 (0)