mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
CSAR - Added country options for spawned pilots
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
-- @module Ops.CSAR
|
-- @module Ops.CSAR
|
||||||
-- @image OPS_CSAR.jpg
|
-- @image OPS_CSAR.jpg
|
||||||
|
|
||||||
-- Date: Sep 2021
|
-- Date: Oct 2021
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
|
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
|
||||||
@@ -100,6 +100,11 @@
|
|||||||
-- -- (added 0.1.11)
|
-- -- (added 0.1.11)
|
||||||
-- self.rescuehoverheight = 20 -- max height for a hovering rescue in meters
|
-- self.rescuehoverheight = 20 -- max height for a hovering rescue in meters
|
||||||
-- self.rescuehoverdistance = 10 -- max distance for a hovering rescue in meters
|
-- self.rescuehoverdistance = 10 -- max distance for a hovering rescue in meters
|
||||||
|
-- -- (added 0.1.12)
|
||||||
|
-- -- Country codes for spawned pilots
|
||||||
|
-- self.countryblue= country.id.USA
|
||||||
|
-- self.countryred = country.id.RUSSIA
|
||||||
|
-- self.countryneutral = country.id.UN_PEACEKEEPERS
|
||||||
--
|
--
|
||||||
-- ## 2.1 Experimental Features
|
-- ## 2.1 Experimental Features
|
||||||
--
|
--
|
||||||
@@ -369,6 +374,11 @@ function CSAR:New(Coalition, Template, Alias)
|
|||||||
-- added 0.1.11r1
|
-- added 0.1.11r1
|
||||||
self.rescuehoverheight = 20
|
self.rescuehoverheight = 20
|
||||||
self.rescuehoverdistance = 10
|
self.rescuehoverdistance = 10
|
||||||
|
|
||||||
|
-- added 0.1.12
|
||||||
|
self.countryblue= country.id.USA
|
||||||
|
self.countryred = country.id.RUSSIA
|
||||||
|
self.countryneutral = country.id.UN_PEACEKEEPERS
|
||||||
|
|
||||||
-- WARNING - here\'ll be dragons
|
-- WARNING - here\'ll be dragons
|
||||||
-- for this to work you need to de-sanitize your mission environment in <DCS root>\Scripts\MissionScripting.lua
|
-- for this to work you need to de-sanitize your mission environment in <DCS root>\Scripts\MissionScripting.lua
|
||||||
@@ -556,6 +566,7 @@ function CSAR:_SpawnPilotInField(country,point,frequency)
|
|||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
math.random(i,10000)
|
math.random(i,10000)
|
||||||
end
|
end
|
||||||
|
if point:IsSurfaceTypeWater() then point.y = 0 end
|
||||||
local template = self.template
|
local template = self.template
|
||||||
local alias = string.format("Pilot %.2fkHz-%d", freq, math.random(1,99))
|
local alias = string.format("Pilot %.2fkHz-%d", freq, math.random(1,99))
|
||||||
local coalition = self.coalition
|
local coalition = self.coalition
|
||||||
@@ -694,11 +705,11 @@ function CSAR:_SpawnCsarAtZone( _zone, _coalition, _description, _randomPoint, _
|
|||||||
|
|
||||||
local _country = 0
|
local _country = 0
|
||||||
if _coalition == coalition.side.BLUE then
|
if _coalition == coalition.side.BLUE then
|
||||||
_country = country.id.USA
|
_country = self.countryblue
|
||||||
elseif _coalition == coalition.side.RED then
|
elseif _coalition == coalition.side.RED then
|
||||||
_country = country.id.RUSSIA
|
_country = self.countryred
|
||||||
else
|
else
|
||||||
_country = country.id.UN_PEACEKEEPERS
|
_country = self.countryneutral
|
||||||
end
|
end
|
||||||
|
|
||||||
self:_AddCsar(_coalition, _country, pos, typename, unitname, _description, freq, _nomessage, _description, forcedesc)
|
self:_AddCsar(_coalition, _country, pos, typename, unitname, _description, freq, _nomessage, _description, forcedesc)
|
||||||
@@ -1127,7 +1138,6 @@ end
|
|||||||
function CSAR:_IsLoadingDoorOpen( unit_name )
|
function CSAR:_IsLoadingDoorOpen( unit_name )
|
||||||
self:T(self.lid .. " _IsLoadingDoorOpen")
|
self:T(self.lid .. " _IsLoadingDoorOpen")
|
||||||
return UTILS.IsLoadingDoorOpen(unit_name)
|
return UTILS.IsLoadingDoorOpen(unit_name)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- (Internal) Function to check if heli is close to group.
|
--- (Internal) Function to check if heli is close to group.
|
||||||
|
|||||||
Reference in New Issue
Block a user