From a798f2d61cfd75db862afc7e5fc88fd9d6c5f591 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Mon, 23 Sep 2024 12:43:39 +0200 Subject: [PATCH 1/4] Small fixes --- Moose Development/Moose/Core/Set.lua | 7 +++++-- Moose Development/Moose/Wrapper/DynamicCargo.lua | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index bc2bb0cd0..eeb7baf0e 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -8355,14 +8355,17 @@ do -- SET_SCENERY -- @param #SET_SCENERY self -- @return Core.Point#COORDINATE The center coordinate of all the objects in the set. function SET_SCENERY:GetCoordinate() - + --[[ local Coordinate = COORDINATE:New({0,0,0}) - + local Item = self:GetRandomSurely() if Item then Coordinate:GetCoordinate() end + --]] + + local Coordinate = self:GetFirst():GetCoordinate() local x1 = Coordinate.x local x2 = Coordinate.x diff --git a/Moose Development/Moose/Wrapper/DynamicCargo.lua b/Moose Development/Moose/Wrapper/DynamicCargo.lua index 63f341009..3ff7ddc53 100644 --- a/Moose Development/Moose/Wrapper/DynamicCargo.lua +++ b/Moose Development/Moose/Wrapper/DynamicCargo.lua @@ -458,7 +458,7 @@ function DYNAMICCARGO:_UpdatePosition() self:T(self.lid.." AGL: "..agl or -1) local isunloaded = true local client - local playername + local playername = self.Owner if count > 0 and (agl > 0 or self.testing) then self:T(self.lid.." Possible alive helos: "..count or -1) if agl ~= 0 or self.testing then @@ -470,6 +470,11 @@ function DYNAMICCARGO:_UpdatePosition() self.Owner = playername _DATABASE:CreateEventDynamicCargoUnloaded(self) end + elseif count > 0 and agl == 0 then + self:T(self.lid.." moved! LOADED -> UNLOADED by "..tostring(playername)) + self.CargoState = DYNAMICCARGO.State.UNLOADED + self.Owner = playername + _DATABASE:CreateEventDynamicCargoUnloaded(self) end end self.LastPosition = pos From 2c9b0b837652e2cf0c10b2c13ab9ebdff06b163e Mon Sep 17 00:00:00 2001 From: Bryan Keller <83441574+brykeller@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:51:31 -0700 Subject: [PATCH 2/4] Kiowa rescues sit on the skids, no doors need to be opened Kiowa rescues sit on the skids, no doors need to be opened --- Moose Development/Moose/Utilities/Utils.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index 5e4033223..d70a733f0 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -2315,9 +2315,9 @@ function UTILS.IsLoadingDoorOpen( unit_name ) return true end - if type_name == "OH-58D" and (unit:getDrawArgumentValue(35) > 0 or unit:getDrawArgumentValue(421) == -1) then - BASE:T(unit_name .. " cargo door is open") - return true + if type_name == "OH58D" then + BASE:T(unit_name .. " front door(s) are open") + return true -- no doors on this one ;) end if type_name == "CH-47Fbl1" and (unit:getDrawArgumentValue(86) > 0.5) then From ece0a46f97c7d1664fd5136d47e6bce7a35daf26 Mon Sep 17 00:00:00 2001 From: Bryan Keller <83441574+brykeller@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:59:26 -0700 Subject: [PATCH 3/4] Update CTLD.lua to update the correct Kiowa typename to OH58D Update CTLD.lua to update the correct Kiowa typename to OH58D --- Moose Development/Moose/Ops/CTLD.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index f1e8d5b57..4318942c2 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -897,7 +897,7 @@ do -- ["Bronco-OV-10A"] = {type="Bronco-OV-10A", crates= false, troops=true, cratelimit = 0, trooplimit = 5, length = 13, cargoweightlimit = 1450}, -- ["Bronco-OV-10A"] = {type="Bronco-OV-10A", crates= false, troops=true, cratelimit = 0, trooplimit = 5, length = 13, cargoweightlimit = 1450}, -- ["OH-6A"] = {type="OH-6A", crates=false, troops=true, cratelimit = 0, trooplimit = 4, length = 7, cargoweightlimit = 550}, --- ["OH-58D"] = {type="OH58D", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 14, cargoweightlimit = 400}, +-- ["OH58D"] = {type="OH58D", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 14, cargoweightlimit = 400}, -- ["CH-47Fbl1"] = {type="CH-47Fbl1", crates=true, troops=true, cratelimit = 4, trooplimit = 31, length = 20, cargoweightlimit = 8000}, -- -- ### 2.2.2 Activate and deactivate zones @@ -1337,7 +1337,7 @@ CTLD.UnitTypeCapabilities = { ["AH-64D_BLK_II"] = {type="AH-64D_BLK_II", crates=false, troops=true, cratelimit = 0, trooplimit = 2, length = 17, cargoweightlimit = 200}, -- 2 ppl **outside** the helo ["Bronco-OV-10A"] = {type="Bronco-OV-10A", crates= false, troops=true, cratelimit = 0, trooplimit = 5, length = 13, cargoweightlimit = 1450}, ["OH-6A"] = {type="OH-6A", crates=false, troops=true, cratelimit = 0, trooplimit = 4, length = 7, cargoweightlimit = 550}, - ["OH-58D"] = {type="OH58D", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 14, cargoweightlimit = 400}, + ["OH58D"] = {type="OH58D", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 14, cargoweightlimit = 400}, ["CH-47Fbl1"] = {type="CH-47Fbl1", crates=true, troops=true, cratelimit = 4, trooplimit = 31, length = 20, cargoweightlimit = 10800}, } @@ -4276,7 +4276,7 @@ end -- @param #string SubCategory Name of sub-category (optional). -- @param #boolean DontShowInMenu (optional) If set to "true" this won't show up in the menu. -- @param Core.Zone#ZONE Location (optional) If set, the cargo item is **only** available here. Can be a #ZONE object or the name of a zone as #string. --- @param #string UnitTypes Unit type names (optional). If set, only these unit types can pick up the cargo, e.g. "UH-1H" or {"UH-1H","OH-58D"}. +-- @param #string UnitTypes Unit type names (optional). If set, only these unit types can pick up the cargo, e.g. "UH-1H" or {"UH-1H","OH58D"}. -- @param #string Category Static category name (optional). If set, spawn cargo crate with an alternate category type, e.g. "Cargos". -- @param #string TypeName Static type name (optional). If set, spawn cargo crate with an alternate type shape, e.g. "iso_container". -- @param #string ShapeName Static shape name (optional). If set, spawn cargo crate with an alternate type sub-shape, e.g. "iso_container_cargo". @@ -4360,7 +4360,7 @@ end -- @param #string SubCategory Name of the sub-category (optional). -- @param #boolean DontShowInMenu (optional) If set to "true" this won't show up in the menu. -- @param Core.Zone#ZONE Location (optional) If set, the cargo item is **only** available here. Can be a #ZONE object or the name of a zone as #string. --- @param #string UnitTypes Unit type names (optional). If set, only these unit types can pick up the cargo, e.g. "UH-1H" or {"UH-1H","OH-58D"} +-- @param #string UnitTypes Unit type names (optional). If set, only these unit types can pick up the cargo, e.g. "UH-1H" or {"UH-1H","OH58D"} -- @param #string Category Static category name (optional). If set, spawn cargo crate with an alternate category type, e.g. "Cargos". -- @param #string TypeName Static type name (optional). If set, spawn cargo crate with an alternate type shape, e.g. "iso_container". -- @param #string ShapeName Static shape name (optional). If set, spawn cargo crate with an alternate type sub-shape, e.g. "iso_container_cargo". From e9d75f6d94b648fa9ce50384417b138223457e30 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 26 Sep 2024 09:06:57 +0200 Subject: [PATCH 4/4] #CSAR Beacon Name Fix --- Moose Development/Moose/Ops/CSAR.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Ops/CSAR.lua b/Moose Development/Moose/Ops/CSAR.lua index d54da54db..af9339c13 100644 --- a/Moose Development/Moose/Ops/CSAR.lua +++ b/Moose Development/Moose/Ops/CSAR.lua @@ -841,9 +841,9 @@ function CSAR:_AddCsar(_coalition , _country, _point, _typeName, _unitName, _pla local BeaconName if _playerName then - BeaconName = _unitName..math.random(1,10000) - elseif _unitName then BeaconName = _playerName..math.random(1,10000) + elseif _unitName then + BeaconName = _unitName..math.random(1,10000) else BeaconName = "Ghost-1-1"..math.random(1,10000) end