From 11d5558c6049da305e60eac0a2fc0a6ee3e3bca1 Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:38:50 +0000 Subject: [PATCH] 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. --- src/script/api/script_cargo.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/script/api/script_cargo.hpp b/src/script/api/script_cargo.hpp index bf2a9a5cfd..6c9087111b 100644 --- a/src/script/api/script_cargo.hpp +++ b/src/script/api/script_cargo.hpp @@ -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);