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:
SamuXarick
2026-03-23 12:38:50 +00:00
committed by GitHub
parent 673d696989
commit 11d5558c60
+4 -3
View File
@@ -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);