Module Cargo.CargoUnit
Cargo - Management of single cargo logistics, which are based on a UNIT object.
Demo Missions
YouTube Playlist
Author: FlightControl
Contributions:
Global(s)
Global CARGO_UNIT |
Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. |
Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.
Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers. Note that ground forces behave in a group, and thus, act in formation, regardless if one unit is commanded to move.
This class is used in CARGO_GROUP, and is not meant to be used by mission designers individually.
Developer Note
Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE Therefore, this class is considered to be deprecated
Type(s)
Fields and Methods inherited from CARGO_UNIT | Description |
---|---|
Get the transportation method of the Cargo. |
|
CARGO_UNIT:New(CargoUnit, Type, Name, Weight, LoadRadius, NearRadius) |
CARGO_UNIT Constructor. |
CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, NearRadius, ...) |
Board Event. |
CARGO_UNIT:onafterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) |
Boarding Event. |
CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2, NearRadius) |
UnBoard Event. |
Loaded State. |
|
CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2, NearRadius) |
Enter UnBoarding State. |
CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2) |
Enter UnLoaded State. |
CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2, NearRadius) |
Leave UnBoarding State. |
Fields and Methods inherited from CARGO_REPRESENTABLE | Description |
---|---|
CARGO_REPRESENTABLE Destructor. |
|
Send a message to a Wrapper.Group through a communication channel near the cargo. |
|
CARGO_UNIT:New(CargoObject, Type, Name, LoadRadius, NearRadius) |
CARGO_REPRESENTABLE Constructor. |
Route a cargo unit to a PointVec2. |
Models CARGO in the form of units, which can be boarded, unboarded, loaded, unloaded.
Field(s)
Set cargo object.
Function(s)
Get the transportation method of the Cargo.
Defined in:
CARGO_UNIT
Return value:
#string:
The transportation method of the Cargo.
CARGO_UNIT Constructor.
Defined in:
CARGO_UNIT
Parameters:
Wrapper.Unit#UNIT CargoUnit
#string Type
#string Name
#number Weight
#number LoadRadius
(optional)
#number NearRadius
(optional)
Return value:
Board Event.
Defined in:
CARGO_UNIT
Parameters:
#string Event
#string From
#string To
Wrapper.Group#GROUP CargoCarrier
#number NearRadius
...
Boarding Event.
Defined in:
CARGO_UNIT
Parameters:
#string Event
#string From
#string To
Wrapper.Client#CLIENT CargoCarrier
#number NearRadius
Default 25 m.
...
UnBoard Event.
Defined in:
CARGO_UNIT
Parameters:
#string Event
#string From
#string To
Core.Point#POINT_VEC2 ToPointVec2
#number NearRadius
(optional) Defaut 100 m.
Loaded State.
Defined in:
CARGO_UNIT
Parameters:
#string Event
#string From
#string To
Wrapper.Unit#UNIT CargoCarrier
Enter UnBoarding State.
Defined in:
CARGO_UNIT
Parameters:
#string Event
#string From
#string To
Core.Point#POINT_VEC2 ToPointVec2
#number NearRadius
(optional) Defaut 25 m.
Enter UnLoaded State.
Defined in:
CARGO_UNIT
Parameters:
#string Event
#string From
#string To
Core
Point#POINT_VEC2
ToPointVec2
Leave UnBoarding State.
Defined in:
CARGO_UNIT
Parameters:
#string Event
#string From
#string To
Core.Point#POINT_VEC2 ToPointVec2
#number NearRadius
(optional) Defaut 100 m.
Field(s)
Set cargo object.
Function(s)
CARGO_REPRESENTABLE Destructor.
Send a message to a Wrapper.Group through a communication channel near the cargo.
Defined in:
Parameters:
#string Message
Wrapper.Group#GROUP TaskGroup
#string Name
(optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.
CARGO_REPRESENTABLE Constructor.
Defined in:
Parameters:
Wrapper.Positionable#POSITIONABLE CargoObject
The cargo object.
#string Type
Type name
#string Name
Name.
#number LoadRadius
(optional) Radius in meters.
#number NearRadius
(optional) Radius in meters when the cargo is loaded into the carrier.
Return value:
Route a cargo unit to a PointVec2.