diff --git a/engine/Sim/Unit.lua b/engine/Sim/Unit.lua index cf5e6e70b40..e80fdb48c3b 100644 --- a/engine/Sim/Unit.lua +++ b/engine/Sim/Unit.lua @@ -52,6 +52,16 @@ local Unit = {} ---| "HoldingPattern" ---| "SiloBuildingAmmo" +---@class UnitCommand +---@field _c_object userdata +---@field blueprintId? string -- For build commands +---@field commandType integer -- Integer representation of CommandType, see UnitQueueDataToCommand for details +---@field target? Prop|Unit|Entity -- For commands that target an entity +---@field targetId? EntityId +---@field x number -- X coordinate of command target +---@field y number -- Y coordinate of command target +---@field z number -- Z coordinate of command target + --- Adds a command cap to the unit ---@param category moho.EntityCategory function Unit:AddBuildRestriction(category) @@ -146,7 +156,7 @@ function Unit:GetCargo() end --- Returns table of commands queued up for this unit ----@return { } +---@return UnitCommand[] function Unit:GetCommandQueue() end diff --git a/lua/sim/Unit.lua b/lua/sim/Unit.lua index a3f2fd46c62..f2e56110df9 100644 --- a/lua/sim/Unit.lua +++ b/lua/sim/Unit.lua @@ -96,14 +96,6 @@ SyncMeta = { ---@field AdjEnergyMod? number ---@field AdjRoFMod? number ----@class UnitCommand ----@field x number ----@field y number ----@field z number ----@field targetId? EntityId ----@field target? Entity ----@field commandType string - ---@class AIUnitProperties ---@field AIPlatoonReference AIPlatoon ---@field AIBaseManager LocationType @@ -2809,9 +2801,6 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent) { if order == 'Repair' then self:OnStartRepair(built) - elseif self:GetHealth() < self:GetMaxHealth() and not table.empty(self:GetGuards()) then - -- Unit building something is damaged and has assisters, check their focus - self:CheckAssistersFocus() end if order ~= 'Upgrade' or bpSelf.Display.ShowBuildEffectsDuringUpgrade then