mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Progress
This commit is contained in:
parent
2e2aabdcc9
commit
f8f68ea695
@ -93,7 +93,7 @@ do -- TASK_CARGO
|
|||||||
|
|
||||||
Fsm:AddTransition( "WaitingForCommand", "RouteToDeploy", "RoutingToDeploy" )
|
Fsm:AddTransition( "WaitingForCommand", "RouteToDeploy", "RoutingToDeploy" )
|
||||||
Fsm:AddProcess ( "RoutingToDeploy", "RouteToDeployZone", ACT_ROUTE_ZONE:New(), { Arrived = "ArriveAtDeploy" } )
|
Fsm:AddProcess ( "RoutingToDeploy", "RouteToDeployZone", ACT_ROUTE_ZONE:New(), { Arrived = "ArriveAtDeploy" } )
|
||||||
Fsm:AddTransition( "ArrivedAtDeploy", "ArriveAtDeploy", "ArrivedAtDeploy" )
|
Fsm:AddTransition( "Arrived", "ArriveAtDeploy", "ArrivedAtDeploy" )
|
||||||
|
|
||||||
Fsm:AddTransition( { "ArrivedAtPickup", "ArrivedAtDeploy" }, "Land", "Landing" )
|
Fsm:AddTransition( { "ArrivedAtPickup", "ArrivedAtDeploy" }, "Land", "Landing" )
|
||||||
Fsm:AddTransition( "Landing", "Landed", "Landed" )
|
Fsm:AddTransition( "Landing", "Landed", "Landed" )
|
||||||
@ -222,14 +222,10 @@ do -- TASK_CARGO
|
|||||||
function Fsm:onafterArriveAtPickup( TaskUnit, Task )
|
function Fsm:onafterArriveAtPickup( TaskUnit, Task )
|
||||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||||
|
|
||||||
if self.Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
|
if TaskUnit:IsAir() then
|
||||||
if TaskUnit:IsAir() then
|
self:__Land( -0.1 )
|
||||||
self:__Land( -0.1 )
|
|
||||||
else
|
|
||||||
self:__SelectAction( -0.1 )
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
self:__ArriveAtPickup( -10 )
|
self:__SelectAction( -0.1 )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -254,14 +250,10 @@ do -- TASK_CARGO
|
|||||||
function Fsm:onafterArriveAtDeploy( TaskUnit, Task )
|
function Fsm:onafterArriveAtDeploy( TaskUnit, Task )
|
||||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||||
|
|
||||||
if TaskUnit:IsInZone( self.DeployZone ) then
|
if TaskUnit:IsAir() then
|
||||||
if TaskUnit:IsAir() then
|
self:__Land( -0.1 )
|
||||||
self:__Land( -0.1 )
|
|
||||||
else
|
|
||||||
self:__SelectAction( -0.1 )
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
self:__ArriveAtDeploy( -10 )
|
self:__SelectAction( -0.1 )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user