Descriptor of goods and freight types.
Definition at line 396 of file api_obj_desc.cc.
◆ good_desc_x()
good_desc_x::good_desc_x |
( |
string |
name | ) |
|
Constructor.
- Parameters
-
name | raw name of the freight type. |
◆ calc_revenue()
integer good_desc_x::calc_revenue |
( |
way_types |
wt, |
|
|
integer |
speedkmh |
|
) |
| |
Calculates transport revenue per tile and freight unit. Takes speedbonus into account. Value contains an additional factor of 3000. Don't ask. Divide by 3000 after calculating revenue for a loaded convoy.
- Parameters
-
wt | waytype of vehicle |
speedkmh | actual achieved speed in km/h |
- Returns
- revenue
◆ get_catg_index()
integer good_desc_x::get_catg_index |
( |
| ) |
|
- Returns
- freight category. 0=Passengers, 1=Mail, 2=None, >=3 anything else
◆ get_weight_per_unit()
integer good_desc_x::get_weight_per_unit |
( |
| ) |
|
- Returns
- weight of one unit of this freight
◆ is_interchangeable()
Checks if this good can be interchanged with the other, in terms of transportability.
The documentation for this class was generated from the following file: