(svn r1629) added a counter to tell how many engines you have of each type to the autoreplace vehicle windows and made them show only the vehicles you actually have in the left list.
this also fixes some window updates issues when autoreplacing
This commit is contained in:
@@ -188,6 +188,8 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
InvalidateWindow(WC_COMPANY, v->owner);
|
||||
}
|
||||
|
||||
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Road); // updates the replace Road window
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
@@ -234,6 +236,7 @@ int32 CmdSellRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
DeleteWindowById(WC_VEHICLE_VIEW, v->index);
|
||||
DeleteVehicle(v);
|
||||
}
|
||||
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Road); // updates the replace Road window
|
||||
|
||||
return -(int32)v->value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user