mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#CSAR
* Make rescued pilot's weight configureable
This commit is contained in:
parent
a125497fe7
commit
4fb98cf72b
@ -30,7 +30,7 @@
|
|||||||
-- @module Ops.CSAR
|
-- @module Ops.CSAR
|
||||||
-- @image OPS_CSAR.jpg
|
-- @image OPS_CSAR.jpg
|
||||||
|
|
||||||
-- Date: October 2022
|
-- Date: November 2022
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
|
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
|
||||||
@ -114,6 +114,7 @@
|
|||||||
-- mycsar.countryneutral = country.id.UN_PEACEKEEPERS
|
-- mycsar.countryneutral = country.id.UN_PEACEKEEPERS
|
||||||
-- mycsar.topmenuname = "CSAR" -- set the menu entry name
|
-- mycsar.topmenuname = "CSAR" -- set the menu entry name
|
||||||
-- mycsar.ADFRadioPwr = 1000 -- ADF Beacons sending with 1KW as default
|
-- mycsar.ADFRadioPwr = 1000 -- ADF Beacons sending with 1KW as default
|
||||||
|
-- mycsar.PilotWeight = 80 -- Loaded pilots weigh 80kgs each
|
||||||
--
|
--
|
||||||
-- ## 2.1 Experimental Features
|
-- ## 2.1 Experimental Features
|
||||||
--
|
--
|
||||||
@ -233,6 +234,7 @@ CSAR = {
|
|||||||
allheligroupset = nil,
|
allheligroupset = nil,
|
||||||
topmenuname = "CSAR",
|
topmenuname = "CSAR",
|
||||||
ADFRadioPwr = 1000,
|
ADFRadioPwr = 1000,
|
||||||
|
PilotWeight = 80,
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Downed pilots info.
|
--- Downed pilots info.
|
||||||
@ -270,7 +272,7 @@ CSAR.AircraftType["Bronco-OV-10A"] = 2
|
|||||||
|
|
||||||
--- CSAR class version.
|
--- CSAR class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CSAR.version="1.0.15"
|
CSAR.version="1.0.16"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- ToDo list
|
-- ToDo list
|
||||||
@ -278,7 +280,7 @@ CSAR.version="1.0.15"
|
|||||||
|
|
||||||
-- DONE: SRS Integration (to be tested)
|
-- DONE: SRS Integration (to be tested)
|
||||||
-- TODO: Maybe - add option to smoke/flare closest MASH
|
-- TODO: Maybe - add option to smoke/flare closest MASH
|
||||||
-- TODO: shagrat Add cargoWeight to helicopter when pilot boarded
|
-- DONE: shagrat Add cargoWeight to helicopter when pilot boarded
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- Constructor
|
-- Constructor
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
@ -418,11 +420,14 @@ function CSAR:New(Coalition, Template, Alias)
|
|||||||
self.wetfeettemplate = nil
|
self.wetfeettemplate = nil
|
||||||
self.usewetfeet = false
|
self.usewetfeet = false
|
||||||
|
|
||||||
-- added 0.1.8
|
-- added 1.0.15
|
||||||
self.allowbronco = false -- set to true to use the Bronco mod as a CSAR plane
|
self.allowbronco = false -- set to true to use the Bronco mod as a CSAR plane
|
||||||
|
|
||||||
self.ADFRadioPwr = 1000
|
self.ADFRadioPwr = 1000
|
||||||
|
|
||||||
|
-- added 1.0.16
|
||||||
|
self.PilotWeight = 80
|
||||||
|
|
||||||
-- 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
|
||||||
-- needs SRS => 1.9.6 to work (works on the *server* side)
|
-- needs SRS => 1.9.6 to work (works on the *server* side)
|
||||||
@ -1397,7 +1402,7 @@ end
|
|||||||
-- @return #CSAR self
|
-- @return #CSAR self
|
||||||
function CSAR:_UpdateUnitCargoMass(_heliName)
|
function CSAR:_UpdateUnitCargoMass(_heliName)
|
||||||
self:T(self.lid .. " _UpdateUnitCargoMass")
|
self:T(self.lid .. " _UpdateUnitCargoMass")
|
||||||
local calculatedMass = self:_PilotsOnboard(_heliName)*80
|
local calculatedMass = self:_PilotsOnboard(_heliName)*(self.PilotWeight or 80)
|
||||||
local Unit = UNIT:FindByName(_heliName)
|
local Unit = UNIT:FindByName(_heliName)
|
||||||
if Unit then
|
if Unit then
|
||||||
Unit:SetUnitInternalCargo(calculatedMass)
|
Unit:SetUnitInternalCargo(calculatedMass)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user