diff options
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r-- | src/ship_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index ea7edb8e4..f5d7fc27d 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -755,7 +755,7 @@ CommandCost CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, con unit_num = (flags & DC_AUTOREPLACE) ? 0 : GetFreeUnitNumber(VEH_SHIP); - if (!Vehicle::AllocateList(NULL, 1) || unit_num > _settings_game.vehicle.max_ships) + if (!Vehicle::CanAllocateItem() || unit_num > _settings_game.vehicle.max_ships) return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME); if (flags & DC_EXEC) { |