Skip to main content
Topic: [bug+fix] Two small issues with infowins (Read 2325 times) previous topic - next topic

[bug+fix] Two small issues with infowins

These two issues was mentioned by Frank:

1. It was shown "halt accepts coal", even if goods wasn't enabled at a station.
2. On the infowin of the buildings of a halt, a pax/post-rate was shown (for this bug, you need a special pak).

Code: [Select]
Index: gui/halt_detail.cc
===================================================================
--- gui/halt_detail.cc (revision 2621)
+++ gui/halt_detail.cc (working copy)
@@ -149,7 +149,7 @@
  buf.append(":\n");
  offset_y += LINESPACE;
 
- if (!nimmt_an.empty()) {
+ if(  !nimmt_an.empty()  &&  halt->get_ware_enabled()  ) {
  for(uint32 i=0; i<warenbauer_t::get_waren_anzahl(); i++) {
  const ware_besch_t *ware = warenbauer_t::get_info(i);
  if(nimmt_an.is_contained(ware)) {
Index: dings/gebaeude.cc
===================================================================
--- dings/gebaeude.cc (revision 2621)
+++ dings/gebaeude.cc (working copy)
@@ -644,15 +644,17 @@
  buf.append(buffer);
  }
 
- buf.append(translator::translate("P****agierrate"));
- buf.append(": ");
- buf.append(get_p****agier_level());
- buf.append("\n");
+ if( get_tile()->get_besch()->get_utyp() < haus_besch_t::bahnhof ) {
+ buf.append(translator::translate("P****agierrate"));
+ buf.append(": ");
+ buf.append(get_p****agier_level());
+ buf.append("\n");
 
- buf.append(translator::translate("Postrate"));
- buf.append(": ");
- buf.append(get_post_level());
- buf.append("\n");
+ buf.append(translator::translate("Postrate"));
+ buf.append(": ");
+ buf.append(get_post_level());
+ buf.append("\n");
+ }
 
  buf.append(translator::translate("\nBauzeit von"));
  buf.append(tile->get_besch()->get_intro_year_month()/12);

Re: [bug+fix] Two small issues with infowins

Reply #1
Well, wouldn't this ffect oilrigs and fish swarms?

Re: [bug+fix] Two small issues with infowins

Reply #2
No. (it's utyp = fabrik < bahnhof).

Re: [bug+fix] Two small issues with infowins

Reply #3
in rev 2659
Parsley, sage, rosemary, and maggikraut.