mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'develop' into FF/Ops
This commit is contained in:
commit
0adca414ce
@ -443,3 +443,14 @@ function MESSAGE:ToLog()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sends a MESSAGE to DCS log file if the given Condition is true.
|
||||
-- @param #MESSAGE self
|
||||
-- @return #MESSAGE self
|
||||
function MESSAGE:ToLogIf( Condition )
|
||||
|
||||
if Condition and Condition == true then
|
||||
env.info(self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ))
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
@ -179,7 +179,7 @@ do -- SET_BASE
|
||||
return Names
|
||||
end
|
||||
|
||||
--- Gets a list of the Objects in the Set.
|
||||
--- Return a table of the Objects in the Set.
|
||||
-- @param #SET_BASE self
|
||||
-- @return #SET_BASE self
|
||||
function SET_BASE:GetSetObjects() -- R2.3
|
||||
|
||||
@ -275,7 +275,7 @@ end
|
||||
|
||||
--- Initialize as dead.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param #boolean IsCargo If true, this static is dead.
|
||||
-- @param #boolean IsDead If true, this static is dead.
|
||||
-- @return #SPAWNSTATIC self
|
||||
function SPAWNSTATIC:InitDead(IsDead)
|
||||
self.InitStaticDead=IsDead
|
||||
|
||||
@ -3492,7 +3492,7 @@ function RAT:Status(message, forID)
|
||||
local fuel=group:GetFuel()*100.0
|
||||
local airborne=group:InAir()
|
||||
local coords=group:GetCoordinate()
|
||||
local alt=coords.y
|
||||
local alt=coords.y or 1000
|
||||
--local vel=group:GetVelocityKMH()
|
||||
local departure=ratcraft.departure:GetName()
|
||||
local destination=ratcraft.destination:GetName()
|
||||
|
||||
@ -3523,6 +3523,11 @@ function CTLD:AddCTLDZone(Name, Type, Color, Active, HasBeacon, Shiplength, Ship
|
||||
ctldzone.type = Type or CTLD.CargoZoneType.MOVE -- #CTLD.CargoZoneType
|
||||
ctldzone.hasbeacon = HasBeacon or false
|
||||
|
||||
if Type == CTLD.CargoZoneType.BEACON then
|
||||
self.droppedbeaconref[ctldzone.name] = zone:GetCoordinate()
|
||||
ctldzone.timestamp = timer.getTime()
|
||||
end
|
||||
|
||||
if HasBeacon then
|
||||
ctldzone.fmbeacon = self:_GetFMBeacon(Name)
|
||||
ctldzone.uhfbeacon = self:_GetUHFBeacon(Name)
|
||||
@ -3611,7 +3616,7 @@ function CTLD:CheckDroppedBeacons()
|
||||
|
||||
for _,_beacon in pairs (self.droppedBeacons) do
|
||||
local beacon = _beacon -- #CTLD.CargoZone
|
||||
if not beacon.timestamp then beacon.timestamp = timer.getTime() end
|
||||
if not beacon.timestamp then beacon.timestamp = timer.getTime() + timeout end
|
||||
local T0 = beacon.timestamp
|
||||
if timer.getTime() - T0 > timeout then
|
||||
local name = beacon.name
|
||||
@ -3686,15 +3691,19 @@ function CTLD:_AddRadioBeacon(Name, Sound, Mhz, Modulation, IsShip, IsDropped)
|
||||
if IsDropped and Zone then
|
||||
local ZoneCoord = Zone
|
||||
local ZoneVec3 = ZoneCoord:GetVec3()
|
||||
local Frequency = Mhz * 1000000 -- Freq in Hertz
|
||||
local Frequency = string.format("%09d",Mhz * 1000000) -- Freq in Hertz
|
||||
local Sound = "l10n/DEFAULT/"..Sound
|
||||
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000) -- Beacon in MP only runs for 30secs straight
|
||||
--local status = string.format("***** Beacon added Freq %s Mod %s", Mhz, UTILS.GetModulationName(Modulation))
|
||||
--MESSAGE:New(status,10,"Debug"):ToLogIf(self.debug)
|
||||
elseif Zone then
|
||||
local ZoneCoord = Zone:GetCoordinate()
|
||||
local ZoneCoord = Zone:GetCoordinate(2)
|
||||
local ZoneVec3 = ZoneCoord:GetVec3()
|
||||
local Frequency = Mhz * 1000000 -- Freq in Hertz
|
||||
local Frequency = string.format("%09d",Mhz * 1000000) -- Freq in Hertz
|
||||
local Sound = "l10n/DEFAULT/"..Sound
|
||||
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000) -- Beacon in MP only runs for 30secs straight
|
||||
--local status = string.format("***** Beacon added Freq %s Mod %s", Mhz, UTILS.GetModulationName(Modulation))
|
||||
--MESSAGE:New(status,10,"Debug"):ToLogIf(self.debug)
|
||||
end
|
||||
return self
|
||||
end
|
||||
@ -4612,7 +4621,7 @@ end
|
||||
-- @param Wrapper.Group#GROUP Vehicle The #GROUP object of the vehicle or FOB build.
|
||||
-- @return #CTLD self
|
||||
function CTLD:onbeforeCratesBuild(From, Event, To, Group, Unit, Vehicle)
|
||||
self:I({From, Event, To})
|
||||
self:T({From, Event, To})
|
||||
if Unit and Unit:IsPlayer() and self.PlayerTaskQueue then
|
||||
local playername = Unit:GetPlayerName()
|
||||
local dropcoord = Vehicle:GetCoordinate() or COORDINATE:New(0,0,0)
|
||||
|
||||
@ -104,7 +104,7 @@ PLAYERRECCE = {
|
||||
ClassName = "PLAYERRECCE",
|
||||
verbose = true,
|
||||
lid = nil,
|
||||
version = "0.0.15",
|
||||
version = "0.0.16",
|
||||
ViewZone = {},
|
||||
ViewZoneVisual = {},
|
||||
ViewZoneLaser = {},
|
||||
@ -958,9 +958,11 @@ function PLAYERRECCE:_SmokeTargets(client,group,playername)
|
||||
end
|
||||
|
||||
if self.SmokeOwn[playername] then
|
||||
local cc = client:GetCoordinate()
|
||||
local cc = client:GetVec2()
|
||||
-- don't smoke mid-air
|
||||
local lc = COORDINATE:NewFromVec2(cc,1)
|
||||
local color = self.SmokeColor.ownsmoke
|
||||
cc:Smoke(color)
|
||||
lc:Smoke(color)
|
||||
end
|
||||
|
||||
return self
|
||||
@ -1394,7 +1396,7 @@ end
|
||||
-- @param #string To
|
||||
-- @return #PLAYERRECCE self
|
||||
function PLAYERRECCE:onafterStatus(From, Event, To)
|
||||
self:I({From, Event, To})
|
||||
self:T({From, Event, To})
|
||||
|
||||
if not self.timestamp then
|
||||
self.timestamp = timer.getTime()
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
-- ===
|
||||
-- @module Ops.PlayerTask
|
||||
-- @image OPS_PlayerTask.jpg
|
||||
-- @date Last Update November 2022
|
||||
-- @date Last Update December 2022
|
||||
|
||||
|
||||
do
|
||||
@ -1409,7 +1409,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
||||
|
||||
--- PLAYERTASK class version.
|
||||
-- @field #string version
|
||||
PLAYERTASKCONTROLLER.version="0.1.50"
|
||||
PLAYERTASKCONTROLLER.version="0.1.51"
|
||||
|
||||
--- Create and run a new TASKCONTROLLER instance.
|
||||
-- @param #PLAYERTASKCONTROLLER self
|
||||
@ -2922,10 +2922,20 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Group, Client, Task)
|
||||
|
||||
if self.UseSRS then
|
||||
if string.find(CoordText," BR, ") then
|
||||
CoordText = string.gsub(CoordText," BR, "," Bee, Arr, ")
|
||||
CoordText = string.gsub(CoordText," BR, "," Bee, Arr; ")
|
||||
end
|
||||
if self.ShowMagnetic then
|
||||
text=string.gsub(text,"°M|","° magnetic, ")
|
||||
text=string.gsub(text,"°M|","° magnetic; ")
|
||||
end
|
||||
if string.find(CoordText,"MGRS") then
|
||||
local Text = string.gsub(CoordText,"%d","%1;") -- "0 5 1 "
|
||||
Text = string.gsub(Text," $","") -- "0 5 1"
|
||||
CoordText = string.gsub(Text,"0","zero")
|
||||
CoordText = string.gsub(Text,"MGRS","MGRS;")
|
||||
if self.PathToGoogleKey then
|
||||
CoordText = string.format("<say-as interpret-as='characters'>%s</say-as>",CoordText)
|
||||
end
|
||||
--self:I(self.lid.." | ".. CoordText)
|
||||
end
|
||||
local ThreatLocaleTextTTS = self.gettext:GetEntry("THREATTEXTTTS",self.locale)
|
||||
local ttstext = string.format(ThreatLocaleTextTTS,self.MenuName or self.Name,ttsplayername,ttstaskname,ThreatLevelText, targets, CoordText)
|
||||
|
||||
@ -68,7 +68,7 @@ Pene has kindly created a [tutorial series for MOOSE](https://youtube.com/playli
|
||||
|
||||
|
||||
|
||||
## [MOOSE on Discord](https://discord.gg/yBPfxC6)
|
||||
## [MOOSE on Discord](https://discord.gg/aQtjcR94Qf)
|
||||
|
||||
MOOSE has a living (chat and video) community of users, beta testers and contributors. The gathering point is a service provided by discord.com. If you want to join this community, just click Discord and you'll be on board in no time.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user