From fb6fe4ab4cd01c6890fc41f7c7a3b2be9262276d Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Thu, 30 May 2024 00:41:35 -0700 Subject: [PATCH] Annotate auto assist in `InitialAutoMode` and `SetAutoMode` (#6218) --- changelog/snippets/other.6218.md | 1 + engine/Core/Blueprints/UnitBlueprint.lua | 3 ++- engine/Sim/Unit.lua | 2 +- engine/User.lua | 2 +- units/UAL0111/UAL0111_unit.bp | 2 +- units/UEA0001/UEA0001_unit.bp | 2 +- units/UEA0003/UEA0003_unit.bp | 2 +- units/UEL0111/UEL0111_unit.bp | 2 +- units/UES0202/UES0202_unit.bp | 1 - units/URL0111/URL0111_unit.bp | 1 - units/XEL0306/XEL0306_unit.bp | 2 +- units/XSL0111/XSL0111_unit.bp | 2 +- 12 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 changelog/snippets/other.6218.md diff --git a/changelog/snippets/other.6218.md b/changelog/snippets/other.6218.md new file mode 100644 index 0000000000..597b72e7fd --- /dev/null +++ b/changelog/snippets/other.6218.md @@ -0,0 +1 @@ +- (#6218) Annotate auto-assist toggling in `InitialAutoMode` and `SetAutoMode`. diff --git a/engine/Core/Blueprints/UnitBlueprint.lua b/engine/Core/Blueprints/UnitBlueprint.lua index 5da41bb219..dd357614a5 100644 --- a/engine/Core/Blueprints/UnitBlueprint.lua +++ b/engine/Core/Blueprints/UnitBlueprint.lua @@ -141,7 +141,8 @@ ---@field GuardReturnRadius number --- guard range for the unit, automatically added if absent ---@field GuardScanRadius number ---- initial auto mode behaviour for the unit +--- initial toggle of automatic behaviors (silo building and auto-assist) +---@see SetAutoMode ---@field InitialAutoMode boolean --- unit should unpack before firing weapon ---@field NeedUnpack boolean diff --git a/engine/Sim/Unit.lua b/engine/Sim/Unit.lua index e80fdb48c3..071abf89bf 100644 --- a/engine/Sim/Unit.lua +++ b/engine/Sim/Unit.lua @@ -479,7 +479,7 @@ end function Unit:SetAccMult(accelMult) end ---- sets silo auto-build mode +--- enable silo auto-build or unit auto-assist ---@param mode boolean function Unit:SetAutoMode(mode) end diff --git a/engine/User.lua b/engine/User.lua index 74419ec433..a9c024a0a7 100644 --- a/engine/User.lua +++ b/engine/User.lua @@ -1057,7 +1057,7 @@ end function SetActiveBuildTemplate(template) end ---- Set if anyone in the list is auto building +--- Set if anyone in the list is auto building or auto assisting ---@param units UserUnit[] ---@param mode boolean function SetAutoMode(units, mode) diff --git a/units/UAL0111/UAL0111_unit.bp b/units/UAL0111/UAL0111_unit.bp index b0d5b85f35..428162f308 100644 --- a/units/UAL0111/UAL0111_unit.bp +++ b/units/UAL0111/UAL0111_unit.bp @@ -1,6 +1,6 @@ UnitBlueprint{ Description = "Mobile Missile Launcher", - AI = { InitialAutoMode = true }, + AI = { }, Audio = { AmbientMove = Sound { Bank = 'UAL', Cue = 'UAL0111_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' }, Destroyed = Sound { Bank = 'UALDestroy', Cue = 'UAL_Destroy_Land', LodCutoff = 'UnitMove_LodCutoff' }, diff --git a/units/UEA0001/UEA0001_unit.bp b/units/UEA0001/UEA0001_unit.bp index ecf9536f74..eb2484a621 100644 --- a/units/UEA0001/UEA0001_unit.bp +++ b/units/UEA0001/UEA0001_unit.bp @@ -1,4 +1,5 @@ UnitBlueprint { + Description = 'Engineering Drone', AI = { InitialAutoMode = true, }, @@ -100,7 +101,6 @@ UnitBlueprint { SubThreatLevel = 0, SurfaceThreatLevel = 0, }, - Description = 'Engineering Drone', Display = { Abilities = { 'Engineering Suite', diff --git a/units/UEA0003/UEA0003_unit.bp b/units/UEA0003/UEA0003_unit.bp index d8e2b98077..f8c6ed4813 100644 --- a/units/UEA0003/UEA0003_unit.bp +++ b/units/UEA0003/UEA0003_unit.bp @@ -1,4 +1,5 @@ UnitBlueprint { + Description = 'Engineering Drone', AI = { InitialAutoMode = true, }, @@ -100,7 +101,6 @@ UnitBlueprint { SubThreatLevel = 0, SurfaceThreatLevel = 0, }, - Description = 'Engineering Drone', Display = { Abilities = { 'Engineering Suite', diff --git a/units/UEL0111/UEL0111_unit.bp b/units/UEL0111/UEL0111_unit.bp index 567c793fd0..f4af5757ae 100644 --- a/units/UEL0111/UEL0111_unit.bp +++ b/units/UEL0111/UEL0111_unit.bp @@ -1,6 +1,6 @@ UnitBlueprint{ Description = "Mobile Missile Launcher", - AI = { InitialAutoMode = true }, + AI = { }, Audio = { AmbientMove = Sound { Bank = 'UEL', Cue = 'UEL0111_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' }, Destroyed = Sound { Bank = 'UELDestroy', Cue = 'UEL_Destroy_Med_Land', LodCutoff = 'UnitMove_LodCutoff' }, diff --git a/units/UES0202/UES0202_unit.bp b/units/UES0202/UES0202_unit.bp index 25d41ebb26..8193181ada 100644 --- a/units/UES0202/UES0202_unit.bp +++ b/units/UES0202/UES0202_unit.bp @@ -3,7 +3,6 @@ UnitBlueprint{ AI = { AttackAngle = 90, GuardReturnRadius = 30, - InitialAutoMode = true, TargetBones = { "UES0202", "Back_Wake", diff --git a/units/URL0111/URL0111_unit.bp b/units/URL0111/URL0111_unit.bp index 2babb32a59..1d96d50428 100644 --- a/units/URL0111/URL0111_unit.bp +++ b/units/URL0111/URL0111_unit.bp @@ -1,7 +1,6 @@ UnitBlueprint{ Description = "Mobile Missile Launcher", AI = { - InitialAutoMode = true, TargetBones = { "Launcher" }, }, Audio = { diff --git a/units/XEL0306/XEL0306_unit.bp b/units/XEL0306/XEL0306_unit.bp index dba8dcd06d..785529a22c 100644 --- a/units/XEL0306/XEL0306_unit.bp +++ b/units/XEL0306/XEL0306_unit.bp @@ -1,6 +1,6 @@ UnitBlueprint{ Description = "Mobile Missile Platform", - AI = { InitialAutoMode = true }, + AI = { }, Audio = { AmbientMove = Sound { Bank = 'XEL', Cue = 'XEL0306_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' }, Destroyed = Sound { Bank = 'UELDestroy', Cue = 'UEL_Destroy_Med_Land', LodCutoff = 'UnitMove_LodCutoff' }, diff --git a/units/XSL0111/XSL0111_unit.bp b/units/XSL0111/XSL0111_unit.bp index b3b05e49dd..484dbde401 100644 --- a/units/XSL0111/XSL0111_unit.bp +++ b/units/XSL0111/XSL0111_unit.bp @@ -1,6 +1,6 @@ UnitBlueprint{ Description = "Mobile Missile Launcher", - AI = { InitialAutoMode = true }, + AI = { }, Audio = { AmbientMove = Sound { Bank = 'XSL', Cue = 'XSL0111_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' }, Destroyed = Sound { Bank = 'XSL_Destroy', Cue = 'XSL_Destroy_Land_Med', LodCutoff = 'UnitMove_LodCutoff' },