From 18fd9cdc3d5e1520700016d2495c31a609da5c4b Mon Sep 17 00:00:00 2001 From: acrojason Date: Thu, 4 Jun 2020 21:09:35 -0700 Subject: [PATCH] Initial AI_Cargo_Dispatcher_Ship --- .../Moose/AI/AI_Cargo_Dispatcher_Ship.lua | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Moose Development/Moose/AI/AI_Cargo_Dispatcher_Ship.lua diff --git a/Moose Development/Moose/AI/AI_Cargo_Dispatcher_Ship.lua b/Moose Development/Moose/AI/AI_Cargo_Dispatcher_Ship.lua new file mode 100644 index 000000000..ed4984381 --- /dev/null +++ b/Moose Development/Moose/AI/AI_Cargo_Dispatcher_Ship.lua @@ -0,0 +1,38 @@ +--- **AI** -- (2.5.1) - Models the intelligent transportation of infantry and other cargo using Ships + +-- @field #AI_CARGO_DISPATCHER_SHIP +AI_CARGO_DISPATCHER_SHIP = { + ClassName = "AI_CARGO_DISPATCHER_SHIP" + } + + function AI_CARGO_DISPATCHER_SHIP:New( ShipSet, CargoSet, PickupZoneSet, DeployZoneSet, ShippingLane ) + + local self = BASE:Inherit( self, AI_CARGO_DISPATCHER:New( ShipSet, CargoSet, PickupZoneSet, DeployZoneSet ) ) + + self:SetPickupSpeed( 60, 10 ) + self:SetDeploySpeed( 60, 10 ) + + self:SetPickupRadius( 500, 3000 ) + self:SetDeployRadius( 500, 3000 ) + + self:SetPickupHeight( 0, 0 ) + self:SetDeployHeight( 0, 0 ) + + self:SetShippingLane( ShippingLane ) + + self:SetMonitorTimeInterval( 600 ) + + return self + end + + function AI_CARGO_DISPATCHER_SHIP:SetShippingLane( ShippingLane ) + self.ShippingLane = ShippingLane + + return self + + end + + function AI_CARGO_DISPATCHER_SHIP:AICargo( Ship, CargoSet ) + + return AI_CARGO_SHIP:New( Ship, CargoSet, 0, self.ShippingLane ) + end \ No newline at end of file