mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
xx
This commit is contained in:
parent
668d120d60
commit
68b2b452cc
@ -186,19 +186,19 @@ CTLD_CARGO = {
|
|||||||
-- @return #boolean Outcome
|
-- @return #boolean Outcome
|
||||||
function CTLD_CARGO:UnitCanCarry(Unit)
|
function CTLD_CARGO:UnitCanCarry(Unit)
|
||||||
local outcome = false
|
local outcome = false
|
||||||
UTILS.PrintTableToLog(self.TypeNames)
|
if not self.TypeNames then return true end
|
||||||
if (not self.TypeNames) or (not Unit) or (not Unit:IsAlive()) then
|
if Unit and Unit:IsAlive() then
|
||||||
return false
|
local unittype = Unit:GetTypeName() or "none"
|
||||||
end
|
--self:I("Checking for type name: "..unittype)
|
||||||
local unittype = Unit:GetTypeName() or "none"
|
for _,_typeName in pairs(self.TypeNames or {}) do
|
||||||
--self:I("Checking for type name: "..unittype)
|
if _typeName == unittype then
|
||||||
for _,_typeName in pairs(self.TypeNames or {}) do
|
outcome = true
|
||||||
if _typeName == unittype then
|
break
|
||||||
outcome = true
|
end
|
||||||
break
|
|
||||||
end
|
end
|
||||||
|
return outcome
|
||||||
end
|
end
|
||||||
return outcome
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Add Resource Map information table
|
--- Add Resource Map information table
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user