News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

[patch] Improve desplay depots on minimap

Started by z9999, July 13, 2009, 08:54:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z9999

- changed size from 3 to 7, same as attraction
- supported narrowgaugedepot
- show only current player's depot


Index: gui/karte.cc
===================================================================
--- gui/karte.cc (r2576)
+++ gui/karte.cc (copy)
@@ -647,10 +647,12 @@
if(mode==MAP_DEPOT) {
slist_iterator_tpl <depot_t *> iter (depot_t::get_depot_list());
while(iter.next()) {
- koord pos = iter.get_current()->get_pos().get_2d();
- // offset of one to avoid
- static uint8 depot_typ_to_color[12]={ COL_ORANGE, COL_YELLOW, COL_RED, 0, 0, 0, 0, 0, 0, COL_PURPLE, COL_DARK_RED, COL_DARK_ORANGE };
- set_relief_farbe_area(pos, 3, depot_typ_to_color[iter.get_current()->get_typ()-ding_t::bahndepot] );
+ if(iter.get_current()->get_besitzer()==welt->get_active_player()) {
+ koord pos = iter.get_current()->get_pos().get_2d();
+ // offset of one to avoid
+ static uint8 depot_typ_to_color[19]={ COL_ORANGE, COL_YELLOW, COL_RED, 0, 0, 0, 0, 0, 0, COL_PURPLE, COL_DARK_RED, COL_DARK_ORANGE, 0, 0, 0, 0, 0, 0, COL_LIGHT_RED };
+ set_relief_farbe_area(pos, 7, depot_typ_to_color[iter.get_current()->get_typ()-ding_t::bahndepot] );
+ }
}
return;
}



prissi