The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: gerw on August 28, 2009, 08:02:57 pm

Title: [bug+fix] Two small issues with infowins
Post by: gerw on August 28, 2009, 08:02:57 pm
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);
Title: Re: [bug+fix] Two small issues with infowins
Post by: prissi on September 02, 2009, 01:16:43 pm
Well, wouldn't this ffect oilrigs and fish swarms?
Title: Re: [bug+fix] Two small issues with infowins
Post by: gerw on September 02, 2009, 01:35:47 pm
No. (it's utyp = fabrik < bahnhof).
Title: Re: [bug+fix] Two small issues with infowins
Post by: Dwachs on September 22, 2009, 10:53:34 am
in rev 2659