diff options
author | tron <tron@openttd.org> | 2006-03-04 11:01:35 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-04 11:01:35 +0000 |
commit | 4270026b4248bbaa1b1b46b099baadbd24921dd0 (patch) | |
tree | 2eef654bc6b8956ee2e2ff73c1a3f6e72b920031 /ship_cmd.c | |
parent | 006444a0dcb20f44d5be0f7827b68fa379c4d77a (diff) | |
download | openttd-4270026b4248bbaa1b1b46b099baadbd24921dd0.tar.xz |
(svn r3757) -Feature: Delete news items about vehicles, when they get stale
This is used to delete
- all news about a vehicle, when it gets deleted
- "vehicle has stopped in depot" news, when it gets started
- "vehicle has invalid orders" news, when the orders get changed
Diffstat (limited to 'ship_cmd.c')
-rw-r--r-- | ship_cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ship_cmd.c b/ship_cmd.c index 651239286..82bedb3f8 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -951,6 +951,10 @@ int32 CmdStartStopShip(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (v->type != VEH_Ship || !CheckOwnership(v->owner)) return CMD_ERROR; if (flags & DC_EXEC) { + if (v->vehstatus & VS_STOPPED && v->u.ship.state == 0x80) { + DeleteVehicleNews(p1, STR_981C_SHIP_IS_WAITING_IN_DEPOT); + } + v->vehstatus ^= VS_STOPPED; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |