Added ability to add mods

This commit is contained in:
Pax1601
2023-12-08 11:54:12 +01:00
parent 564a650403
commit 187b9be57a
5 changed files with 23 additions and 2 deletions

View File

@@ -984,10 +984,16 @@ function Olympus.setUnitsData(arg, time)
table["category"] = "GroundUnit"
elseif unit:getDesc().category == Unit.Category.SHIP then
table["category"] = "NavyUnit"
elseif Olympus.modsList ~= nil and Olympus.modsList[unit:getDesc().typeName] ~= nil then
table["category"] = Olympus.modsList[unit:getDesc().typeName]
end
else
units[ID] = {isAlive = false}
Olympus.units[ID] = nil
if Olympus.modsList ~= nil and Olympus.modsList[unit:getDesc().typeName] ~= nil then
table["category"] = Olympus.modsList[unit:getDesc().typeName]
else
units[ID] = {isAlive = false}
Olympus.units[ID] = nil
end
end
-- If the category is handled by Olympus, get the data

11
scripts/mods.lua Normal file
View File

@@ -0,0 +1,11 @@
-- Enter here any mods required by your mission as in the example below.
-- Possible categories are:
-- Aircraft
-- Helicopter
-- GroundUnit
-- NavyUnit
Olympus.modsList = {
["A-4E-C"] = "Aircraft",
["Bronco-OV-10A"] = "Aircraft"
}