From 0d6fe49a4160c2416f67867fcc6f805847d0375b Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Mon, 3 Jul 2023 16:45:02 +0200 Subject: [PATCH] changes --- Moose Development/Moose/Functional/AmmoTruck.lua | 14 +++++++------- Moose Development/Moose/Wrapper/Controllable.lua | 15 ++++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Moose Development/Moose/Functional/AmmoTruck.lua b/Moose Development/Moose/Functional/AmmoTruck.lua index 218921e6c..7a87ce107 100644 --- a/Moose Development/Moose/Functional/AmmoTruck.lua +++ b/Moose Development/Moose/Functional/AmmoTruck.lua @@ -115,7 +115,7 @@ AMMOTRUCK = { ClassName = "AMMOTRUCK", lid = "", - version = "0.0.11", + version = "0.0.12", alias = "", debug = false, trucklist = {}, @@ -373,7 +373,7 @@ function AMMOTRUCK:CheckReturningTrucks(dataset) truck.statusquo = AMMOTRUCK.State.IDLE truck.timestamp = timer.getAbsTime() truck.coordinate = coord - truck.reloads = self.reloads or 5 + truck.reloads = self.reloads or 5 self:__TruckHome(1,truck) end end @@ -545,7 +545,7 @@ function AMMOTRUCK:CheckTrucksAlive() newtruck.statusquo = AMMOTRUCK.State.IDLE newtruck.timestamp = timer.getAbsTime() newtruck.coordinate = truck:GetCoordinate() - newtruck.reloads = self.reloads or 5 + newtruck.reloads = self.reloads or 5 self.trucklist[name] = newtruck end end @@ -632,10 +632,10 @@ function AMMOTRUCK:onafterMonitor(From, Event, To) unloadingtrucks[#unloadingtrucks+1] = data elseif data.statusquo == AMMOTRUCK.State.RETURNING then returningtrucks[#returningtrucks+1] = data - if data.reloads > 0 or data.reloads == -1 then - idletrucks[#idletrucks+1] = data - found = true - end + if data.reloads > 0 or data.reloads == -1 then + idletrucks[#idletrucks+1] = data + found = true + end end else self.truckset[data.name] = nil diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 45fad0c42..37067d492 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -52,6 +52,7 @@ -- * @{#CONTROLLABLE.TaskEmbarking}: (AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable. -- * @{#CONTROLLABLE.TaskEmbarkToTransport}: (GROUND) Embark to a Transport landed at a location. -- * @{#CONTROLLABLE.TaskEscort}: (AIR) Escort another airborne controllable. +-- * @{#CONTROLLABLE.TaskGroundEscort}: (AIR/HELO) Escort a ground controllable. -- * @{#CONTROLLABLE.TaskFAC_AttackGroup}: (AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction. -- * @{#CONTROLLABLE.TaskFireAtPoint}: (GROUND) Fire some or all ammunition at a VEC2 point. -- * @{#CONTROLLABLE.TaskFollow}: (AIR) Following another airborne controllable. @@ -1487,7 +1488,7 @@ end -- @param #CONTROLLABLE FollowControllable The controllable to be escorted. -- @param #number LastWaypointIndex (optional) Detach waypoint of another controllable. Once reached the unit / controllable Escort task is finished. -- @param #number OrbitDistance (optional) Maximum distance helo will orbit around the ground unit in meters. Defaults to 2000 meters. --- @param DCS#AttributeNameArray TargetTypes (optional) Array of AttributeName that is contains threat categories allowed to engage. Default {"Ground vehicles"}. See https://wiki.hoggit.us/view/DCS_enum_attributes +-- @param DCS#AttributeNameArray TargetTypes (optional) Array of AttributeName that is contains threat categories allowed to engage. Default {"Ground vehicles"}. See [https://wiki.hoggit.us/view/DCS_enum_attributes](https://wiki.hoggit.us/view/DCS_enum_attributes) -- @return DCS#Task The DCS task structure. function CONTROLLABLE:TaskGroundEscort( FollowControllable, LastWaypointIndex, OrbitDistance, TargetTypes ) @@ -1506,12 +1507,12 @@ function CONTROLLABLE:TaskGroundEscort( FollowControllable, LastWaypointIndex, O local DCSTask = { id = 'GroundEscort', params = { - groupId = FollowControllable and FollowControllable:GetID() or nil - engagementDistMax = OrbitDistance or 2000, - lastWptIndexFlag = LastWaypointIndex and true or false, - lastWptIndex = LastWaypointIndex, - targetTypes = TargetTypes or {"Ground vehicles"}, - lastWptIndexFlagChangedManually = true, + groupId = FollowControllable and FollowControllable:GetID() or nil, + engagementDistMax = OrbitDistance or 2000, + lastWptIndexFlag = LastWaypointIndex and true or false, + lastWptIndex = LastWaypointIndex, + targetTypes = TargetTypes or {"Ground vehicles"}, + lastWptIndexFlagChangedManually = true, }, }