mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#Rap up changes
This commit is contained in:
parent
3105f7407d
commit
e746617139
@ -741,7 +741,31 @@ do -- Event Handling
|
|||||||
-- @function [parent=#BASE] OnEventPlayerEnterAircraft
|
-- @function [parent=#BASE] OnEventPlayerEnterAircraft
|
||||||
-- @param #BASE self
|
-- @param #BASE self
|
||||||
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||||
|
|
||||||
|
--- Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
|
||||||
|
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
|
||||||
|
-- @function [parent=#BASE] OnEventNewDynamicCargo
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||||
|
|
||||||
|
--- Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
|
||||||
|
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
|
||||||
|
-- @function [parent=#BASE] OnEventDynamicCargoLoaded
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||||
|
|
||||||
|
--- Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
|
||||||
|
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
|
||||||
|
-- @function [parent=#BASE] OnEventDynamicCargoUnloaded
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||||
|
|
||||||
|
--- Occurs when a dynamic cargo crate is removed.
|
||||||
|
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
|
||||||
|
-- @function [parent=#BASE] OnEventDynamicCargoRemoved
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Creation of a Birth Event.
|
--- Creation of a Birth Event.
|
||||||
@ -862,6 +886,62 @@ end
|
|||||||
|
|
||||||
world.onEvent(Event)
|
world.onEvent(Event)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
|
||||||
|
function BASE:CreateEventNewDynamicCargo(DynamicCargo)
|
||||||
|
self:F({DynamicCargo})
|
||||||
|
local Event = {
|
||||||
|
id = EVENTS.NewDynamicCargo,
|
||||||
|
time = timer.getTime(),
|
||||||
|
dynamiccargo = DynamicCargo,
|
||||||
|
initiator = DynamicCargo:GetDCSObject(),
|
||||||
|
}
|
||||||
|
world.onEvent( Event )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
|
||||||
|
function BASE:CreateEventDynamicCargoLoaded(DynamicCargo)
|
||||||
|
self:F({DynamicCargo})
|
||||||
|
local Event = {
|
||||||
|
id = EVENTS.DynamicCargoLoaded,
|
||||||
|
time = timer.getTime(),
|
||||||
|
dynamiccargo = DynamicCargo,
|
||||||
|
initiator = DynamicCargo:GetDCSObject(),
|
||||||
|
}
|
||||||
|
world.onEvent( Event )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
|
||||||
|
function BASE:CreateEventDynamicCargoUnloaded(DynamicCargo)
|
||||||
|
self:F({DynamicCargo})
|
||||||
|
local Event = {
|
||||||
|
id = EVENTS.DynamicCargoUnloaded,
|
||||||
|
time = timer.getTime(),
|
||||||
|
dynamiccargo = DynamicCargo,
|
||||||
|
initiator = DynamicCargo:GetDCSObject(),
|
||||||
|
}
|
||||||
|
world.onEvent( Event )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
|
||||||
|
function BASE:CreateEventDynamicCargoRemoved(DynamicCargo)
|
||||||
|
self:F({DynamicCargo})
|
||||||
|
local Event = {
|
||||||
|
id = EVENTS.DynamicCargoRemoved,
|
||||||
|
time = timer.getTime(),
|
||||||
|
dynamiccargo = DynamicCargo,
|
||||||
|
initiator = DynamicCargo:GetDCSObject(),
|
||||||
|
}
|
||||||
|
world.onEvent( Event )
|
||||||
|
end
|
||||||
|
|
||||||
--- The main event handling function... This function captures all events generated for the class.
|
--- The main event handling function... This function captures all events generated for the class.
|
||||||
-- @param #BASE self
|
-- @param #BASE self
|
||||||
@ -1157,6 +1237,15 @@ function BASE:_Serialize(Arguments)
|
|||||||
return text
|
return text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
----- (Internal) Serialize arguments
|
||||||
|
---- @param #BASE self
|
||||||
|
---- @param #table Arguments
|
||||||
|
---- @return #string Text
|
||||||
|
--function BASE:_Serialize(Arguments)
|
||||||
|
-- local text=UTILS.BasicSerialize(Arguments)
|
||||||
|
-- return text
|
||||||
|
--end
|
||||||
|
|
||||||
--- Trace a function call. This function is private.
|
--- Trace a function call. This function is private.
|
||||||
-- @param #BASE self
|
-- @param #BASE self
|
||||||
-- @param Arguments A #table or any field.
|
-- @param Arguments A #table or any field.
|
||||||
|
|||||||
@ -177,7 +177,7 @@ end
|
|||||||
--
|
--
|
||||||
-- -- Send the 2 messages created with the @{New} method to the Client Group.
|
-- -- Send the 2 messages created with the @{New} method to the Client Group.
|
||||||
-- -- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
|
-- -- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
|
||||||
-- Client = CLIENT:FindByName("UnitNameOfMyClient")
|
-- Client = CLIENT:FindByName("NameOfClientUnit")
|
||||||
--
|
--
|
||||||
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" ):ToClient( Client )
|
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" ):ToClient( Client )
|
||||||
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score" ):ToClient( Client )
|
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score" ):ToClient( Client )
|
||||||
@ -192,7 +192,7 @@ end
|
|||||||
--
|
--
|
||||||
function MESSAGE:ToClient( Client, Settings )
|
function MESSAGE:ToClient( Client, Settings )
|
||||||
self:F( Client )
|
self:F( Client )
|
||||||
self:ToUnit(Client, Settings)
|
self:ToUnit(Client,Settings)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -239,6 +239,7 @@ function MESSAGE:ToUnit( Unit, Settings )
|
|||||||
|
|
||||||
if self.MessageDuration ~= 0 then
|
if self.MessageDuration ~= 0 then
|
||||||
self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration )
|
self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration )
|
||||||
|
local ID = Unit:GetID()
|
||||||
trigger.action.outTextForUnit( Unit:GetID(), self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration, self.ClearScreen )
|
trigger.action.outTextForUnit( Unit:GetID(), self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration, self.ClearScreen )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -377,7 +378,8 @@ end
|
|||||||
--- Sends a MESSAGE to all players.
|
--- Sends a MESSAGE to all players.
|
||||||
-- @param #MESSAGE self
|
-- @param #MESSAGE self
|
||||||
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
|
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
|
||||||
-- @return #MESSAGE
|
-- @param #number Delay (Optional) Delay in seconds before the message is send. Default instantly (`nil`).
|
||||||
|
-- @return #MESSAGE self
|
||||||
-- @usage
|
-- @usage
|
||||||
--
|
--
|
||||||
-- -- Send a message created to all players.
|
-- -- Send a message created to all players.
|
||||||
@ -388,18 +390,24 @@ end
|
|||||||
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission")
|
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission")
|
||||||
-- MessageAll:ToAll()
|
-- MessageAll:ToAll()
|
||||||
--
|
--
|
||||||
function MESSAGE:ToAll( Settings )
|
function MESSAGE:ToAll( Settings, Delay )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
if self.MessageType then
|
if Delay and Delay>0 then
|
||||||
local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS
|
self:ScheduleOnce(Delay, MESSAGE.ToAll, self, Settings, 0)
|
||||||
self.MessageDuration = Settings:GetMessageTime( self.MessageType )
|
else
|
||||||
self.MessageCategory = "" -- self.MessageType .. ": "
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.MessageDuration ~= 0 then
|
if self.MessageType then
|
||||||
self:T( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ) .. " / " .. self.MessageDuration )
|
local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS
|
||||||
trigger.action.outText( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ), self.MessageDuration, self.ClearScreen )
|
self.MessageDuration = Settings:GetMessageTime( self.MessageType )
|
||||||
|
self.MessageCategory = "" -- self.MessageType .. ": "
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.MessageDuration ~= 0 then
|
||||||
|
self:T( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ) .. " / " .. self.MessageDuration )
|
||||||
|
trigger.action.outText( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ), self.MessageDuration, self.ClearScreen )
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
-- * @{#SET_CARGO}: Defines a collection of @{Cargo.Cargo}s filtered by filter criteria.
|
-- * @{#SET_CARGO}: Defines a collection of @{Cargo.Cargo}s filtered by filter criteria.
|
||||||
-- * @{#SET_ZONE}: Defines a collection of @{Core.Zone}s filtered by filter criteria.
|
-- * @{#SET_ZONE}: Defines a collection of @{Core.Zone}s filtered by filter criteria.
|
||||||
-- * @{#SET_SCENERY}: Defines a collection of @{Wrapper.Scenery}s added via a filtered @{#SET_ZONE}.
|
-- * @{#SET_SCENERY}: Defines a collection of @{Wrapper.Scenery}s added via a filtered @{#SET_ZONE}.
|
||||||
-- * @{#SET_DYNAMICCARGO}: Defines a collection of @{Wrapper.DynamicCargo}s added via a filtered @{#SET_ZONE}.
|
-- * @{#SET_DYNAMICCARGO}: Defines a collection of @{Wrapper.DynamicCargo}s filtered by filter criteria.
|
||||||
--
|
--
|
||||||
-- These classes are derived from @{#SET_BASE}, which contains the main methods to manage the collections.
|
-- These classes are derived from @{#SET_BASE}, which contains the main methods to manage the collections.
|
||||||
--
|
--
|
||||||
|
|||||||
@ -29,7 +29,9 @@
|
|||||||
-- @module Core.Settings
|
-- @module Core.Settings
|
||||||
-- @image Core_Settings.JPG
|
-- @image Core_Settings.JPG
|
||||||
|
|
||||||
--- @type SETTINGS
|
|
||||||
|
---
|
||||||
|
-- @type SETTINGS
|
||||||
-- @extends Core.Base#BASE
|
-- @extends Core.Base#BASE
|
||||||
|
|
||||||
--- Takes care of various settings that influence the behavior of certain functionalities and classes within the MOOSE framework.
|
--- Takes care of various settings that influence the behavior of certain functionalities and classes within the MOOSE framework.
|
||||||
@ -218,7 +220,8 @@ SETTINGS = {
|
|||||||
|
|
||||||
SETTINGS.__Enum = {}
|
SETTINGS.__Enum = {}
|
||||||
|
|
||||||
--- @type SETTINGS.__Enum.Era
|
---
|
||||||
|
-- @type SETTINGS.__Enum.Era
|
||||||
-- @field #number WWII
|
-- @field #number WWII
|
||||||
-- @field #number Korea
|
-- @field #number Korea
|
||||||
-- @field #number Cold
|
-- @field #number Cold
|
||||||
@ -491,7 +494,7 @@ do -- SETTINGS
|
|||||||
return (self.A2ASystem and self.A2ASystem == "MGRS") or (not self.A2ASystem and _SETTINGS:IsA2A_MGRS())
|
return (self.A2ASystem and self.A2ASystem == "MGRS") or (not self.A2ASystem and _SETTINGS:IsA2A_MGRS())
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
-- @param Wrapper.Group#GROUP MenuGroup Group for which to add menus.
|
-- @param Wrapper.Group#GROUP MenuGroup Group for which to add menus.
|
||||||
-- @param #table RootMenu Root menu table
|
-- @param #table RootMenu Root menu table
|
||||||
-- @return #SETTINGS
|
-- @return #SETTINGS
|
||||||
@ -945,49 +948,49 @@ do -- SETTINGS
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:A2GMenuSystem( MenuGroup, RootMenu, A2GSystem )
|
function SETTINGS:A2GMenuSystem( MenuGroup, RootMenu, A2GSystem )
|
||||||
self.A2GSystem = A2GSystem
|
self.A2GSystem = A2GSystem
|
||||||
MESSAGE:New( string.format( "Settings: Default A2G coordinate system set to %s for all players!", A2GSystem ), 5 ):ToAll()
|
MESSAGE:New( string.format( "Settings: Default A2G coordinate system set to %s for all players!", A2GSystem ), 5 ):ToAll()
|
||||||
self:SetSystemMenu( MenuGroup, RootMenu )
|
self:SetSystemMenu( MenuGroup, RootMenu )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:A2AMenuSystem( MenuGroup, RootMenu, A2ASystem )
|
function SETTINGS:A2AMenuSystem( MenuGroup, RootMenu, A2ASystem )
|
||||||
self.A2ASystem = A2ASystem
|
self.A2ASystem = A2ASystem
|
||||||
MESSAGE:New( string.format( "Settings: Default A2A coordinate system set to %s for all players!", A2ASystem ), 5 ):ToAll()
|
MESSAGE:New( string.format( "Settings: Default A2A coordinate system set to %s for all players!", A2ASystem ), 5 ):ToAll()
|
||||||
self:SetSystemMenu( MenuGroup, RootMenu )
|
self:SetSystemMenu( MenuGroup, RootMenu )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuLL_DDM_Accuracy( MenuGroup, RootMenu, LL_Accuracy )
|
function SETTINGS:MenuLL_DDM_Accuracy( MenuGroup, RootMenu, LL_Accuracy )
|
||||||
self.LL_Accuracy = LL_Accuracy
|
self.LL_Accuracy = LL_Accuracy
|
||||||
MESSAGE:New( string.format( "Settings: Default LL accuracy set to %s for all players!", LL_Accuracy ), 5 ):ToAll()
|
MESSAGE:New( string.format( "Settings: Default LL accuracy set to %s for all players!", LL_Accuracy ), 5 ):ToAll()
|
||||||
self:SetSystemMenu( MenuGroup, RootMenu )
|
self:SetSystemMenu( MenuGroup, RootMenu )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuMGRS_Accuracy( MenuGroup, RootMenu, MGRS_Accuracy )
|
function SETTINGS:MenuMGRS_Accuracy( MenuGroup, RootMenu, MGRS_Accuracy )
|
||||||
self.MGRS_Accuracy = MGRS_Accuracy
|
self.MGRS_Accuracy = MGRS_Accuracy
|
||||||
MESSAGE:New( string.format( "Settings: Default MGRS accuracy set to %s for all players!", MGRS_Accuracy ), 5 ):ToAll()
|
MESSAGE:New( string.format( "Settings: Default MGRS accuracy set to %s for all players!", MGRS_Accuracy ), 5 ):ToAll()
|
||||||
self:SetSystemMenu( MenuGroup, RootMenu )
|
self:SetSystemMenu( MenuGroup, RootMenu )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuMWSystem( MenuGroup, RootMenu, MW )
|
function SETTINGS:MenuMWSystem( MenuGroup, RootMenu, MW )
|
||||||
self.Metric = MW
|
self.Metric = MW
|
||||||
MESSAGE:New( string.format( "Settings: Default measurement format set to %s for all players!", MW and "Metric" or "Imperial" ), 5 ):ToAll()
|
MESSAGE:New( string.format( "Settings: Default measurement format set to %s for all players!", MW and "Metric" or "Imperial" ), 5 ):ToAll()
|
||||||
self:SetSystemMenu( MenuGroup, RootMenu )
|
self:SetSystemMenu( MenuGroup, RootMenu )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuMessageTimingsSystem( MenuGroup, RootMenu, MessageType, MessageTime )
|
function SETTINGS:MenuMessageTimingsSystem( MenuGroup, RootMenu, MessageType, MessageTime )
|
||||||
self:SetMessageTime( MessageType, MessageTime )
|
self:SetMessageTime( MessageType, MessageTime )
|
||||||
MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToAll()
|
MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
do
|
do
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuGroupA2GSystem( PlayerUnit, PlayerGroup, PlayerName, A2GSystem )
|
function SETTINGS:MenuGroupA2GSystem( PlayerUnit, PlayerGroup, PlayerName, A2GSystem )
|
||||||
--BASE:E( {PlayerUnit:GetName(), A2GSystem } )
|
--BASE:E( {PlayerUnit:GetName(), A2GSystem } )
|
||||||
self.A2GSystem = A2GSystem
|
self.A2GSystem = A2GSystem
|
||||||
@ -998,7 +1001,7 @@ do -- SETTINGS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuGroupA2ASystem( PlayerUnit, PlayerGroup, PlayerName, A2ASystem )
|
function SETTINGS:MenuGroupA2ASystem( PlayerUnit, PlayerGroup, PlayerName, A2ASystem )
|
||||||
self.A2ASystem = A2ASystem
|
self.A2ASystem = A2ASystem
|
||||||
MESSAGE:New( string.format( "Settings: A2A format set to %s for player %s.", A2ASystem, PlayerName ), 5 ):ToGroup( PlayerGroup )
|
MESSAGE:New( string.format( "Settings: A2A format set to %s for player %s.", A2ASystem, PlayerName ), 5 ):ToGroup( PlayerGroup )
|
||||||
@ -1008,7 +1011,7 @@ do -- SETTINGS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuGroupLL_DDM_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, LL_Accuracy )
|
function SETTINGS:MenuGroupLL_DDM_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, LL_Accuracy )
|
||||||
self.LL_Accuracy = LL_Accuracy
|
self.LL_Accuracy = LL_Accuracy
|
||||||
MESSAGE:New( string.format( "Settings: LL format accuracy set to %d decimal places for player %s.", LL_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup )
|
MESSAGE:New( string.format( "Settings: LL format accuracy set to %d decimal places for player %s.", LL_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup )
|
||||||
@ -1018,7 +1021,7 @@ do -- SETTINGS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuGroupMGRS_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, MGRS_Accuracy )
|
function SETTINGS:MenuGroupMGRS_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, MGRS_Accuracy )
|
||||||
self.MGRS_Accuracy = MGRS_Accuracy
|
self.MGRS_Accuracy = MGRS_Accuracy
|
||||||
MESSAGE:New( string.format( "Settings: MGRS format accuracy set to %d for player %s.", MGRS_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup )
|
MESSAGE:New( string.format( "Settings: MGRS format accuracy set to %d for player %s.", MGRS_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup )
|
||||||
@ -1028,7 +1031,7 @@ do -- SETTINGS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuGroupMWSystem( PlayerUnit, PlayerGroup, PlayerName, MW )
|
function SETTINGS:MenuGroupMWSystem( PlayerUnit, PlayerGroup, PlayerName, MW )
|
||||||
self.Metric = MW
|
self.Metric = MW
|
||||||
MESSAGE:New( string.format( "Settings: Measurement format set to %s for player %s.", MW and "Metric" or "Imperial", PlayerName ), 5 ):ToGroup( PlayerGroup )
|
MESSAGE:New( string.format( "Settings: Measurement format set to %s for player %s.", MW and "Metric" or "Imperial", PlayerName ), 5 ):ToGroup( PlayerGroup )
|
||||||
@ -1038,7 +1041,7 @@ do -- SETTINGS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #SETTINGS self
|
-- @param #SETTINGS self
|
||||||
function SETTINGS:MenuGroupMessageTimingsSystem( PlayerUnit, PlayerGroup, PlayerName, MessageType, MessageTime )
|
function SETTINGS:MenuGroupMessageTimingsSystem( PlayerUnit, PlayerGroup, PlayerName, MessageType, MessageTime )
|
||||||
self:SetMessageTime( MessageType, MessageTime )
|
self:SetMessageTime( MessageType, MessageTime )
|
||||||
MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToGroup( PlayerGroup )
|
MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToGroup( PlayerGroup )
|
||||||
|
|||||||
@ -3641,7 +3641,7 @@ do -- ZONE_ELASTIC
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create a convec hull.
|
--- Create a convex hull.
|
||||||
-- @param #ZONE_ELASTIC self
|
-- @param #ZONE_ELASTIC self
|
||||||
-- @param #table pl Points
|
-- @param #table pl Points
|
||||||
-- @return #table Points
|
-- @return #table Points
|
||||||
|
|||||||
@ -1629,7 +1629,7 @@ WAREHOUSE = {
|
|||||||
-- @field #boolean arrived If true, asset arrived at its destination.
|
-- @field #boolean arrived If true, asset arrived at its destination.
|
||||||
--
|
--
|
||||||
-- @field #number damage Damage of asset group in percent.
|
-- @field #number damage Damage of asset group in percent.
|
||||||
-- @field Ops.AirWing#AIRWING.Payload payload The payload of the asset.
|
-- @field Ops.Airwing#AIRWING.Payload payload The payload of the asset.
|
||||||
-- @field Ops.OpsGroup#OPSGROUP flightgroup The flightgroup object.
|
-- @field Ops.OpsGroup#OPSGROUP flightgroup The flightgroup object.
|
||||||
-- @field Ops.Cohort#COHORT cohort The cohort this asset belongs to.
|
-- @field Ops.Cohort#COHORT cohort The cohort this asset belongs to.
|
||||||
-- @field Ops.Legion#LEGION legion The legion this asset belonts to.
|
-- @field Ops.Legion#LEGION legion The legion this asset belonts to.
|
||||||
|
|||||||
@ -2935,8 +2935,8 @@ function CTLD:_FindCratesNearby( _group, _unit, _dist, _ignoreweight)
|
|||||||
local agl = staticpos.y-landheight
|
local agl = staticpos.y-landheight
|
||||||
agl = UTILS.Round(agl,2)
|
agl = UTILS.Round(agl,2)
|
||||||
local GCloaded = agl > 0 and true or false
|
local GCloaded = agl > 0 and true or false
|
||||||
if IsNoHook == true then GCloaded = false end
|
if IsNoHook == true then GCloaded = false end
|
||||||
--]]
|
--]]
|
||||||
--- Testing
|
--- Testing
|
||||||
local distance = self:_GetDistance(location,staticpos)
|
local distance = self:_GetDistance(location,staticpos)
|
||||||
--self:T({name=static:GetName(),IsHook=IsHook,agl=agl,GCloaded=GCloaded,distance=string.format("%.2f",distance or 0)})
|
--self:T({name=static:GetName(),IsHook=IsHook,agl=agl,GCloaded=GCloaded,distance=string.format("%.2f",distance or 0)})
|
||||||
|
|||||||
@ -1237,7 +1237,7 @@ function MSRS:PlayTextExt(Text, Delay, Frequencies, Modulations, Gender, Culture
|
|||||||
self:T({Text, Delay, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate} )
|
self:T({Text, Delay, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate} )
|
||||||
|
|
||||||
if Delay and Delay>0 then
|
if Delay and Delay>0 then
|
||||||
self:ScheduleOnce(Delay, MSRS.PlayTextExt, self, Text, 0, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate)
|
self:ScheduleOnce(Delay, self.PlayTextExt, self, Text, 0, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate)
|
||||||
else
|
else
|
||||||
|
|
||||||
Frequencies = Frequencies or self:GetFrequencies()
|
Frequencies = Frequencies or self:GetFrequencies()
|
||||||
@ -1559,8 +1559,8 @@ end
|
|||||||
function MSRS:_DCSgRPCtts(Text, Frequencies, Gender, Culture, Voice, Volume, Label, Coordinate)
|
function MSRS:_DCSgRPCtts(Text, Frequencies, Gender, Culture, Voice, Volume, Label, Coordinate)
|
||||||
|
|
||||||
-- Debug info.
|
-- Debug info.
|
||||||
self:F("MSRS_BACKEND_DCSGRPC:_DCSgRPCtts()")
|
self:T("MSRS_BACKEND_DCSGRPC:_DCSgRPCtts()")
|
||||||
self:F({Text, Frequencies, Gender, Culture, Voice, Volume, Label, Coordinate})
|
self:T({Text, Frequencies, Gender, Culture, Voice, Volume, Label, Coordinate})
|
||||||
|
|
||||||
local options = {} -- #MSRS.GRPCOptions
|
local options = {} -- #MSRS.GRPCOptions
|
||||||
|
|
||||||
@ -1586,7 +1586,6 @@ function MSRS:_DCSgRPCtts(Text, Frequencies, Gender, Culture, Voice, Volume, Lab
|
|||||||
|
|
||||||
-- Provider (win, gcloud, ...)
|
-- Provider (win, gcloud, ...)
|
||||||
local provider = self.provider or MSRS.Provider.WINDOWS
|
local provider = self.provider or MSRS.Provider.WINDOWS
|
||||||
self:F({provider=provider})
|
|
||||||
|
|
||||||
-- Provider options: voice, credentials
|
-- Provider options: voice, credentials
|
||||||
options.provider = {}
|
options.provider = {}
|
||||||
@ -1594,7 +1593,7 @@ function MSRS:_DCSgRPCtts(Text, Frequencies, Gender, Culture, Voice, Volume, Lab
|
|||||||
|
|
||||||
-- Voice
|
-- Voice
|
||||||
Voice=Voice or self:GetVoice(self.provider) or self.voice
|
Voice=Voice or self:GetVoice(self.provider) or self.voice
|
||||||
|
|
||||||
if Voice then
|
if Voice then
|
||||||
-- We use a specific voice
|
-- We use a specific voice
|
||||||
options.provider[provider].voice = Voice
|
options.provider[provider].voice = Voice
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
do -- Sound Base
|
do -- Sound Base
|
||||||
|
|
||||||
--- @type SOUNDBASE
|
-- @type SOUNDBASE
|
||||||
-- @field #string ClassName Name of the class.
|
-- @field #string ClassName Name of the class.
|
||||||
-- @extends Core.Base#BASE
|
-- @extends Core.Base#BASE
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ end
|
|||||||
|
|
||||||
do -- Sound File
|
do -- Sound File
|
||||||
|
|
||||||
--- @type SOUNDFILE
|
-- @type SOUNDFILE
|
||||||
-- @field #string ClassName Name of the class
|
-- @field #string ClassName Name of the class
|
||||||
-- @field #string filename Name of the flag.
|
-- @field #string filename Name of the flag.
|
||||||
-- @field #string path Directory path, where the sound file is located. This includes the final slash "/".
|
-- @field #string path Directory path, where the sound file is located. This includes the final slash "/".
|
||||||
@ -292,7 +292,7 @@ end
|
|||||||
|
|
||||||
do -- Text-To-Speech
|
do -- Text-To-Speech
|
||||||
|
|
||||||
--- @type SOUNDTEXT
|
-- @type SOUNDTEXT
|
||||||
-- @field #string ClassName Name of the class
|
-- @field #string ClassName Name of the class
|
||||||
-- @field #string text Text to speak.
|
-- @field #string text Text to speak.
|
||||||
-- @field #number duration Duration in seconds.
|
-- @field #number duration Duration in seconds.
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
do -- UserSound
|
do -- UserSound
|
||||||
|
|
||||||
--- @type USERSOUND
|
-- @type USERSOUND
|
||||||
-- @extends Core.Base#BASE
|
-- @extends Core.Base#BASE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1148,10 +1148,10 @@ function CONTROLLABLE:TaskStrafing( Vec2, AttackQty, Length, WeaponType, WeaponE
|
|||||||
id = 'Strafing',
|
id = 'Strafing',
|
||||||
params = {
|
params = {
|
||||||
point = Vec2, -- req
|
point = Vec2, -- req
|
||||||
weaponType = WeaponType or 1073741822,
|
weaponType = WeaponType or 805337088, -- Default 805337088 corresponds to guns/cannons (805306368) + any rocket (30720). You can set other types but then the AI uses even bombs for a strafing run!
|
||||||
expend = WeaponExpend or "Auto",
|
expend = WeaponExpend or "Auto",
|
||||||
attackQty = AttackQty or 1, -- req
|
attackQty = AttackQty or 1, -- req
|
||||||
attackQtyLimit = AttackQty >1 and true or false,
|
attackQtyLimit = AttackQty~=nil and true or false,
|
||||||
direction = Direction and math.rad(Direction) or 0,
|
direction = Direction and math.rad(Direction) or 0,
|
||||||
directionEnabled = Direction and true or false,
|
directionEnabled = Direction and true or false,
|
||||||
groupAttack = GroupAttack or false,
|
groupAttack = GroupAttack or false,
|
||||||
|
|||||||
@ -671,7 +671,7 @@ function POSITIONABLE:GetBoundingRadius( MinDist )
|
|||||||
return math.max( math.max( CX, CZ ), boxmin )
|
return math.max( math.max( CX, CZ ), boxmin )
|
||||||
end
|
end
|
||||||
|
|
||||||
BASE:E( { "Cannot GetBoundingRadius", Positionable = self, Alive = self:IsAlive() } )
|
BASE:T( { "Cannot GetBoundingRadius", Positionable = self, Alive = self:IsAlive() } )
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user