(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:
bjarni
2005-01-23 22:01:51 +00:00
parent dd6a6fa7ec
commit 6510b12203
7 changed files with 103 additions and 45 deletions

View File

@@ -877,6 +877,7 @@ int32 CmdBuildShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
}
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
return value;
}
@@ -903,6 +904,8 @@ int32 CmdSellShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
DeleteVehicle(v);
}
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
return -(int32)v->value;
}