Skip to content

Commit

Permalink
added support for the sa-5
Browse files Browse the repository at this point in the history
  • Loading branch information
walder committed Oct 18, 2021
1 parent 0d24891 commit 4aed920
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 2 deletions.
30 changes: 29 additions & 1 deletion demo-missions/skynet-iads-compiled.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
env.info("--- SKYNET VERSION: 2.2.0 | BUILD TIME: 28.07.2021 1023Z ---")
env.info("--- SKYNET VERSION: 2.3.0 | BUILD TIME: 18.10.2021 1046Z ---")
do
--this file contains the required units per sam type
samTypesDB = {

['S-200'] = {
['type'] = 'complex',
['searchRadar'] = {
['RLS_19J6'] = {
['name'] = {
['NATO'] = 'Tin Shield',
},
},
},
['EWR P-37 BAR LOCK'] = {
['Name'] = {
['NATO'] = "Bar lock",
},
},
['trackingRadar'] = {
['RPC_5N62V'] = {
},
},
['launchers'] = {
['S-200_Launcher'] = {
},
},
['name'] = {
['NATO'] = 'SA-5 Gammon',
},
['harm_detection_chance'] = 60
},
['S-300'] = {
['type'] = 'complex',
['searchRadar'] = {
Expand Down
Binary file modified demo-missions/skynet-test-persian-gulf -stress-test.miz
Binary file not shown.
Binary file modified demo-missions/skynet-test-persian-gulf.miz
Binary file not shown.
28 changes: 28 additions & 0 deletions skynet-iads-source/skynet-iads-supported-types.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
do
--this file contains the required units per sam type
samTypesDB = {

['S-200'] = {
['type'] = 'complex',
['searchRadar'] = {
['RLS_19J6'] = {
['name'] = {
['NATO'] = 'Tin Shield',
},
},
},
['EWR P-37 BAR LOCK'] = {
['Name'] = {
['NATO'] = "Bar lock",
},
},
['trackingRadar'] = {
['RPC_5N62V'] = {
},
},
['launchers'] = {
['S-200_Launcher'] = {
},
},
['name'] = {
['NATO'] = 'SA-5 Gammon',
},
['harm_detection_chance'] = 60
},
['S-300'] = {
['type'] = 'complex',
['searchRadar'] = {
Expand Down
Binary file modified unit-tests/highdigitsams/highdigitsams-unit-tests.miz
Binary file not shown.
2 changes: 1 addition & 1 deletion unit-tests/skynet-unit-tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ do

---IADS Unit Tests
SKYNET_UNIT_TESTS_NUM_EW_SITES_RED = 18
SKYNET_UNIT_TESTS_NUM_SAM_SITES_RED = 15
SKYNET_UNIT_TESTS_NUM_SAM_SITES_RED = 16

--factory method used in multiple unit tests
function IADSContactFactory(unitName)
Expand Down
Binary file modified unit-tests/skynet-unit-tests.miz
Binary file not shown.
15 changes: 15 additions & 0 deletions unit-tests/test-skynet-iads-abstract-radar-element.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,21 @@ Launcher:
lu.assertEquals(mist.utils.round(self.samSite:getRadars()[1]:getMaxRangeFindingTarget()), mist.utils.round(10090.756835938))
end

function TestSkynetIADSAbstractRadarElement:testSA5()
self.samSiteName = "SAM-SA-5"
self:setUp()
lu.assertEquals(self.samSite:getNatoName(), "SA-5")
local searchRadar = self.samSite:getSearchRadars()[1]
lu.assertEquals(searchRadar:getMaxRangeFindingTarget(), 100311.046875)
local trackingRadar = self.samSite:getTrackingRadars()[1]
lu.assertEquals(trackingRadar:getMaxRangeFindingTarget(), 100311.046875)
lu.assertEquals(self.samSite:getLaunchers()[1]:getRange(), 240000)
lu.assertEquals(self.samSite:getLaunchers()[1]:getInitialNumberOfMissiles(), 1)

-- lu.assertEquals(self.samSite:getLaunchers()[2]:getRange(), 61000)
--lu.assertEquals(self.samSite:getLaunchers()[2]:getInitialNumberOfMissiles(), 6)
end

--[[
function TestSkynetIADSAbstractRadarElement:testCallMethodOnTableElements()
local test = {}
Expand Down

0 comments on commit 4aed920

Please sign in to comment.