From fdffef3baf1a3be1a637c8febc0d5cf0f1859aef Mon Sep 17 00:00:00 2001 From: smiki Date: Fri, 27 Mar 2026 12:44:18 +0100 Subject: [PATCH 1/7] [ADDED] New weapons to ENUMS --- Moose Development/Moose/Utilities/Enums.lua | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Moose Development/Moose/Utilities/Enums.lua b/Moose Development/Moose/Utilities/Enums.lua index 1281bbf64..62fe643d7 100644 --- a/Moose Development/Moose/Utilities/Enums.lua +++ b/Moose Development/Moose/Utilities/Enums.lua @@ -1814,11 +1814,15 @@ ENUMS.Storage.weapons.droptanks.fuel_tank_300gal = "weapons.droptanks.fuel_tank -- NEW ENUMS.Storage.weapons.adapters.HB_F_4E_ORD_LAU_77 = 'weapons.adapters.HB_F-4E_ORD_LAU_77' ENUMS.Storage.weapons.adapters.hb_a_6e_lau7_adu299 = 'weapons.adapters.hb_a-6e_lau7_adu299' +ENUMS.Storage.weapons.adapters.CHAP_AIM92LN = 'weapons.adapters.CHAP_AIM92LN' +ENUMS.Storage.weapons.adapters.CHAP_HOT3LN = 'weapons.adapters.CHAP_HOT3LN' +ENUMS.Storage.weapons.adapters.CHAP_FZ225 = 'weapons.adapters.CHAP_FZ225' ENUMS.Storage.weapons.bombs.AH6_SMOKE_BLUE = 'weapons.bombs.AH6_SMOKE_BLUE' ENUMS.Storage.weapons.bombs.AH6_SMOKE_GREEN = 'weapons.bombs.AH6_SMOKE_GREEN' ENUMS.Storage.weapons.bombs.AH6_SMOKE_RED = 'weapons.bombs.AH6_SMOKE_RED' ENUMS.Storage.weapons.bombs.AH6_SMOKE_YELLOW = 'weapons.bombs.AH6_SMOKE_YELLOW' +ENUMS.Storage.weapons.bombs.AO_25SL = 'weapons.bombs.AO_25SL' ENUMS.Storage.weapons.missiles.HB_AGM_78 = 'weapons.missiles.HB_AGM_78' ENUMS.Storage.weapons.missiles.V_1 = 'weapons.missiles.V-1' @@ -1865,6 +1869,10 @@ ENUMS.Storage.weapons.shells.M42A1_HE = 'weapons.shells.M42A1_HE' ENUMS.Storage.weapons.shells.HE_20x138B = 'weapons.shells.20x138B_HE' ENUMS.Storage.weapons.shells.HE_37x263 = 'weapons.shells.37x263_HE' ENUMS.Storage.weapons.shells.HE_2A20_115mm = 'weapons.shells.2A20_115mm_HE' +ENUMS.Storage.weapons.shells.AP_20x99R = 'weapons.shells.20x99R_AP' +ENUMS.Storage.weapons.shells.IranFAC_DShK_API_T = 'weapons.shells.IranFAC_DShK_API_T' +ENUMS.Storage.weapons.shells.IranFAC_DShK_API = 'weapons.shells.IranFAC_DShK_API' +ENUMS.Storage.weapons.shells.HE_T_20x99R = 'weapons.shells.20x99R_HE_T' ENUMS.Storage.weapons.gunmounts.B17_TailTurret_M2_L = 'weapons.gunmounts.B17_TailTurret_M2_L' ENUMS.Storage.weapons.gunmounts.AH6_M134L = 'weapons.gunmounts.{AH6_M134L}' @@ -1895,6 +1903,11 @@ ENUMS.Storage.weapons.gunmounts.AH_6_FN_HMP400 = 'weapons.gunmounts.{AH-6_FN_HMP ENUMS.Storage.weapons.gunmounts.AH_6_M134L = 'weapons.gunmounts.AH-6_M134L' ENUMS.Storage.weapons.gunmounts.AH_6_M134R = 'weapons.gunmounts.AH-6_M134R' ENUMS.Storage.weapons.gunmounts.AH_6_HMP400 = 'weapons.gunmounts.AH-6_HMP400' +ENUMS.Storage.weapons.gunmounts.AKAN_NO_TRC = 'weapons.gunmounts.{AKAN_NO_TRC}' +ENUMS.Storage.weapons.gunmounts.AKAN = 'weapons.gunmounts.{AKAN}' +ENUMS.Storage.weapons.gunmounts.CHAP_HMP400LC = 'weapons.gunmounts.{CHAP_HMP400LC}' +ENUMS.Storage.weapons.gunmounts.HMP400LC = 'weapons.gunmounts.HMP400LC' +ENUMS.Storage.weapons.gunmounts.SHVAK_GUN = 'weapons.gunmounts.SHVAK_GUN' ENUMS.Storage.weapons.droptanks.PTB_800 = 'weapons.droptanks.PTB-800' ENUMS.Storage.weapons.droptanks.PTB_275 = 'weapons.droptanks.PTB-275' @@ -1945,6 +1958,7 @@ ENUMS.Storage.weapons.droptanks.S_3_PTB = 'weapons.droptanks.S-3-PTB' ENUMS.Storage.weapons.droptanks.fuel_tank_370gal = 'weapons.droptanks.fuel_tank_370gal' ENUMS.Storage.weapons.droptanks.MIG_23_PTB = 'weapons.droptanks.MIG-23-PTB' ENUMS.Storage.weapons.droptanks.f_18c_ptb = 'weapons.droptanks.f-18c-ptb' +ENUMS.Storage.weapons.droptanks.CHAP_TigerUHT_fueltank = 'weapons.droptanks.CHAP_TigerUHT_fueltank' ENUMS.Storage.weapons.containers.FN_HMP400_100 = 'weapons.containers.{FN_HMP400_100}' ENUMS.Storage.weapons.containers.AN_M3 = 'weapons.containers.{AN-M3}' @@ -2076,9 +2090,17 @@ ENUMS.Storage.weapons.containers.GIAT_M621_AP = 'weapons.containers.{GIAT_M621_A ENUMS.Storage.weapons.containers.M134_R = 'weapons.containers.M134_R' ENUMS.Storage.weapons.containers.OH58D_M3P_L300 = 'weapons.containers.OH58D_M3P_L300' ENUMS.Storage.weapons.containers.AH6_M134R = 'weapons.containers.{AH6_M134R}' +ENUMS.Storage.weapons.containers.CHAP_HMP400LC = 'weapons.containers.{CHAP_HMP400LC}' + +ENUMS.Storage.weapons.missiles.C701_AShM = 'weapons.missiles.C701 AShM' +ENUMS.Storage.weapons.missiles.IGLA_9M39 = 'weapons.missiles.9M39_IGLA' +ENUMS.Storage.weapons.missiles.CHAP_AIM92 = 'weapons.missiles.CHAP_AIM92' +ENUMS.Storage.weapons.missiles.AM39 = 'weapons.missiles.AM39' +ENUMS.Storage.weapons.missiles.Shahed136_LM = 'weapons.missiles.Shahed136_LM' ENUMS.Storage.weapons.torpedoes.G7A_T1 = 'weapons.torpedoes.G7A_T1' + -- UH-60L Mod ENUMS.Storage.weapons.gunmounts.UH60LGAU19 = 'weapons.gunmounts.UH-60L GAU-19' ENUMS.Storage.weapons.gunmounts.UH60L_M134 = 'weapons.gunmounts.UH60L_M134' From 830a3b9b1a1dc8bc9b58345fe298d596337cff28 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 27 Mar 2026 17:40:36 +0100 Subject: [PATCH 2/7] #MSRS - Added priority parameter to MSRSQUEUE --- Moose Development/Moose/Sound/SRS.lua | 238 ++++++++++---------- Moose Development/Moose/Utilities/Utils.lua | 2 +- 2 files changed, 122 insertions(+), 118 deletions(-) diff --git a/Moose Development/Moose/Sound/SRS.lua b/Moose Development/Moose/Sound/SRS.lua index 982fa0355..8232bee0e 100644 --- a/Moose Development/Moose/Sound/SRS.lua +++ b/Moose Development/Moose/Sound/SRS.lua @@ -2584,10 +2584,11 @@ end -- @param Core.Point#COORDINATE coordinate (Optional) Coordinate to be used -- @param #number speed (Optional) Speed to be used -- @param #string speaker (Optional) PIPER voice can have various speakers, set this here if you use PIPER/HOUND with a fitting voice. +-- @param #number priority (Optional) Priority of this transmission. Can be [1..100], default is 50. Higher is taken up earlier from the queue. -- @return #MSRSQUEUE.Transmission Radio transmission table. -function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgroups, subtitle, subduration, frequency, modulation, gender, culture, voice, volume, label,coordinate,speed,speaker) - self:T({Text=text, Dur=duration, start=tstart, int=interval, sub=subgroups, subt=subtitle, sudb=subduration, F=frequency, M=modulation, G=gender, C=culture, V=voice, Vol=volume, L=label, S=speed}) - self:I({provider=msrs.provider}) +function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgroups, subtitle, subduration, frequency, modulation, gender, culture, voice, volume, label,coordinate,speed,speaker,priority) + self:T({Text=text, Dur=duration, start=tstart, int=interval, sub=subgroups, subt=subtitle, sudb=subduration, F=frequency, M=modulation, G=gender, C=culture, V=voice, Vol=volume, L=label, S=speed, P=priority}) + self:T({TEXT=text, PRIO=tostring(priority)}) if self.TransmitOnlyWithPlayers then if self.PlayerSet and self.PlayerSet:CountAlive() == 0 then return self @@ -2633,6 +2634,7 @@ function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgr elseif msrs.Speaker then transmission.speaker = msrs.speaker end + transmission.priority = priority or 50 -- Add transmission to queue. self:AddTransmission(transmission) @@ -2700,154 +2702,156 @@ function MSRSQUEUE:CalcTransmisstionDuration() return T end ---- Check radio queue for transmissions to be broadcasted. +-- Check radio queue for transmissions to be broadcasted. -- @param #MSRSQUEUE self -- @param #number delay Delay in seconds before checking. function MSRSQUEUE:_CheckRadioQueue(delay) -- Transmissions in queue. - local N=#self.queue + local N = #self.queue -- Debug info. - self:T2(self.lid..string.format("Check radio queue %s: delay=%.3f sec, N=%d, checking=%s", self.alias, delay or 0, N, tostring(self.checking))) - - if delay and delay>0 then + self:T2(self.lid..string.format( + "Check radio queue %s: delay=%.3f sec, N=%d, checking=%s", + self.alias, delay or 0, N, tostring(self.checking) + )) + if delay and delay > 0 then -- Delayed call. self:ScheduleOnce(delay, MSRSQUEUE._CheckRadioQueue, self) -- Checking on. - self.checking=true + self.checking = true + return + end - else + -- Check if queue is empty. + if N == 0 then + -- Debug info. + self:T(self.lid..string.format("Check radio queue %s empty ==> disable checking", self.alias)) + -- Queue is now empty. Nothing else to do. We start checking again if a transmission is added. + self.checking = false + return + end - -- Check if queue is empty. - if N==0 then + -- Get current abs time. + local time = timer.getAbsTime() - -- Debug info. - self:T(self.lid..string.format("Check radio queue %s empty ==> disable checking", self.alias)) + -- Checking on. + self.checking = true - -- Queue is now empty. Nothing to else to do. We start checking again, if a transmission is added. - self.checking=false + -- Set dt. + local dt = self.dt - return - end + local playing = false + local nextTx = nil -- #MSRSQUEUE.Transmission + local remove = nil - -- Get current abs time. - local time=timer.getAbsTime() + -- Helper: read priority with default 50; clamp to [1,100] + local function getPriority(tx) + local p = tx.priority + if p == nil then return 50 end + if p < 1 then return 1 end + if p > 100 then return 100 end + return p + end - -- Checking on. - self.checking=true + -- Scan queue to determine status and pick the next transmission. + -- Rules: + -- * If something is currently playing and not yet finished -> keep playing, compute dt. + -- * Otherwise, among eligible (due and interval-ok, not playing) candidates pick max priority. + -- * If tie -> earlier in queue wins automatically by iteration order. + local bestPrio = nil - -- Set dt. - local dt=self.dt + for i, _transmission in ipairs(self.queue) do + local transmission = _transmission -- #MSRSQUEUE.Transmission + -- Check if transmission time has passed. + if time >= transmission.Tplay then + -- Check if transmission is currently playing. + if transmission.isplaying then + -- Check if transmission is finished. + if time >= transmission.Tstarted + transmission.duration then + -- Transmission over. + transmission.isplaying = false - local playing=false - local next=nil --#MSRSQUEUE.Transmission - local remove=nil - for i,_transmission in ipairs(self.queue) do - local transmission=_transmission --#MSRSQUEUE.Transmission - - -- Check if transmission time has passed. - if time>=transmission.Tplay then - - -- Check if transmission is currently playing. - if transmission.isplaying then - - -- Check if transmission is finished. - if time>=transmission.Tstarted+transmission.duration then - - -- Transmission over. - transmission.isplaying=false - - -- Remove ith element in queue. - remove=i - - -- Store time last transmission finished. - self.Tlast=time - - else -- still playing - - -- Transmission is still playing. - playing=true - - dt=transmission.duration-(time-transmission.Tstarted) - - end - - else -- not playing yet - - local Tlast=self.Tlast - - if transmission.interval==nil then - - -- Not playing ==> this will be next. - if next==nil then - next=transmission - end - - else - - if Tlast==nil or time-Tlast>=transmission.interval then - next=transmission - else - - end - end - - -- We got a transmission or one with an interval that is not due yet. No need for anything else. - if next or Tlast then - break - end + -- Remove ith element in queue. + remove = i + -- Store time last transmission finished. + self.Tlast = time + else + -- Transmission is still playing. + playing = true + dt = transmission.duration - (time - transmission.Tstarted) + -- While something is playing, we keep scanning to see if it just finished at this exact loop, + -- but do not pick a new nextTx until the player finishes. end else + -- Not playing yet: evaluate eligibility (interval logic), then consider for priority selection. + local Tlast = self.Tlast + local eligible = false - -- Transmission not due yet. + if transmission.interval == nil then + -- No interval constraint. + eligible = true + else + -- Interval-constrained: only eligible if no last or enough time passed since last finish. + if (Tlast == nil) or (time - Tlast >= transmission.interval) then + eligible = true + end + end + if eligible and not playing then + local prio = getPriority(transmission) + + if bestPrio == nil or prio > bestPrio then + bestPrio = prio + nextTx = transmission + -- Earliest in queue preserves tie-breaking (we only replace on strictly higher prio). + end + end + -- Note: do NOT break early—need to scan all to find the true highest priority candidate. end + else + -- Transmission not due yet. end - - -- Found a new transmission. - if next~=nil and not playing then - -- Debug info. - self:T(self.lid..string.format("Broadcasting text=\"%s\" at T=%.3f", next.text, time)) - - -- Call SRS. - self:Broadcast(next) - - next.isplaying=true - next.Tstarted=time - dt=next.duration - end - - -- Remove completed call from queue. - if remove then - -- Remove from queue. - table.remove(self.queue, remove) - N=N-1 - - -- Check if queue is empty. - if #self.queue==0 then - -- Debug info. - self:T(self.lid..string.format("Check radio queue %s empty ==> disable checking", self.alias)) - - self.checking=false - - return - end - end - - -- Check queue. - self:_CheckRadioQueue(dt) - end + -- Found a new transmission and nothing is currently playing. + if nextTx ~= nil and not playing then + -- Debug info. + self:T(self.lid..string.format('Broadcasting text="%s" at T=%.3f (prio=%d)', nextTx.text, time, (nextTx.priority or 50))) + + -- Call SRS. + self:Broadcast(nextTx) + + nextTx.isplaying = true + nextTx.Tstarted = time + dt = nextTx.duration + end + + -- Remove completed call from queue. + if remove then + -- Remove from queue. + table.remove(self.queue, remove) + N = N - 1 + + -- Check if queue is empty. + if #self.queue == 0 then + -- Debug info. + self:T(self.lid..string.format("Check radio queue %s empty ==> disable checking", self.alias)) + self.checking = false + return + end + end + + -- Continue checking. + self:_CheckRadioQueue(dt) end MSRS.LoadConfigFile() ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index 4b9d3ee82..b75fe8935 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -4262,7 +4262,7 @@ end -- @return #number Random number between 0 and 1. function UTILS.LCGRandom() if UTILS.lcg == nil then - UTILS.LCGRandomSeed() + UTILS.LCGRandomSeed(timer.getTime()) end UTILS.lcg.seed = (UTILS.lcg.a * UTILS.lcg.seed + UTILS.lcg.c) % UTILS.lcg.m return UTILS.lcg.seed / UTILS.lcg.m From 28e60745b983aaf4f6bbe08331fe87cf40c234ff Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 27 Mar 2026 17:38:34 +0100 Subject: [PATCH 3/7] #SPAWN - Added SPAWN:InitCallSignRed(ID) --- Moose Development/Moose/Core/Spawn.lua | 35 +++++++++++++++++++------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/Moose Development/Moose/Core/Spawn.lua b/Moose Development/Moose/Core/Spawn.lua index 04ca61679..02c0cf478 100644 --- a/Moose Development/Moose/Core/Spawn.lua +++ b/Moose Development/Moose/Core/Spawn.lua @@ -1241,6 +1241,16 @@ function SPAWN:InitCallSign(ID,Name,Minor,Major) return self end +--- [RED AIR only!] This method sets a specific callsign for a spawned group. +-- @param #SPAWN self +-- @param #number ID The number with which to start for the first unit, e.g. 100, further units would then be 101, 102 .. etc. +-- @return #SPAWN self +function SPAWN:InitCallSignRed(ID) + self.SpawnInitCallSign = true + self.SpawnInitCallSignID = ID or 100 + self.SpawnInitCallSignRED = true +end + --- This method sets a spawn position for the group that is different from the location of the template. -- @param #SPAWN self -- @param Core.Point#COORDINATE Coordinate The position to spawn from @@ -3550,14 +3560,21 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex ) -- R2.2 end if self.SpawnInitCallSign then - for UnitID = 1, #SpawnTemplate.units do - local Callsign = SpawnTemplate.units[UnitID].callsign - if Callsign and type( Callsign ) ~= "number" then - SpawnTemplate.units[UnitID].callsign[1] = self.SpawnInitCallSignID - SpawnTemplate.units[UnitID].callsign[2] = self.SpawnInitCallSignMinor - SpawnTemplate.units[UnitID].callsign[3] = self.SpawnInitCallSignMajor - SpawnTemplate.units[UnitID].callsign["name"] = string.format("%s%d%d",self.SpawnInitCallSignName,self.SpawnInitCallSignMinor,self.SpawnInitCallSignMajor) - --UTILS.PrintTableToLog(SpawnTemplate.units[UnitID].callsign,1) + if self.SpawnInitCallSignRED == true then + for UnitID = 1, #SpawnTemplate.units do + SpawnTemplate.units[UnitID].callsign = self.SpawnInitCallSignID + self.SpawnInitCallSignID = self.SpawnInitCallSignID + 1 + end + else + for UnitID = 1, #SpawnTemplate.units do + local Callsign = SpawnTemplate.units[UnitID].callsign + if Callsign and type( Callsign ) ~= "number" then + SpawnTemplate.units[UnitID].callsign[1] = self.SpawnInitCallSignID + SpawnTemplate.units[UnitID].callsign[2] = self.SpawnInitCallSignMinor + SpawnTemplate.units[UnitID].callsign[3] = self.SpawnInitCallSignMajor + SpawnTemplate.units[UnitID].callsign["name"] = string.format("%s%d%d",self.SpawnInitCallSignName,self.SpawnInitCallSignMinor,self.SpawnInitCallSignMajor) + --UTILS.PrintTableToLog(SpawnTemplate.units[UnitID].callsign,1) + end end end end @@ -3573,7 +3590,7 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex ) -- R2.2 local CallsignLen = CallsignName:len() SpawnTemplate.units[UnitID].callsign[2] = UnitID SpawnTemplate.units[UnitID].callsign["name"] = CallsignName:sub( 1, CallsignLen ) .. SpawnTemplate.units[UnitID].callsign[2] .. SpawnTemplate.units[UnitID].callsign[3] - elseif type( Callsign ) == "number" then + elseif type( Callsign ) == "number" and self.SpawnInitCallSignRED ~= true then SpawnTemplate.units[UnitID].callsign = Callsign + SpawnIndex end end From c7c07c70754b0d0b5d37ee2f90f4f91d9f59e64b Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 27 Mar 2026 17:41:20 +0100 Subject: [PATCH 4/7] #INTEL Added options to simulate Cold War Doppler radar systems incl. of radar cross section --- Moose Development/Moose/Ops/Intelligence.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Ops/Intelligence.lua b/Moose Development/Moose/Ops/Intelligence.lua index 5f39887ca..6392932d6 100644 --- a/Moose Development/Moose/Ops/Intelligence.lua +++ b/Moose Development/Moose/Ops/Intelligence.lua @@ -116,7 +116,7 @@ INTEL = { DopplerNotchSin = math.sin(math.rad(15)), DopplerMinSpeedMps = 50, DopplerRCS = true, - RangeM = 200 * 1000, + DopplerRadarRangeM = 200 * 1000, } --- Detected item info. @@ -2759,7 +2759,7 @@ function INTEL:_CheckDopplerDetection(TargetUnit, RadarUnit) -- Effective detection range = DopplerRadarRangeM × (σ_eff / σ_ref)^0.25 -- Beyond that range: target not detected (hard cutoff at 100%; soft fade -- starts at 80% of R_max to smooth the transition). - if self.DopplerRCS and slant > 1 then + if self.DopplerRCS == true and slant > 1 then local sigma = self:_GetAspectRCS(TargetUnit, rpos, spd, tvel) -- (σ/σ_ref)^0.25 — clamp to avoid log of 0 for VLO aircraft local scale = (sigma / INTEL.RCS_Reference) ^ 0.25 From 02bfe9a253218fa8f693447f07816fc5f8950d69 Mon Sep 17 00:00:00 2001 From: smiki Date: Sun, 29 Mar 2026 17:32:59 +0200 Subject: [PATCH 5/7] [REMOVED] CTLD. Disposition for _C130GetUnits --- Moose Development/Moose/Ops/CTLD.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index c2f15d819..1a921e805 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -3712,7 +3712,6 @@ function CTLD:_C130GetUnits(Group, Unit, Name) if canmove then SPAWN:NewWithAlias(_template,alias) :InitRandomizeUnits(true,10,2) - :InitValidateAndRepositionGroundUnits(self.validateAndRepositionUnits) :InitDelayOff() :OnSpawnGroup(function(grp,TimeStamp) grp.spawntime = TimeStamp or timer.getTime() @@ -3725,7 +3724,6 @@ function CTLD:_C130GetUnits(Group, Unit, Name) SPAWN:NewWithAlias(_template,alias) :InitRandomizeUnits(true,10,2) :InitDelayOff() - :InitValidateAndRepositionGroundUnits(self.validateAndRepositionUnits) :OnSpawnGroup(function(grp,TimeStamp) grp.spawntime = TimeStamp or timer.getTime() self.DroppedTroops[tc] = grp From 1f0a154e4deb73f2d85a9a10386fcf2bee04337b Mon Sep 17 00:00:00 2001 From: smiki Date: Sun, 29 Mar 2026 17:35:41 +0200 Subject: [PATCH 6/7] CTLD. Set max disposition search radius for C-130J --- Moose Development/Moose/Ops/CTLD.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index 1a921e805..e33898122 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -3712,6 +3712,7 @@ function CTLD:_C130GetUnits(Group, Unit, Name) if canmove then SPAWN:NewWithAlias(_template,alias) :InitRandomizeUnits(true,10,2) + :InitValidateAndRepositionGroundUnits(self.validateAndRepositionUnits, 70) :InitDelayOff() :OnSpawnGroup(function(grp,TimeStamp) grp.spawntime = TimeStamp or timer.getTime() @@ -3724,6 +3725,7 @@ function CTLD:_C130GetUnits(Group, Unit, Name) SPAWN:NewWithAlias(_template,alias) :InitRandomizeUnits(true,10,2) :InitDelayOff() + :InitValidateAndRepositionGroundUnits(self.validateAndRepositionUnits, 70) :OnSpawnGroup(function(grp,TimeStamp) grp.spawntime = TimeStamp or timer.getTime() self.DroppedTroops[tc] = grp From cace516e9127ec2f18a7644eff1729600bea1e81 Mon Sep 17 00:00:00 2001 From: smiki Date: Tue, 31 Mar 2026 18:30:04 +0200 Subject: [PATCH 7/7] [FIXED] CTLD maxUnloadTroopsAllowed --- Moose Development/Moose/Ops/CTLD.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index e33898122..1f9a7aab3 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -7607,7 +7607,7 @@ function CTLD:_RefreshDropTroopsMenu(Group, Unit) else local parentMenu = MENU_GROUP:New(theGroup, label, dropTroopsMenu) for q = 1, count do - if q > self.maxUnloadTroopsAllowed then break end + if q > self.maxUnloadTroopsAllowed and self.maxUnloadTroopsAllowed > -1 then break end MENU_GROUP_COMMAND:New(theGroup, string.format(self.gettext:GetEntry("MENU_DROP_N_TROOPS",self.locale), q, tName), parentMenu, self._UnloadSingleTroopByID, self, theGroup, theUnit, chunkID, q) --MENU_GROUP_COMMAND:New(theGroup, string.format("Drop (%d) %s", q, tName), parentMenu, self._UnloadSingleTroopByID, self, theGroup, theUnit, chunkID, q) end