From d51e761b26b7db832200ef9520c2dfd49981422d Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 31 Oct 2024 16:05:24 +0100 Subject: [PATCH 1/4] #CONTROLLABLE - Rollback changes for EPLRS command --- .../Moose/Wrapper/Controllable.lua | 21 ++++++++++--------- Moose Development/Moose/Wrapper/Group.lua | 17 ++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 9ee8844be..d298cece5 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -899,13 +899,13 @@ function CONTROLLABLE:CommandEPLRS( SwitchOnOff, Delay ) id = 'EPLRS', params = { value = SwitchOnOff, - groupId = nil, + groupId = self:GetID(), }, } - if self:IsGround() then - CommandEPLRS.params.groupId = self:GetID() - end + --if self:IsGround() then + --CommandEPLRS.params.groupId = self:GetID() + --end if Delay and Delay > 0 then SCHEDULER:New( nil, self.CommandEPLRS, { self, SwitchOnOff }, Delay ) @@ -941,7 +941,7 @@ function CONTROLLABLE:CommandSetUnlimitedFuel(OnOff, Delay) end ---- Set radio frequency. See [DCS command EPLRS](https://wiki.hoggitworld.com/view/DCS_command_setFrequency) +--- Set radio frequency. See [DCS command SetFrequency](https://wiki.hoggitworld.com/view/DCS_command_setFrequency) -- @param #CONTROLLABLE self -- @param #number Frequency Radio frequency in MHz. -- @param #number Modulation Radio modulation. Default `radio.modulation.AM`. @@ -968,7 +968,7 @@ function CONTROLLABLE:CommandSetFrequency( Frequency, Modulation, Power, Delay ) return self end ---- [AIR] Set radio frequency. See [DCS command EPLRS](https://wiki.hoggitworld.com/view/DCS_command_setFrequencyForUnit) +--- [AIR] Set radio frequency. See [DCS command SetFrequencyForUnit](https://wiki.hoggitworld.com/view/DCS_command_setFrequencyForUnit) -- @param #CONTROLLABLE self -- @param #number Frequency Radio frequency in MHz. -- @param #number Modulation Radio modulation. Default `radio.modulation.AM`. @@ -1010,12 +1010,13 @@ function CONTROLLABLE:TaskEPLRS( SwitchOnOff, idx ) id = 'EPLRS', params = { value = SwitchOnOff, - groupId = nil, + groupId = self:GetID(), }, } - if self:IsGround() then - CommandEPLRS.params.groupId = self:GetID() - end + + --if self:IsGround() then + --CommandEPLRS.params.groupId = self:GetID() + --end return self:TaskWrappedAction( CommandEPLRS, idx or 1 ) end diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index ba4b4905d..bb0bf80f1 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -360,7 +360,7 @@ end -- @return DCS#Group The DCS Group. function GROUP:GetDCSObject() - if (not self.LastCallDCSObject) or (self.LastCallDCSObject and timer.getTime() - self.LastCallDCSObject > 1) then + --if (not self.LastCallDCSObject) or (self.LastCallDCSObject and timer.getTime() - self.LastCallDCSObject > 1) then -- Get DCS group. local DCSGroup = Group.getByName( self.GroupName ) @@ -369,14 +369,14 @@ function GROUP:GetDCSObject() self.LastCallDCSObject = timer.getTime() self.DCSObject = DCSGroup return DCSGroup - else - self.DCSObject = nil - self.LastCallDCSObject = nil + -- else + -- self.DCSObject = nil + -- self.LastCallDCSObject = nil end - else - return self.DCSObject - end + --else + --return self.DCSObject + --end --self:E(string.format("ERROR: Could not get DCS group object of group %s because DCS object could not be found!", tostring(self.GroupName))) return nil @@ -493,13 +493,16 @@ function GROUP:Destroy( GenerateEvent, delay ) if GenerateEvent and GenerateEvent == true then if self:IsAir() then self:CreateEventCrash( timer.getTime(), UnitData ) + --self:ScheduleOnce(1,self.CreateEventCrash,self,timer.getTime(),UnitData) else self:CreateEventDead( timer.getTime(), UnitData ) + --self:ScheduleOnce(1,self.CreateEventDead,self,timer.getTime(),UnitData) end elseif GenerateEvent == false then -- Do nothing! else self:CreateEventRemoveUnit( timer.getTime(), UnitData ) + --self:ScheduleOnce(1,self.CreateEventRemoveUnit,self,timer.getTime(),UnitData) end end USERFLAG:New( self:GetName() ):Set( 100 ) From b72124c0d9d36b1a11c953ba99ad5efc7d269c3f Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 31 Oct 2024 18:16:02 +0100 Subject: [PATCH 2/4] #CONTROLLABLE Corrected parameter omissions --- Moose Development/Moose/Wrapper/Controllable.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index d298cece5..908631317 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -960,7 +960,7 @@ function CONTROLLABLE:CommandSetFrequency( Frequency, Modulation, Power, Delay ) } if Delay and Delay > 0 then - SCHEDULER:New( nil, self.CommandSetFrequency, { self, Frequency, Modulation, Power } ) + SCHEDULER:New( nil, self.CommandSetFrequency, { self, Frequency, Modulation, Power },Delay ) else self:SetCommand( CommandSetFrequency ) end @@ -987,7 +987,7 @@ function CONTROLLABLE:CommandSetFrequencyForUnit(Frequency,Modulation,Power,Unit }, } if Delay and Delay>0 then - SCHEDULER:New(nil,self.CommandSetFrequencyForUnit,{self,Frequency,Modulation,Power,UnitID}) + SCHEDULER:New(nil,self.CommandSetFrequencyForUnit,{self,Frequency,Modulation,Power,UnitID},Delay) else self:SetCommand(CommandSetFrequencyForUnit) end From 60a3d3409e63fc6e6d1273181fbe223615045031 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:49:26 +0100 Subject: [PATCH 3/4] Update SRS.lua #MSRS Test to get the pwsh window to minimize --- Moose Development/Moose/Sound/SRS.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Sound/SRS.lua b/Moose Development/Moose/Sound/SRS.lua index ff6c95c9e..261489e7b 100644 --- a/Moose Development/Moose/Sound/SRS.lua +++ b/Moose Development/Moose/Sound/SRS.lua @@ -1490,7 +1490,7 @@ function MSRS:_ExecCommand(command) elseif self.UsePowerShell == true then - local pwsh = string.format('powershell.exe -ExecutionPolicy Unrestricted -WindowStyle Hidden -Command "%s"',filename) + local pwsh = string.format('start /min "" powershell.exe -ExecutionPolicy Unrestricted -WindowStyle Hidden -Command "%s"',filename) --env.info("[MSRS] TextToSpeech Command :\n" .. pwsh.."\n") if string.len(pwsh) > 255 then From 89399631870774dbb6567f5651944d97c5509e02 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Sun, 10 Nov 2024 13:45:44 +0100 Subject: [PATCH 4/4] Update Enums.lua OH58d weapons --- Moose Development/Moose/Utilities/Enums.lua | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Moose Development/Moose/Utilities/Enums.lua b/Moose Development/Moose/Utilities/Enums.lua index e72a9aff4..0d43e2d1b 100644 --- a/Moose Development/Moose/Utilities/Enums.lua +++ b/Moose Development/Moose/Utilities/Enums.lua @@ -1195,18 +1195,18 @@ ENUMS.Storage.weapons.UH1H.M60_MG_Right_Door = {4,15,46,177} ENUMS.Storage.weapons.UH1H.M134_MiniGun_Left_Door = {4,15,46,174} ENUMS.Storage.weapons.UH1H.M60_MG_Left_Door = {4,15,46,176} -- Kiowa -ENUMS.Storage.weapons.OH58.FIM92 = {4,4,7,446} -ENUMS.Storage.weapons.OH58.MG_M3P100 = {4,15,46,2578} -ENUMS.Storage.weapons.OH58.MG_M3P200 = {4,15,46,2577} -ENUMS.Storage.weapons.OH58.MG_M3P300 = {4,15,46,2576} -ENUMS.Storage.weapons.OH58.MG_M3P400 = {4,15,46,2575} -ENUMS.Storage.weapons.OH58.MG_M3P500 = {4,15,46,2574} -ENUMS.Storage.weapons.OH58.Smk_Grenade_Blue = {4,5,9,484} -ENUMS.Storage.weapons.OH58.Smk_Grenade_Green = {4,5,9,485} -ENUMS.Storage.weapons.OH58.Smk_Grenade_Red = {4,5,9,483} -ENUMS.Storage.weapons.OH58.Smk_Grenade_Violet = {4,5,9,486} -ENUMS.Storage.weapons.OH58.Smk_Grenade_White = {4,5,9,488} -ENUMS.Storage.weapons.OH58.Smk_Grenade_Yellow = {4,5,9,487} +ENUMS.Storage.weapons.OH58.FIM92 = {4,4,7,449} +ENUMS.Storage.weapons.OH58.MG_M3P100 = {4,15,46,2608} +ENUMS.Storage.weapons.OH58.MG_M3P200 = {4,15,46,2607} +ENUMS.Storage.weapons.OH58.MG_M3P300 = {4,15,46,2606} +ENUMS.Storage.weapons.OH58.MG_M3P400 = {4,15,46,2605} +ENUMS.Storage.weapons.OH58.MG_M3P500 = {4,15,46,2604} +ENUMS.Storage.weapons.OH58.Smk_Grenade_Blue = {4,5,9,486} +ENUMS.Storage.weapons.OH58.Smk_Grenade_Green = {4,5,9,487} +ENUMS.Storage.weapons.OH58.Smk_Grenade_Red = {4,5,9,485} +ENUMS.Storage.weapons.OH58.Smk_Grenade_Violet = {4,5,9,488} +ENUMS.Storage.weapons.OH58.Smk_Grenade_White = {4,5,9,490} +ENUMS.Storage.weapons.OH58.Smk_Grenade_Yellow = {4,5,9,489} -- Apache ENUMS.Storage.weapons.AH64D.AN_APG78 = {4,15,44,2138} ENUMS.Storage.weapons.AH64D.Internal_Aux_FuelTank = {1,3,43,1700}