Doc: [Script] Extend API documentation on calendar- vs economy-time

This commit is contained in:
frosch
2024-03-23 21:34:31 +01:00
committed by Peter Nelson
parent 04cc0c8125
commit dc22edc556
15 changed files with 154 additions and 89 deletions

View File

@@ -188,8 +188,8 @@ public:
* Get the current age of a vehicle.
* @param vehicle_id The vehicle to get the age of.
* @pre IsValidVehicle(vehicle_id).
* @return The current age the vehicle has.
* @note The age is in days.
* @return The current age of the vehicle in calendar-days.
* @see \ref ScriptCalendarTime
*/
static SQInteger GetAge(VehicleID vehicle_id);
@@ -199,8 +199,8 @@ public:
* @param wagon The wagon in the vehicle to get the age of.
* @pre IsValidVehicle(vehicle_id).
* @pre wagon < GetNumWagons(vehicle_id).
* @return The current age the vehicle has.
* @note The age is in days.
* @return The current age of the vehicle in calendar-days.
* @see \ref ScriptCalendarTime
*/
static SQInteger GetWagonAge(VehicleID vehicle_id, SQInteger wagon);
@@ -208,8 +208,8 @@ public:
* Get the maximum age of a vehicle.
* @param vehicle_id The vehicle to get the age of.
* @pre IsPrimaryVehicle(vehicle_id).
* @return The maximum age the vehicle has.
* @note The age is in days.
* @return The maximum age for the vehicle in calendar-days.
* @see \ref ScriptCalendarTime
*/
static SQInteger GetMaxAge(VehicleID vehicle_id);
@@ -217,8 +217,8 @@ public:
* Get the age a vehicle has left (maximum - current).
* @param vehicle_id The vehicle to get the age of.
* @pre IsPrimaryVehicle(vehicle_id).
* @return The age the vehicle has left.
* @note The age is in days.
* @return The remaining age of the vehicle in calendar-days.
* @see \ref ScriptCalendarTime
*/
static SQInteger GetAgeLeft(VehicleID vehicle_id);
@@ -245,10 +245,10 @@ public:
* Get the running cost of this vehicle.
* @param vehicle_id The vehicle to get the running cost of.
* @pre IsPrimaryVehicle(vehicle_id).
* @return The running cost of the vehicle per year.
* @note Cost is per year; divide by 365 to get per day.
* @return The running cost of the vehicle per economy-year.
* @note This is not equal to ScriptEngine::GetRunningCost for Trains, because
* wagons and second engines can add up in the calculation too.
* @see \ref ScriptEconomyTime
*/
static Money GetRunningCost(VehicleID vehicle_id);
@@ -256,7 +256,8 @@ public:
* Get the current profit of a vehicle.
* @param vehicle_id The vehicle to get the profit of.
* @pre IsPrimaryVehicle(vehicle_id).
* @return The current profit the vehicle has.
* @return The profit the vehicle has made this economy-year so far.
* @see \ref ScriptEconomyTime
*/
static Money GetProfitThisYear(VehicleID vehicle_id);
@@ -264,7 +265,8 @@ public:
* Get the profit of last year of a vehicle.
* @param vehicle_id The vehicle to get the profit of.
* @pre IsPrimaryVehicle(vehicle_id).
* @return The profit the vehicle had last year.
* @return The profit the vehicle made in the previous economy-year.
* @see \ref ScriptEconomyTime
*/
static Money GetProfitLastYear(VehicleID vehicle_id);