Simutrans-Squirrel-API OTRP v63_4
Loading...
Searching...
No Matches
good_x Class Reference

Public Member Functions

halt_x get_destination ()
array< halt_x > get_transit_halts ()
coord get_destination_pos ()
good_desc_x get_desc ()
integer get_amount ()
bool is_passenger ()
bool is_mail ()
bool is_freight ()

Detailed Description

Represents a goods packet being transported by a vehicle. Obtained via convoy_x::get_cargo.

Definition at line 6 of file api_good.cc.

Member Function Documentation

◆ get_amount()

integer good_x::get_amount ( )
Returns
amount of goods in this packet

◆ get_desc()

good_desc_x good_x::get_desc ( )
Returns
goods type descriptor of this goods packet

◆ get_destination()

halt_x good_x::get_destination ( )
Returns
destination halt of this goods packet, or null if no destination halt

◆ get_destination_pos()

coord good_x::get_destination_pos ( )
Returns
destination position of this goods packet (target tile coordinate)

◆ get_transit_halts()

array< halt_x > good_x::get_transit_halts ( )
Returns
array of transit halts for this goods packet, including the final destination halt

◆ is_freight()

bool good_x::is_freight ( )
Returns
true if this goods packet carries freight (neither passengers nor mail)

◆ is_mail()

bool good_x::is_mail ( )
Returns
true if this goods packet carries mail

◆ is_passenger()

bool good_x::is_passenger ( )
Returns
true if this goods packet carries passengers

The documentation for this class was generated from the following file: