summaryrefslogtreecommitdiff
path: root/src/ship_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-03-08 16:27:54 +0000
committerrubidium <rubidium@openttd.org>2007-03-08 16:27:54 +0000
commit36cea84b1108db28a7a61fc23e2e2020a64a89dd (patch)
treee32a4dc6207efbaacc5af4e5c41a353b98b9a897 /src/ship_cmd.cpp
parent05eb676f22c73cf870b8abec383985641bd815de (diff)
downloadopenttd-36cea84b1108db28a7a61fc23e2e2020a64a89dd.tar.xz
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r--src/ship_cmd.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 0d7c2d606..54c1b0cfa 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -826,7 +826,7 @@ void ShipsYearlyLoop()
Vehicle *v;
FOR_ALL_VEHICLES(v) {
- if (v->type == VEH_Ship) {
+ if (v->type == VEH_SHIP) {
v->profit_last_year = v->profit_this_year;
v->profit_this_year = 0;
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
@@ -846,7 +846,7 @@ int32 CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
UnitID unit_num;
Engine *e;
- if (!IsEngineBuildable(p1, VEH_Ship, _current_player)) return_cmd_error(STR_ENGINE_NOT_BUILDABLE);
+ if (!IsEngineBuildable(p1, VEH_SHIP, _current_player)) return_cmd_error(STR_ENGINE_NOT_BUILDABLE);
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
@@ -859,7 +859,7 @@ int32 CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!IsTileOwner(tile, _current_player)) return CMD_ERROR;
v = AllocateVehicle();
- unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_Ship);
+ unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_SHIP);
if (v == NULL || unit_num > _patches.max_ships)
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
@@ -910,7 +910,7 @@ int32 CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v->date_of_last_service = _date;
v->build_year = _cur_year;
v->cur_image = 0x0E5E;
- v->type = VEH_Ship;
+ v->type = VEH_SHIP;
v->random_bits = VehicleRandomBits();
v->vehicle_flags = 0;
@@ -922,7 +922,7 @@ int32 CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
if (IsLocalPlayer())
- InvalidateAutoreplaceWindow(VEH_Ship); // updates the replace Ship window
+ InvalidateAutoreplaceWindow(VEH_SHIP); // updates the replace Ship window
GetPlayer(_current_player)->num_engines[p1]++;
}
@@ -943,7 +943,7 @@ int32 CmdSellShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v = GetVehicle(p1);
- if (v->type != VEH_Ship || !CheckOwnership(v->owner)) return CMD_ERROR;
+ if (v->type != VEH_SHIP || !CheckOwnership(v->owner)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
@@ -977,7 +977,7 @@ int32 CmdStartStopShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v = GetVehicle(p1);
- if (v->type != VEH_Ship || !CheckOwnership(v->owner)) return CMD_ERROR;
+ if (v->type != VEH_SHIP || !CheckOwnership(v->owner)) return CMD_ERROR;
/* Check if this ship can be started/stopped. The callback will fail or
* return 0xFF if it can. */
@@ -1016,14 +1016,14 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (p2 & DEPOT_MASS_SEND) {
/* Mass goto depot requested */
if (!ValidVLWFlags(p2 & VLW_MASK)) return CMD_ERROR;
- return SendAllVehiclesToDepot(VEH_Ship, flags, p2 & DEPOT_SERVICE, _current_player, (p2 & VLW_MASK), p1);
+ return SendAllVehiclesToDepot(VEH_SHIP, flags, p2 & DEPOT_SERVICE, _current_player, (p2 & VLW_MASK), p1);
}
if (!IsValidVehicleID(p1)) return CMD_ERROR;
v = GetVehicle(p1);
- if (v->type != VEH_Ship || !CheckOwnership(v->owner)) return CMD_ERROR;
+ if (v->type != VEH_SHIP || !CheckOwnership(v->owner)) return CMD_ERROR;
if (v->vehstatus & VS_CRASHED) return CMD_ERROR;
@@ -1092,7 +1092,7 @@ int32 CmdRefitShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v = GetVehicle(p1);
- if (v->type != VEH_Ship || !CheckOwnership(v->owner)) return CMD_ERROR;
+ if (v->type != VEH_SHIP || !CheckOwnership(v->owner)) return CMD_ERROR;
if (!IsShipInDepotStopped(v)) {
return_cmd_error(STR_980B_SHIP_MUST_BE_STOPPED_IN);