diff --git a/demo-missions/moose_a2a_connector/skynet-and-moose-a2a-dispatcher.miz b/demo-missions/moose_a2a_connector/skynet-and-moose-a2a-dispatcher.miz index ae7ebe1..ba8ab84 100644 Binary files a/demo-missions/moose_a2a_connector/skynet-and-moose-a2a-dispatcher.miz and b/demo-missions/moose_a2a_connector/skynet-and-moose-a2a-dispatcher.miz differ diff --git a/demo-missions/skynet-iads-compiled.lua b/demo-missions/skynet-iads-compiled.lua index 7b7939a..acc0939 100644 --- a/demo-missions/skynet-iads-compiled.lua +++ b/demo-missions/skynet-iads-compiled.lua @@ -1,4 +1,4 @@ -env.info("--- SKYNET VERSION: 2.0.1 | BUILD TIME: 04.01.2021 0706Z ---") +env.info("--- SKYNET VERSION: 2.0.2 | BUILD TIME: 19.03.2021 1837Z ---") do --this file contains the required units per sam type samTypesDB = { @@ -2545,6 +2545,10 @@ end function SkynetIADSAbstractRadarElement.finishHarmDefence(self) mist.removeFunction(self.harmSilenceID) self.harmSilenceID = nil + + if ( self:getAutonomousState() == true ) then + self:goAutonomous() + end end function SkynetIADSAbstractRadarElement:getDetectedTargets() diff --git a/demo-missions/skynet-test-persian-gulf -stress-test.miz b/demo-missions/skynet-test-persian-gulf -stress-test.miz index bcf67fe..249c292 100644 Binary files a/demo-missions/skynet-test-persian-gulf -stress-test.miz and b/demo-missions/skynet-test-persian-gulf -stress-test.miz differ diff --git a/demo-missions/skynet-test-persian-gulf.miz b/demo-missions/skynet-test-persian-gulf.miz index 9279a45..5a2bebc 100644 Binary files a/demo-missions/skynet-test-persian-gulf.miz and b/demo-missions/skynet-test-persian-gulf.miz differ diff --git a/skynet-iads-source/skynet-iads-abstract-radar-element.lua b/skynet-iads-source/skynet-iads-abstract-radar-element.lua index cf7b834..fab77c8 100644 --- a/skynet-iads-source/skynet-iads-abstract-radar-element.lua +++ b/skynet-iads-source/skynet-iads-abstract-radar-element.lua @@ -662,6 +662,10 @@ end function SkynetIADSAbstractRadarElement.finishHarmDefence(self) mist.removeFunction(self.harmSilenceID) self.harmSilenceID = nil + + if ( self:getAutonomousState() == true ) then + self:goAutonomous() + end end function SkynetIADSAbstractRadarElement:getDetectedTargets() diff --git a/unit-tests/highdigitsams/highdigitsams-unit-tests.miz b/unit-tests/highdigitsams/highdigitsams-unit-tests.miz index 99dc3e9..af599d1 100644 Binary files a/unit-tests/highdigitsams/highdigitsams-unit-tests.miz and b/unit-tests/highdigitsams/highdigitsams-unit-tests.miz differ diff --git a/unit-tests/highdigitsams/test-skynet-high-digit-sam-sites.lua b/unit-tests/highdigitsams/test-skynet-high-digit-sam-sites.lua index c1c3105..412ef6a 100644 --- a/unit-tests/highdigitsams/test-skynet-high-digit-sam-sites.lua +++ b/unit-tests/highdigitsams/test-skynet-high-digit-sam-sites.lua @@ -125,7 +125,7 @@ function TestSyknetIADSHighDigitSAMSites:testSA23GladiatorOrGiant() local launcher1 = launchers[2] lu.assertEquals(launcher1:getTypeName(), "S-300VM 9A82ME ln") lu.assertEquals(launcher1:getRange(), 200000) - lu.assertEquals(launcher1:getMaximumFiringAltitude(), 40000) + lu.assertEquals(launcher1:getMaximumFiringAltitude(), 37000) lu.assertEquals(launcher1:getInitialNumberOfMissiles(), 2) local searchRadars = self.samSite:getSearchRadars() @@ -252,8 +252,7 @@ function TestSyknetIADSHighDigitSAMSites:testSA2GuidelineWithV7595V23() lu.assertEquals(launcher1:getTypeName(), "S_75M_Volhov_V759") lu.assertEquals(launcher1:getRange(), 56000) lu.assertEquals(launcher1:getMaximumFiringAltitude(), 30000) - --should read as 1, bugreport filed: https://github.com/Auranis/HighDigitSAMs/issues/11 - lu.assertEquals(launcher1:getInitialNumberOfMissiles(), 4) + lu.assertEquals(launcher1:getInitialNumberOfMissiles(), 1) end function TestSyknetIADSHighDigitSAMSites:testSA3GoaWithV601P5V27() @@ -268,7 +267,6 @@ function TestSyknetIADSHighDigitSAMSites:testSA3GoaWithV601P5V27() lu.assertEquals(launcher1:getTypeName(), "5p73 V-601P ln") lu.assertEquals(launcher1:getRange(), 25000) lu.assertEquals(launcher1:getMaximumFiringAltitude(), 18000) - --should read as 1, bugreport filed: https://github.com/Auranis/HighDigitSAMs/issues/11 lu.assertEquals(launcher1:getInitialNumberOfMissiles(), 4) end @@ -284,8 +282,7 @@ function TestSyknetIADSHighDigitSAMSites:testSA2GuidelineWithHQ2() lu.assertEquals(launcher1:getTypeName(), "HQ_2_Guideline_LN") lu.assertEquals(launcher1:getRange(), 50000) lu.assertEquals(launcher1:getMaximumFiringAltitude(), 30000) - --should read as 1, bugreport filed: https://github.com/Auranis/HighDigitSAMs/issues/11 - lu.assertEquals(launcher1:getInitialNumberOfMissiles(), 4) + lu.assertEquals(launcher1:getInitialNumberOfMissiles(), 1) end diff --git a/unit-tests/skynet-unit-tests.miz b/unit-tests/skynet-unit-tests.miz index 471ed1e..b9070be 100644 Binary files a/unit-tests/skynet-unit-tests.miz and b/unit-tests/skynet-unit-tests.miz differ diff --git a/unit-tests/test-skynet-iads-abstract-radar-element.lua b/unit-tests/test-skynet-iads-abstract-radar-element.lua index 6720182..5213162 100644 --- a/unit-tests/test-skynet-iads-abstract-radar-element.lua +++ b/unit-tests/test-skynet-iads-abstract-radar-element.lua @@ -300,6 +300,15 @@ function TestSkynetIADSAbstractRadarElement:testSetToCorrectAutonomousState() end +function TestSkynetIADSAbstractRadarElement:testWillGoLiveWhenAutonomousAndHARMDefenceFinished() + self.samSiteName = "SAM-SA-6-2" + self:setUp() + self.samSite:setAutonomousBehaviour(SkynetIADSAbstractRadarElement.AUTONOMOUS_STATE_DCS_AI) + self.samSite:goSilentToEvadeHARM(1) + self.samSite:finishHarmDefence() + lu.assertEquals(self.samSite:isActive(), true) +end + -- TODO: write test for updateMissilesInFlight in AbstractRadarElement function TestSkynetIADSAbstractRadarElement:testUpdateMissilesInFlight() self.samSiteName = "SAM-SA-6-2"