Merge branch 'master' into jgrpp
# Conflicts: # src/3rdparty/squirrel/include/squirrel.h # src/blitter/32bpp_sse_func.hpp # src/bridge_map.h # src/clear_map.h # src/company_manager_face.h # src/console_func.h # src/core/bitmath_func.hpp # src/core/endian_func.hpp # src/core/random_func.hpp # src/depot_map.h # src/elrail_func.h # src/fontcache.h # src/industry_map.h # src/map_func.h # src/newgrf_spritegroup.h # src/object_map.h # src/rail.h # src/rail_map.h # src/road_func.h # src/road_map.h # src/saveload/saveload.h # src/saveload/saveload_error.hpp # src/settings_gui.cpp # src/sl/oldloader.h # src/sprite.h # src/spritecache.h # src/station_func.h # src/station_map.h # src/story_base.h # src/strings_func.h # src/tile_cmd.h # src/tile_map.h # src/tile_type.h # src/town.h # src/town_map.h # src/tree_map.h # src/tunnel_map.h # src/tunnelbridge_map.h # src/vehicle_func.h # src/viewport_func.h # src/void_map.h # src/water.h # src/water_map.h # src/widget_type.h
This commit is contained in:
@@ -30,7 +30,7 @@ void UpdateAllBlockSignals(Owner owner = INVALID_OWNER);
|
||||
* @param infra_owner The owner of the infrastructure.
|
||||
* @return True if infrastructure usage is allowed, false otherwise.
|
||||
*/
|
||||
static inline bool IsInfraUsageAllowed(VehicleType type, Owner veh_owner, Owner infra_owner)
|
||||
inline bool IsInfraUsageAllowed(VehicleType type, Owner veh_owner, Owner infra_owner)
|
||||
{
|
||||
return infra_owner == veh_owner || infra_owner == OWNER_NONE || _settings_game.economy.infrastructure_sharing[type];
|
||||
}
|
||||
@@ -42,7 +42,7 @@ static inline bool IsInfraUsageAllowed(VehicleType type, Owner veh_owner, Owner
|
||||
* @param tile The tile that may or may not be used.
|
||||
* @return True if infrastructure usage is allowed, false otherwise.
|
||||
*/
|
||||
static inline bool IsInfraTileUsageAllowed(VehicleType type, Owner veh_owner, TileIndex tile)
|
||||
inline bool IsInfraTileUsageAllowed(VehicleType type, Owner veh_owner, TileIndex tile)
|
||||
{
|
||||
return IsInfraUsageAllowed(type, veh_owner, GetTileOwner(tile));
|
||||
}
|
||||
@@ -57,7 +57,7 @@ static inline bool IsInfraTileUsageAllowed(VehicleType type, Owner veh_owner, Ti
|
||||
* @param tile Tile of the infrastructure.
|
||||
* @return CommandCost indicating success or failure.
|
||||
*/
|
||||
static inline CommandCost CheckInfraUsageAllowed(VehicleType type, Owner infra_owner, TileIndex tile = 0)
|
||||
inline CommandCost CheckInfraUsageAllowed(VehicleType type, Owner infra_owner, TileIndex tile = 0)
|
||||
{
|
||||
if (infra_owner == OWNER_NONE || _settings_game.economy.infrastructure_sharing[type]) return CommandCost();
|
||||
return CheckOwnership(infra_owner, tile);
|
||||
@@ -70,7 +70,7 @@ static inline CommandCost CheckInfraUsageAllowed(VehicleType type, Owner infra_o
|
||||
* @param o The company which may or may not control this vehicle.
|
||||
* @return True if the given company is allowed to control this vehicle.
|
||||
*/
|
||||
static inline bool IsVehicleControlAllowed(const Vehicle *v, Owner o)
|
||||
inline bool IsVehicleControlAllowed(const Vehicle *v, Owner o)
|
||||
{
|
||||
return v->owner == o || (v->type == VEH_TRAIN && IsTileOwner(v->tile, o) && !v->IsChainInDepot());
|
||||
}
|
||||
@@ -82,7 +82,7 @@ static inline bool IsVehicleControlAllowed(const Vehicle *v, Owner o)
|
||||
* @param v The vehicle which may or may not be controlled.
|
||||
* @return CommandCost indicating success or failure.
|
||||
*/
|
||||
static inline CommandCost CheckVehicleControlAllowed(const Vehicle *v)
|
||||
inline CommandCost CheckVehicleControlAllowed(const Vehicle *v)
|
||||
{
|
||||
if (v->type == VEH_TRAIN && IsTileOwner(v->tile, _current_company) && !v->IsChainInDepot()) return CommandCost();
|
||||
return CheckOwnership(v->owner);
|
||||
@@ -96,7 +96,7 @@ static inline CommandCost CheckVehicleControlAllowed(const Vehicle *v)
|
||||
* @param o2 Second track owner.
|
||||
* @return True if tracks of the two owners are part of the same signal block.
|
||||
*/
|
||||
static inline bool IsOneSignalBlock(Owner o1, Owner o2)
|
||||
inline bool IsOneSignalBlock(Owner o1, Owner o2)
|
||||
{
|
||||
return o1 == o2 || _settings_game.economy.infrastructure_sharing[VEH_TRAIN];
|
||||
}
|
||||
|
Reference in New Issue
Block a user