Skip to content

Commit d19b37c

Browse files
committed
CHG: Stops that are not connected to any other stops now have a blue status colour
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@11885 8aca7d54-2c30-db11-9de9-000461428c89
1 parent d8a91d3 commit d19b37c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

simutrans/history.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
CHG: (poppo) jump tool now allows also for z coordinaate
5858
FIX: (poppo) last tool not show when too many tools to fit
5959
ADD: searchable comboboxes; for editing click twice
60+
CHG: Stops that are not connected to any other stops now have a blue status colour
6061

6162

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

src/simutrans/simhalt.cc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3116,12 +3116,18 @@ void haltestelle_t::recalc_status()
31163116
}
31173117
}
31183118

3119-
// take the worst color for status
3120-
if( status_bits ) {
3119+
const bool has_any_activity = (financial_history[0][HALT_WAITING] + financial_history[0][HALT_DEPARTED] + financial_history[0][HALT_ARRIVED]) > 0;
3120+
const bool is_connected = !registered_convoys.empty() || !registered_lines.empty();
3121+
3122+
if (!is_connected) {
3123+
status_color = color_idx_to_rgb(COL_NO_ROUTE);
3124+
}
3125+
else if (status_bits != 0) {
3126+
// take the worst color for status
31213127
status_color = color_idx_to_rgb(status_bits&2 ? COL_RED : COL_ORANGE);
31223128
}
31233129
else {
3124-
status_color = color_idx_to_rgb((financial_history[0][HALT_WAITING]+financial_history[0][HALT_DEPARTED] == 0) ? COL_YELLOW : COL_GREEN);
3130+
status_color = color_idx_to_rgb(has_any_activity ? COL_GREEN : COL_YELLOW);
31253131
}
31263132

31273133
financial_history[0][HALT_WAITING] = total_sum;

0 commit comments

Comments
 (0)