mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-21 01:59:44 +00:00
Doc: [Script] Update ScriptCargo::GetCargoIncome (#15271)
Update API docs to clarify distance is Manhattan tiles, rename days_in_transit unit to economy-days, update its max from 637 to 163838, and add a reference to ScriptEconomyTime.
This commit is contained in:
@@ -146,11 +146,12 @@ public:
|
||||
* given distance within the specified time.
|
||||
* @param cargo_type The cargo to transport.
|
||||
* @pre ScriptCargo::IsValidCargo(cargo_type).
|
||||
* @param distance The distance the cargo travels from begin to end.
|
||||
* @param distance The manhattan distance in tiles the cargo travels.
|
||||
* The value will be clamped to 0 .. MAX(uint32_t).
|
||||
* @param days_in_transit Amount of (game) days the cargo is in transit.
|
||||
* The max value of this variable is 637. Any value higher returns the same as 637 would.
|
||||
* @param days_in_transit Amount of economy-days the cargo is in transit.
|
||||
* The max value of this variable is 163838. Any value higher returns the same as 163838 would.
|
||||
* @return The amount of money that would be earned by this trip.
|
||||
* @see \ref ScriptEconomyTime
|
||||
*/
|
||||
static Money GetCargoIncome(CargoType cargo_type, SQInteger distance, SQInteger days_in_transit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user