equal
deleted
inserted
replaced
1748 */ |
1748 */ |
1749 bool CanBuildVehicleInfrastructure(VehicleType type) |
1749 bool CanBuildVehicleInfrastructure(VehicleType type) |
1750 { |
1750 { |
1751 assert(IsPlayerBuildableVehicleType(type)); |
1751 assert(IsPlayerBuildableVehicleType(type)); |
1752 |
1752 |
1753 if (!IsValidPlayer(_current_player)) return false; |
1753 if (!IsValidPlayerID(_current_player)) return false; |
1754 if (_settings_client.gui.always_build_infrastructure) return true; |
1754 if (_settings_client.gui.always_build_infrastructure) return true; |
1755 |
1755 |
1756 UnitID max; |
1756 UnitID max; |
1757 switch (type) { |
1757 switch (type) { |
1758 case VEH_TRAIN: max = _settings_game.vehicle.max_trains; break; |
1758 case VEH_TRAIN: max = _settings_game.vehicle.max_trains; break; |