mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
OPS
- Fixed refuel system always true.
This commit is contained in:
parent
a8132552de
commit
b9b5938a91
@ -75,7 +75,7 @@ COHORT = {
|
|||||||
|
|
||||||
--- COHORT class version.
|
--- COHORT class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
COHORT.version="0.0.2"
|
COHORT.version="0.1.0"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
|
|||||||
@ -1947,7 +1947,19 @@ function LEGION.RecruitCohortAssets(Cohorts, MissionTypeRecruit, MissionTypeOpt,
|
|||||||
local InRange=(RangeMax and math.max(RangeMax, cohort.engageRange) or cohort.engageRange) >= TargetDistance
|
local InRange=(RangeMax and math.max(RangeMax, cohort.engageRange) or cohort.engageRange) >= TargetDistance
|
||||||
|
|
||||||
-- Has the requested refuelsystem?
|
-- Has the requested refuelsystem?
|
||||||
local Refuel=RefuelSystem and RefuelSystem==cohort.tankerSystem or true
|
local Refuel=RefuelSystem~=nil and (RefuelSystem==cohort.tankerSystem) or true
|
||||||
|
|
||||||
|
-- STRANGE: Why did the above line did not give the same result?! Above Refuel is always true!
|
||||||
|
local Refuel=true
|
||||||
|
if RefuelSystem then
|
||||||
|
if cohort.tankerSystem then
|
||||||
|
Refuel=RefuelSystem==cohort.tankerSystem
|
||||||
|
else
|
||||||
|
Refuel=false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--env.info(string.format("Cohort=%s: RefuelSystem=%s, TankerSystem=%s ==> Refuel=%s", cohort.name, tostring(RefuelSystem), tostring(cohort.tankerSystem), tostring(Refuel)))
|
||||||
|
|
||||||
-- Is capable of the mission type?
|
-- Is capable of the mission type?
|
||||||
local Capable=AUFTRAG.CheckMissionCapability({MissionTypeRecruit}, cohort.missiontypes)
|
local Capable=AUFTRAG.CheckMissionCapability({MissionTypeRecruit}, cohort.missiontypes)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user