mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge pull request #279 from Pax1601/coalitionChecker
Add files via upload
This commit is contained in:
commit
5f2f2a83dd
47
scripts/coals.lua
Normal file
47
scripts/coals.lua
Normal file
@ -0,0 +1,47 @@
|
||||
coal = {}
|
||||
|
||||
function coal.notify(message, displayFor)
|
||||
trigger.action.outText(message, displayFor)
|
||||
end
|
||||
|
||||
function coal.listRed()
|
||||
coal.coals = env.mission.coalitions.red --solid naming this
|
||||
coal.notify(mist.utils.tableShow(coal.coals),5)
|
||||
pickOne = math.random(#coal.coals)
|
||||
countryIs = country.name[coal.coals[pickOne]]
|
||||
coal.notify(countryIs,10)
|
||||
end
|
||||
|
||||
function coal.listBlue()
|
||||
coal.coals = env.mission.coalitions.blue --solid naming this
|
||||
coal.notify(mist.utils.tableShow(coal.coals),5)
|
||||
pickOne = math.random(#coal.coals)
|
||||
countryIs = country.name[coal.coals[pickOne]]
|
||||
coal.notify(countryIs,10)
|
||||
end
|
||||
|
||||
function coal.listNeutrals()
|
||||
coal.coals = env.mission.coalitions.neutrals --solid naming this
|
||||
coal.notify(mist.utils.tableShow(coal.coals),5)
|
||||
pickOne = math.random(#coal.coals)
|
||||
countryIs = country.name[coal.coals[pickOne]]
|
||||
coal.notify(countryIs,10)
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
longRangeShots = missionCommands.addSubMenu("Coal check")
|
||||
missionCommands.addCommand ("List reds", longRangeShots, coal.listRed)
|
||||
missionCommands.addCommand ("List blue", longRangeShots, coal.listBlue)
|
||||
missionCommands.addCommand ("List neutrals", longRangeShots, coal.listNeutrals)
|
||||
|
||||
end
|
||||
|
||||
coal.notify("coals.lua loaded", 2)
|
||||
|
||||
|
||||
-- env.mission.coalitions.red
|
||||
-- env.mission.coalitions.blue
|
||||
-- env.mission.coalitions.neutrals
|
||||
|
||||
--coalition.getCountryCoalition(countryID)
|
||||
Loading…
x
Reference in New Issue
Block a user