We're not worthy!!

planetmaker wrote:Thanks, Yorick, for your input. Reading through this, it gives me actually the idea how to split the whole thing into two patches:yorick wrote:I have some suggestions:
- Use SubtractMoneyFromAnyPlayer(Player *p, CommandCost cost) instead of SubtractMoneyFromPlayer(CommandCost cost) and setting the _current_player
- Merge SharedRailwayStations, SharedRoadStops, SharedHarbours and SharedAirports into one function.
- Have a fee for all types of stations, not only for ones owned by a player, but execute industry-stations like oil rigs and fishing grounds.
- Remove timelimit for ENABLING sharing, but keep it for disabling or changing fees if it's enabled.
- Rework CmdSetSharedBoolValues and CmdSetSharedIntValues to have the new value in p1 and the thing that changed in p2, because you can't change multiple at the time.
- receiving and paying royalties for the usage of property of a different owner (player and non-player all the same). Shared usage is already possible. e.g. for oil rigs. This would also allow for another patch: the construction of stations by the local authority. Especially downtown bus stations, ports or airports might come to my mind there.
- allowing the usage of other player's property, thus extending the shared infrastructure from towns to include also other players tracks and stations.
When time allows I'll have a close look at it.