Module cargo

Functions for cargo

Class Cargo

cargo:delete () deletes the cargo pod
cargo:getAmount () get the amount of cargo in the pod
cargo:getCost () get the average cost of cargo in the pod
cargo:getOrigin () get the origin of cargo in the pod
cargo:getSize () get the size of the cargo pod
cargo:getType () get the type of cargo in the pod
cargo:setAmount (amount) sets the amount of cargo in the pod
cargo:setCost (cost) sets the average cost of cargo in the pod
cargo:setOrigin (origin) sets the origin of cargo in the pod
cargo:setSize (size) sets the size of the cargo pod
cargo:setType (type) sets the type of cargo in the pod


Class Cargo

Functions on cargo variables
cargo:delete ()
deletes the cargo pod
cargo:getAmount ()
get the amount of cargo in the pod

Returns:

    integer the amount of cargo in the pod
cargo:getCost ()
get the average cost of cargo in the pod

Returns:

    number the average cost of cargo in the pod
cargo:getOrigin ()
get the origin of cargo in the pod

Returns:

    integer the origin of cargo in the pod (i.e., the planet's UID)
cargo:getSize ()
get the size of the cargo pod

Returns:

    integer the size of the cargo pod
cargo:getType ()
get the type of cargo in the pod

Returns:

    integer the type of cargo in the pod
cargo:setAmount (amount)
sets the amount of cargo in the pod

Parameters:

  • amount integer the new amount of cargo in the pod

Returns:

    Cargo the cargo pod, for function chaining
cargo:setCost (cost)
sets the average cost of cargo in the pod

Parameters:

  • cost number the new average cost of cargo in the pod

Returns:

    Cargo the cargo pod, for function chaining
cargo:setOrigin (origin)
sets the origin of cargo in the pod

Parameters:

  • origin integer the new origin of cargo in the pod (i.e., the planet's UID)

Returns:

    Cargo the cargo pod, for function chaining
cargo:setSize (size)
sets the size of the cargo pod

Parameters:

  • size integer the new size of the pod

Returns:

    Cargo the cargo pod, for function chaining
cargo:setType (type)
sets the type of cargo in the pod

Parameters:

  • type integer the new type of cargo in the pod

Returns:

    Cargo the cargo pod, for function chaining
generated by LDoc 1.5.0 Last updated 2024-12-09 20:53:05