From 3813a30deff7614b12f06e389092f0313d9d4678 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Mon, 26 Aug 2024 18:30:52 +0200 Subject: [PATCH] xx --- Moose Development/Moose/Ops/CTLD.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index 5cfbe085a..d7282531d 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -186,19 +186,19 @@ CTLD_CARGO = { -- @return #boolean Outcome function CTLD_CARGO:UnitCanCarry(Unit) local outcome = false - UTILS.PrintTableToLog(self.TypeNames) - if (not self.TypeNames) or (not Unit) or (not Unit:IsAlive()) then - return false - end - local unittype = Unit:GetTypeName() or "none" - --self:I("Checking for type name: "..unittype) - for _,_typeName in pairs(self.TypeNames or {}) do - if _typeName == unittype then - outcome = true - break + if not self.TypeNames then return true end + if Unit and Unit:IsAlive() then + local unittype = Unit:GetTypeName() or "none" + --self:I("Checking for type name: "..unittype) + for _,_typeName in pairs(self.TypeNames or {}) do + if _typeName == unittype then + outcome = true + break + end end + return outcome end - return outcome + return true end --- Add Resource Map information table