Merge branch 'master' into jgrpp
# Conflicts: # src/company_cmd.cpp # src/core/overflowsafe_type.hpp # src/economy.cpp # src/engine_base.h # src/ground_vehicle.cpp # src/group_gui.cpp # src/industry_cmd.cpp # src/industry_gui.cpp # src/newgrf_commons.cpp # src/newgrf_engine.cpp # src/newgrf_industries.cpp # src/newgrf_object.cpp # src/newgrf_roadstop.cpp # src/newgrf_station.cpp # src/rail_gui.cpp # src/road_cmd.h # src/road_gui.cpp # src/saveload/afterload.cpp # src/script/api/script_log.cpp # src/script/api/script_log.hpp # src/settings_gui.cpp # src/settingsgen/settingsgen.cpp # src/station_cmd.cpp # src/station_cmd.h # src/station_gui.cpp # src/strgen/strgen.cpp # src/string_func.h # src/string_type.h # src/table/settings/network_private_settings.ini # src/tests/math_func.cpp # src/textfile_gui.cpp # src/timetable_gui.cpp # src/town_cmd.cpp # src/vehicle.cpp # src/waypoint_cmd.cpp # src/waypoint_cmd.h # src/widgets/dropdown.cpp
This commit is contained in:
@@ -1015,7 +1015,7 @@ CommandCost IsRoadStopBridgeAboveOK(TileIndex tile, const RoadStopSpec *spec, bo
|
||||
* @param numtracks Number of platforms.
|
||||
* @return The cost in case of success, or an error code if it failed.
|
||||
*/
|
||||
static CommandCost CheckFlatLandRailStation(TileArea tile_area, DoCommandFlag flags, Axis axis, StationID *station, RailType rt, std::vector<Train *> &affected_vehicles, StationClassID spec_class, byte spec_index, byte plat_len, byte numtracks)
|
||||
static CommandCost CheckFlatLandRailStation(TileArea tile_area, DoCommandFlag flags, Axis axis, StationID *station, RailType rt, std::vector<Train *> &affected_vehicles, StationClassID spec_class, uint16_t spec_index, byte plat_len, byte numtracks)
|
||||
{
|
||||
CommandCost cost(EXPENSES_CONSTRUCTION);
|
||||
int allowed_z = -1;
|
||||
@@ -1484,7 +1484,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
|
||||
bool adjacent = HasBit(p1, 24);
|
||||
|
||||
StationClassID spec_class = Extract<StationClassID, 0, 8>(p2);
|
||||
byte spec_index = GB(p3, 0, 16);
|
||||
uint16 spec_index = GB(p3, 0, 16);
|
||||
StationID station_to_join = GB(p2, 16, 16);
|
||||
|
||||
/* Does the authority allow this? */
|
||||
@@ -4251,7 +4251,7 @@ int GetTargetRating(const Station *st, const CargoSpec *cs, const GoodsEntry *ge
|
||||
rating += GetStatueRating(st);
|
||||
rating += GetVehicleAgeRating(ge);
|
||||
|
||||
return Clamp(rating, 0, 255);
|
||||
return ClampTo<uint8>(rating);
|
||||
}
|
||||
|
||||
static void UpdateStationRating(Station *st)
|
||||
@@ -4671,7 +4671,7 @@ void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint rad
|
||||
GoodsEntry *ge = &st->goods[i];
|
||||
|
||||
if (ge->status != 0) {
|
||||
ge->rating = Clamp(ge->rating + amount, 0, 255);
|
||||
ge->rating = ClampTo<uint8_t>(ge->rating + amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user