mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added ability to add mods
This commit is contained in:
parent
564a650403
commit
187b9be57a
@ -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
11
scripts/mods.lua
Normal 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"
|
||||
}
|
||||
@ -59,6 +59,9 @@ extern "C" DllExport int coreInit(lua_State* L, const char* path)
|
||||
log("Initializing core.dll with instance path " + instancePath);
|
||||
|
||||
sessionHash = random_string(16);
|
||||
|
||||
log("Random session hash " + sessionHash);
|
||||
|
||||
unitsManager = new UnitsManager(L);
|
||||
weaponsManager = new WeaponsManager(L);
|
||||
server = new Server(L);
|
||||
|
||||
@ -42,4 +42,5 @@ void registerLuaFunctions(lua_State* L)
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\OlympusCommand.lua");
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\unitPayloads.lua");
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\templates.lua");
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\mods.lua");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user