Compare commits

...

27 Commits

Author SHA1 Message Date
Applevangelist 26fbae8672 #AIRBOSS Added early F-14A 2025-11-15 16:48:05 +01:00
Applevangelist 5089e7df25 xx 2025-11-14 17:26:24 +01:00
Thomas 0c0d1cc794 Merge pull request #2445 from shaji-Dev/master
[ADDED] STATIC:GetVec2Cached() and STATIC:GetVec3Cached()
2025-11-14 13:45:22 +01:00
Shafik 21b968a9c6 [ADDED] STATIC:GetVec2Cached() and STATIC:GetVec3Cached() for statics considering respawns 2025-11-14 14:42:52 +02:00
Thomas 704bb8668f Merge pull request #2443 from FlightControl-Master/Applevangelist-DC-1
Update DynamicCargo.lua
2025-11-11 12:54:42 +01:00
Thomas 763bfb4bb1 Update DynamicCargo.lua
Added Destroy-Functionality
2025-11-11 12:41:30 +01:00
Applevangelist 046bd37fd5 xx 2025-11-09 17:19:29 +01:00
Applevangelist fbf83b3aed #SET - Rationalize FilterCoalitions() and allow values like coalition.side.BLUE 2025-11-09 16:53:10 +01:00
Applevangelist 22097987dc #CTLD, #DYNAMICCARGO - C-130j-30 additions 2025-11-09 14:43:11 +01:00
Thomas 98d02d7532 Merge pull request #2440 from leka1986/patch-2
Update CTLD.lua
2025-11-09 09:24:48 +01:00
leka1986 7b44e7a3f6 Update CTLD.lua
Removed quantity menu if there is only one set.
2025-11-09 02:16:02 +01:00
leka1986 aa4cf37aed Clean up comments in CTLD.lua
Removed unnecessary comment lines in CTLD.lua.
2025-11-08 02:52:23 +01:00
leka1986 caf2b4e736 Update CTLD.lua
Added ability to drop "Sets" from 2 and up will be sets, else it will be like before.

Changed _PackCratesNearby to handle all cargo within the range instead of the nearest.
2025-11-08 02:47:56 +01:00
Frank da516a0167 Merge pull request #2439 from shaji-Dev/master
[FIXED] `dcsgroup:getUnit(1)` nil pointer
2025-11-07 21:53:26 +01:00
Shafik 17d1cf673d [ADDED] IsRed, IsBlue and IsNeutral to IDENTIFIABLE 2025-11-06 12:23:13 +02:00
Shafik 1fcd70b0d0 Merge remote-tracking branch 'origin/master' 2025-11-05 12:36:03 +02:00
Shafik 832941494b [FIXED] dcsgroup:getUnit(1) nil pointer 2025-11-05 12:35:55 +02:00
Thomas 0e82cb977e Merge pull request #2437 from leka1986/patch-2
Update CTLD.lua
2025-11-05 06:22:03 +01:00
leka1986 e9237146a3 Update CTLD.lua
Fixed a bug. 

When dropping crates, while choosing "Drop and build" The first drop will put the crate into a crate that can be loaded but a second later, that crate will be cleaned up due to build. This makes sure that the crates are not in the "load crates" list.
2025-11-04 20:09:48 +01:00
Thomas b72899b500 Merge pull request #2436 from shaji-Dev/master
[ADDED] Complete list of DCS warehouse equipment
2025-11-04 13:24:09 +01:00
Shafik 2f39e38264 [ADDED] CTLD. option to load back crates from save file. 2025-11-04 11:32:24 +02:00
Shafik db54672fbd [ADDED] CTLD. option to load back crates from save file. 2025-11-04 11:30:59 +02:00
Shafik 30d9a7d703 [ADDED] Complete list of DCS warehouse equipment 2025-11-04 10:27:16 +02:00
Thomas 5a088a740e Merge pull request #2434 from nasgroup94/master
more T-45 AOA adjustments
2025-11-03 06:29:14 +01:00
nasgroup94 be220b6c1d more T-45 AOA adjustments 2025-11-02 19:48:16 -05:00
Thomas 645c4a4dbc Merge pull request #2432 from FlightControl-Master/Applevangelist-patch-1
Update CTLD.lua
2025-11-02 17:57:09 +01:00
Thomas c2a630dabd Update CTLD.lua
Cargo counters by @lekaa
2025-11-02 17:56:55 +01:00
9 changed files with 3418 additions and 2279 deletions
File diff suppressed because it is too large Load Diff
+20 -14
View File
@@ -45,7 +45,7 @@
-- **Supported Aircraft:**
--
-- * [F/A-18C Hornet Lot 20](https://forums.eagle.ru/forumdisplay.php?f=557) (Player & AI)
-- * [F-14A/B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI)
-- * [F-14A/B/A Early Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI)
-- * [A-4E Skyhawk Community Mod](https://forums.eagle.ru/showthread.php?t=224989) (Player & AI)
-- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI)
-- * [T-45C Goshawk](https://forum.dcs.world/topic/203816-vnao-t-45-goshawk/) (VNAO mod) (Player & AI)
@@ -63,7 +63,7 @@
-- no other fixed wing aircraft (human or AI controlled) are supposed to land on these ships. Currently only Case I is supported. Case II/III take slightly different steps from the CVN carrier.
-- However, if no offset is used for the holding radial this provides a very close representation of the V/STOL Case III, allowing for an approach to over the deck and a vertical landing.
--
-- Heatblur's mighty F-14B Tomcat has been added (March 13th 2019) as well. Same goes for the A version.
-- Heatblur's mighty F-14A/B/A Early Tomcat has been added as well.
--
-- The [DCS Supercarriers](https://www.digitalcombatsimulator.com/de/shop/modules/supercarrier/) are also supported.
--
@@ -1276,6 +1276,7 @@ AIRBOSS = {
-- @field #string A4EC A-4E Community mod.
-- @field #string HORNET F/A-18C Lot 20 Hornet by Eagle Dynamics.
-- @field #string F14A F-14A by Heatblur.
-- @field #string F14A_Early F-14A-135-GR-Early by Heatblur.
-- @field #string F14B F-14B by Heatblur.
-- @field #string F14A_AI F-14A Tomcat (AI).
-- @field #string FA18C F/A-18C Hornet (AI).
@@ -1294,6 +1295,7 @@ AIRBOSS.AircraftCarrier={
HORNET="FA-18C_hornet",
A4EC="A-4E-C",
F14A="F-14A-135-GR",
F14A_Early="F-14A-135-GR-Early",
F14B="F-14B",
F14A_AI="F-14A",
FA18C="F/A-18C",
@@ -5473,7 +5475,7 @@ function AIRBOSS:_GetAircraftAoA( playerData )
local goshawk = playerData.actype == AIRBOSS.AircraftCarrier.T45C
local skyhawk = playerData.actype == AIRBOSS.AircraftCarrier.A4EC
local harrier = playerData.actype == AIRBOSS.AircraftCarrier.AV8B
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B or playerData.actype == AIRBOSS.AircraftCarrier.F14A_Early
local corsair = playerData.actype == AIRBOSS.AircraftCarrier.CORSAIR or playerData.actype == AIRBOSS.AircraftCarrier.CORSAIR_CW
-- Table with AoA values.
@@ -5498,11 +5500,15 @@ function AIRBOSS:_GetAircraftAoA( playerData )
aoa.OnSpeedMin = self:_AoAUnit2Deg( playerData, 14.0 ) -- 14.17 --14.5 units -- VNAO Edit - Original value 14.5
aoa.Fast = self:_AoAUnit2Deg( playerData, 13.5 ) -- 13.33 --14.0 units -- VNAO Edit - Original value 14
aoa.FAST = self:_AoAUnit2Deg( playerData, 12.5 ) -- 11.67 --13.0 units -- VNAO Edit - Original value 13
local hornet = playerData.actype == AIRBOSS.AircraftCarrier.HORNET
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B
elseif goshawk then --These parameters edited by CIRCUIT to support new VNAO flight model
-- T-45C Goshawk parameters.
aoa.SLOW = 9.5 -- 8.00 -- 19
aoa.Slow = 9.25 -- 7.75 -- 18
aoa.OnSpeedMax = 9.0 --7.25 -- 17.5
aoa.OnSpeed = 8.5 -- 7.00 -- 17
aoa.OnSpeedMin = 8.25 -- 6.75 -- 16.5
aoa.Fast = 7.75 -- 6.25 -- 16
aoa.FAST = 5.5 -- 6.00 -- 15
elseif skyhawk then
-- A-4E-C Skyhawk parameters from https://forums.eagle.ru/showpost.php?p=3703467&postcount=390
-- Note that these are arbitrary UNITS and not degrees. We need a conversion formula!
@@ -5548,7 +5554,7 @@ function AIRBOSS:_AoAUnit2Deg( playerData, aoaunits )
local degrees = aoaunits
-- Check aircraft type of player.
if playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B then
if playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B or playerData.actype == AIRBOSS.AircraftCarrier.F14A_Early then
-------------
-- F-14A/B --
@@ -5591,7 +5597,7 @@ function AIRBOSS:_AoADeg2Units( playerData, degrees )
local aoaunits = degrees
-- Check aircraft type of player.
if playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B then
if playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B or playerData.actype == AIRBOSS.AircraftCarrier.F14A_Early then
-------------
-- F-14A/B --
@@ -11589,7 +11595,7 @@ function AIRBOSS:_AttitudeMonitor( playerData )
local unitClient = Unit.getByName(unit:GetName()) -- VNAO Edit - Added
local hornet = playerData.actype == AIRBOSS.AircraftCarrier.HORNET -- VNAO Edit - Added
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B -- VNAO Edit - Added
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B or playerData.actype == AIRBOSS.AircraftCarrier.F14A_Early -- VNAO Edit - Added
if hornet then -- VNAO Edit - Added
local nozzlePosL = 0 -- VNAO Edit - Added
@@ -11822,7 +11828,7 @@ function AIRBOSS:_NozzleArgumentLeft( unit ) -- VNAO Edit - Added
else -- VNAO Edit - Added
nozzlePosL = 0 -- VNAO Edit - Added
end -- VNAO Edit - Added
elseif typeName == "F-14A-135-GR" or typeName == "F-14B" then -- VNAO Edit - Added
elseif typeName == "F-14A-135-GR" or typeName == "F-14B" or typeName == "F-14A-135-GR-Early" then -- VNAO Edit - Added
nozzlePosL = unitClient:getDrawArgumentValue(434) -- VNAO Edit - Added
end -- VNAO Edit - Added
@@ -11847,7 +11853,7 @@ function AIRBOSS:_NozzleArgumentRight( unit ) -- VNAO Edit - Added
else -- VNAO Edit - Added
nozzlePosR = 0 -- VNAO Edit - Added
end -- VNAO Edit - Added
elseif typeName == "F-14A-135-GR" or typeName == "F-14B" then -- VNAO Edit - Added
elseif typeName == "F-14A-135-GR" or typeName == "F-14B" or typeName == "F-14A-135-GR-Early" then -- VNAO Edit - Added
nozzlePosR = unitClient:getDrawArgumentValue(433) -- VNAO Edit - Added
end -- VNAO Edit - Added
return nozzlePosR -- VNAO Edit - Added
@@ -15062,7 +15068,7 @@ function AIRBOSS:_GetACNickname( actype )
nickname = "Hawkeye"
elseif actype == AIRBOSS.AircraftCarrier.C2A then
nickname = "Greyhound"
elseif actype == AIRBOSS.AircraftCarrier.F14A_AI or actype == AIRBOSS.AircraftCarrier.F14A or actype == AIRBOSS.AircraftCarrier.F14B then
elseif actype == AIRBOSS.AircraftCarrier.F14A_AI or actype == AIRBOSS.AircraftCarrier.F14A or actype == AIRBOSS.AircraftCarrier.F14B or actype == AIRBOSS.AircraftCarrier.F14A_Early then
nickname = "Tomcat"
elseif actype == AIRBOSS.AircraftCarrier.FA18C or actype == AIRBOSS.AircraftCarrier.HORNET then
nickname = "Hornet"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -2855,7 +2855,7 @@ do -- Route methods
-- @param Core.Zone#ZONE Zone The zone where to route to.
-- @param #boolean Randomize Defines whether to target point gets randomized within the Zone.
-- @param #number Speed The speed in m/s. Default is 5.555 m/s = 20 km/h.
-- @param Core.Base#FORMATION Formation The formation string.
-- @param DCS#FORMATION Formation The formation string.
function CONTROLLABLE:TaskRouteToZone( Zone, Randomize, Speed, Formation )
self:F2( Zone )
@@ -2915,7 +2915,7 @@ do -- Route methods
-- @param #CONTROLLABLE self
-- @param DCS#Vec2 Vec2 The Vec2 where to route to.
-- @param #number Speed The speed in m/s. Default is 5.555 m/s = 20 km/h.
-- @param Core.Base#FORMATION Formation The formation string.
-- @param DCS#FORMATION Formation The formation string.
function CONTROLLABLE:TaskRouteToVec2( Vec2, Speed, Formation )
local DCSControllable = self:GetDCSObject()
@@ -108,8 +108,9 @@ DYNAMICCARGO.State = {
-- @type DYNAMICCARGO.AircraftTypes
DYNAMICCARGO.AircraftTypes = {
["CH-47Fbl1"] = "CH-47Fbl1",
["Mi-8MTV2"] = "CH-47Fbl1",
["Mi-8MT"] = "CH-47Fbl1",
["Mi-8MTV2"] = "Mi-8MTV2",
["Mi-8MT"] = "Mi-8MT",
["C-130J-30"] = "C-130J-30",
}
--- Helo types possible.
@@ -122,23 +123,29 @@ DYNAMICCARGO.AircraftDimensions = {
["length"] = 11,
["ropelength"] = 30,
},
["Mi-8MTV2"] = {
["Mi-8MTV2"] = {
["width"] = 6,
["height"] = 6,
["length"] = 15,
["ropelength"] = 30,
},
["Mi-8MT"] = {
["Mi-8MT"] = {
["width"] = 6,
["height"] = 6,
["length"] = 15,
["ropelength"] = 30,
},
["C-130J-30"] = {
["width"] = 4,
["height"] = 12,
["length"] = 35,
["ropelength"] = 0,
},
}
--- DYNAMICCARGO class version.
-- @field #string version
DYNAMICCARGO.version="0.0.9"
DYNAMICCARGO.version="0.1.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -527,7 +534,10 @@ function DYNAMICCARGO:_UpdatePosition()
---------------
-- REMOVED Cargo
---------------
if self.timer and self.timer:IsRunning() then self.timer:Stop() end
if self.timer and self.timer:IsRunning() then
self.timer:Stop()
self.timer=nil
end
self:T(self.lid.." dead! " ..self.CargoState.."-> REMOVED")
self.CargoState = DYNAMICCARGO.State.REMOVED
_DATABASE:CreateEventDynamicCargoRemoved(self)
@@ -535,6 +545,24 @@ function DYNAMICCARGO:_UpdatePosition()
return self
end
--- [USER] Destroy a DYNAMICCARGO object.
-- @param #DYNAMICCARGO self
-- @param #boolean GenerateEvent Set to false to remove an item silently. Defaults to true.
-- @return #boolean Return Returns nil if the object could not be found, else returns true.
function DYNAMICCARGO:Destroy(GenerateEvent)
local DCSObject = self:GetDCSObject()
if DCSObject then
local GenerateEvent = (GenerateEvent ~= nil and GenerateEvent == false) and false or true
if GenerateEvent and GenerateEvent == true then
self:CreateEventDead( timer.getTime(), DCSObject )
end
DCSObject:destroy()
self:_UpdatePosition()
return true
end
return nil
end
--- [Internal] Track helos for loaded/unloaded decision making.
-- @param Wrapper.Client#CLIENT client
-- @return #boolean IsIn
+24 -12
View File
@@ -1058,9 +1058,12 @@ function GROUP:GetTypeName()
local DCSGroup = self:GetDCSObject()
if DCSGroup then
local GroupTypeName = DCSGroup:getUnit(1):getTypeName()
--self:T3( GroupTypeName )
return( GroupTypeName )
local unit = DCSGroup:getUnit(1)
if unit then
local GroupTypeName = unit:getTypeName()
--self:T3( GroupTypeName )
return( GroupTypeName )
end
end
return nil
@@ -1075,9 +1078,12 @@ function GROUP:GetNatoReportingName()
local DCSGroup = self:GetDCSObject()
if DCSGroup then
local GroupTypeName = DCSGroup:getUnit(1):getTypeName()
--self:T3( GroupTypeName )
return UTILS.GetReportingName(GroupTypeName)
local unit = DCSGroup:getUnit(1)
if unit then
local GroupTypeName = unit:getTypeName()
--self:T3( GroupTypeName )
return UTILS.GetReportingName(GroupTypeName)
end
end
return "Bogey"
@@ -1093,9 +1099,12 @@ function GROUP:GetPlayerName()
local DCSGroup = self:GetDCSObject()
if DCSGroup then
local PlayerName = DCSGroup:getUnit(1):getPlayerName()
--self:T3( PlayerName )
return( PlayerName )
local unit = DCSGroup:getUnit(1)
if unit then
local PlayerName = unit:getPlayerName()
--self:T3( PlayerName )
return( PlayerName )
end
end
return nil
@@ -1111,9 +1120,12 @@ function GROUP:GetCallsign()
local DCSGroup = self:GetDCSObject()
if DCSGroup then
local GroupCallSign = DCSGroup:getUnit(1):getCallsign()
--self:T3( GroupCallSign )
return GroupCallSign
local unit = DCSGroup:getUnit(1)
if unit then
local GroupCallSign = unit:getCallsign()
--self:T3( GroupCallSign )
return GroupCallSign
end
end
BASE:E( { "Cannot GetCallsign", Positionable = self, Alive = self:IsAlive() } )
@@ -170,6 +170,27 @@ function IDENTIFIABLE:GetCoalition()
return nil
end
--- Returns true if identifiable is of RED coalition.
-- @param #IDENTIFIABLE self
-- @return #boolean If the identifiable is red.
function IDENTIFIABLE:IsRed()
return self:GetCoalition() == coalition.side.RED
end
--- Returns true if identifiable is of BLUE coalition.
-- @param #IDENTIFIABLE self
-- @return #boolean If the identifiable is blue.
function IDENTIFIABLE:IsBlue()
return self:GetCoalition() == coalition.side.BLUE
end
--- Returns true if identifiable is of NEUTRAL coalition.
-- @param #IDENTIFIABLE self
-- @return #boolean If the identifiable is neutral.
function IDENTIFIABLE:IsNeutral()
return self:GetCoalition() == coalition.side.NEUTRAL
end
--- Returns the name of the coalition of the Identifiable.
-- @param #IDENTIFIABLE self
-- @return #string The name of the coalition.
@@ -64,6 +64,9 @@ function STATIC:Register( StaticName )
else
self:E(string.format("Static object %s does not exist!", tostring(self.StaticName)))
end
-- Cache position
self._vec3 = self:GetVec3()
return self
end
@@ -86,6 +89,30 @@ function STATIC:GetLife()
return nil
end
--- Get the position of the STATIC even if it is not alive.
-- @param #STATIC self
-- @return DCS#Vec2 The 2D point vector of the POSITIONABLE.
-- @return #nil The position was not cached.
function STATIC:GetVec2Cached()
local vec2 = self:GetVec2()
if not vec2 and self._vec3 then
vec2 = {x = self._vec3.x, y = self._vec3.z }
end
return vec2
end
--- Get the position of the STATIC even if it is not alive.
-- @param #STATIC self
-- @return DCS#Vec3 The 3D point vector of the POSITIONABLE.
-- @return #nil The position was not cached.
function STATIC:GetVec3Cached()
local vec3 = self:GetVec3()
if not vec3 and self._vec3 then
vec3 = self._vec3
end
return vec3
end
--- Finds a STATIC from the _DATABASE using a DCSStatic object.
-- @param #STATIC self
-- @param DCS#StaticObject DCSStatic An existing DCS Static object reference.
@@ -232,6 +259,8 @@ function STATIC:SpawnAt(Coordinate, Heading, Delay)
local SpawnStatic=SPAWNSTATIC:NewFromStatic(self.StaticName)
SpawnStatic:SpawnFromPointVec2( Coordinate, Heading, self.StaticName )
-- Cache position
self._vec3 = self:GetVec3()
end
@@ -255,6 +284,8 @@ function STATIC:ReSpawn(CountryID, Delay)
local SpawnStatic=SPAWNSTATIC:NewFromStatic(self.StaticName, CountryID)
SpawnStatic:Spawn(nil, self.StaticName)
-- Cache position
self._vec3 = self:GetVec3()
end
@@ -278,6 +309,8 @@ function STATIC:ReSpawnAt(Coordinate, Heading, Delay)
local SpawnStatic=SPAWNSTATIC:NewFromStatic(self.StaticName, self:GetCountry())
SpawnStatic:SpawnFromCoordinate(Coordinate, Heading, self.StaticName)
-- Cache position
self._vec3 = self:GetVec3()
end