MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MayLoadUnderExclusiveRights

Function MayLoadUnderExclusiveRights

src/economy.cpp:1535–1538  ·  view source on GitHub ↗

* Test whether a vehicle can load cargo at a station even if exclusive transport rights are present. * @param st Station with cargo waiting to be loaded. * @param v Vehicle loading the cargo. * @return true when a vehicle can load the cargo. */

Source from the content-addressed store, hash-verified

1533 * @return true when a vehicle can load the cargo.
1534 */
1535static bool MayLoadUnderExclusiveRights(const Station *st, const Vehicle *v)
1536{
1537 return st->owner != OWNER_NONE || st->town->exclusive_counter == 0 || st->town->exclusivity == v->owner;
1538}
1539
1540struct ReserveCargoAction {
1541 Station *st;

Callers 2

operator()Method · 0.85
LoadUnloadVehicleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected