mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-11 19:58:22 +00:00
# CARGO CLASS Removal
This commit is contained in:
@@ -511,24 +511,6 @@
|
||||
-- -- Start ARTY process.
|
||||
-- normandy:Start()
|
||||
--
|
||||
-- ### Transportation as Cargo
|
||||
-- This example demonstates how an ARTY group can be transported to another location as cargo.
|
||||
-- -- Define a group as CARGO_GROUP
|
||||
-- CargoGroupMortars=CARGO_GROUP:New(GROUP:FindByName("Mortars"), "Mortars", "Mortar Platoon Alpha", 100 , 10)
|
||||
--
|
||||
-- -- Define the mortar CARGO GROUP as ARTY object
|
||||
-- mortars=ARTY:NewFromCargoGroup(CargoGroupMortars, "Mortar Platoon Alpha")
|
||||
--
|
||||
-- -- Start ARTY process
|
||||
-- mortars:Start()
|
||||
--
|
||||
-- -- Setup AI cargo dispatcher for e.g. helos
|
||||
-- SetHeloCarriers = SET_GROUP:New():FilterPrefixes("CH-47D"):FilterStart()
|
||||
-- SetCargoMortars = SET_CARGO:New():FilterTypes("Mortars"):FilterStart()
|
||||
-- SetZoneDepoly = SET_ZONE:New():FilterPrefixes("Deploy"):FilterStart()
|
||||
-- CargoHelo=AI_CARGO_DISPATCHER_HELICOPTER:New(SetHeloCarriers, SetCargoMortars, SetZoneDepoly)
|
||||
-- CargoHelo:Start()
|
||||
-- The ARTY group will be transported and resume its normal operation after it has been deployed. New targets can be assigned at any time also during the transportation process.
|
||||
--
|
||||
-- @field #ARTY
|
||||
ARTY={
|
||||
@@ -1230,37 +1212,6 @@ function ARTY:New(group, alias)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Creates a new ARTY object from a MOOSE CARGO_GROUP object.
|
||||
-- @param #ARTY self
|
||||
-- @param Cargo.CargoGroup#CARGO_GROUP cargogroup The CARGO GROUP object for which artillery tasks should be assigned.
|
||||
-- @param alias (Optional) Alias name the group will be calling itself when sending messages. Default is the group name.
|
||||
-- @return #ARTY ARTY object or nil if group does not exist or is not a ground or naval group.
|
||||
function ARTY:NewFromCargoGroup(cargogroup, alias)
|
||||
|
||||
if cargogroup then
|
||||
BASE:T(string.format("ARTY script version %s. Added CARGO group %s.", ARTY.version, cargogroup:GetName()))
|
||||
else
|
||||
BASE:E("ERROR: Requested ARTY CARGO GROUP does not exist! (Has to be a MOOSE CARGO(!) group.)")
|
||||
return nil
|
||||
end
|
||||
|
||||
-- Get group belonging to the cargo group.
|
||||
local group=cargogroup:GetObject()
|
||||
|
||||
-- Create ARTY object.
|
||||
local arty=ARTY:New(group,alias)
|
||||
|
||||
-- Set iscargo flag.
|
||||
arty.iscargo=true
|
||||
|
||||
-- Set cargo group object.
|
||||
arty.cargogroup=cargogroup
|
||||
|
||||
return arty
|
||||
end
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- User Functions
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user