Skip to content

Commit

Permalink
Annotate shield assist mechanics and max jammer blips (#6109)
Browse files Browse the repository at this point in the history
  • Loading branch information
lL1l1 authored Apr 24, 2024
1 parent 89e6eb6 commit f404996
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions changelog/3810.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@

- (#6042) Improve annotations for `OnMotionHorzEventChange` and `OnMotionVertEventChange`

- (#6109) Annotate the shield assist mechanics of `RegenAssistMult`

- (#6086) Ensure that the Cooper's hitbox aligns with its model

- (#6091) Count cargo for veterancy when a transport or carrier is killed
Expand Down
10 changes: 7 additions & 3 deletions engine/Core/Blueprints/UnitBlueprint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@
--- stunning).
--- Should not be defined with `AntiArtilleryShield`, `PersonalBubble`, or `TransportShield`.
---@field PersonalShield? boolean
--- an efficacy multiplier applied to units assisting the shield to regenerate its health
--- How much buildpower is required to provide 1x of the shield's regen rate.
--- The cost of assisting a shield is `repairCostRate / RegenAssistMult`,
--- where repairCostRate is determined by Unit:UpdateConsumptionValues
---@field RegenAssistMult? number
--- The amount of time the shield takes to come back online when its disabled due to insufficient
--- energy. Defaults to `10` in the shield spec.
Expand Down Expand Up @@ -857,7 +859,9 @@
---@field OwnerShieldMesh string
--- Personal shiled toggle
---@field PersonalShield boolean
--- an efficacy multiplier applied to units assisting the shield to regenerate its health
--- How much buildpower is required to provide 1x of the shield's regen rate.
--- The cost of assisting a shield is `repairCostRate / RegenAssistMult`,
--- where repairCostRate is determined by Unit:UpdateConsumptionValues
---@field RegenAssistMult number
--- The amount of time the shield takes to come back online when its disabled due to insufficient energy. Defaults to 10 in the shield spec.
---@field ShieldEnergyDrainRechargeTime number
Expand Down Expand Up @@ -1002,7 +1006,7 @@
---@field IntelDurationOnDeath? number
--- how far we create fake blips
---@field JamRadius { Max: number, Min: number }
--- how many blips does a jammer produce
--- How many blips a jammer produces. Maximum 255
---@field JammerBlips number
--- used by the Soothsayer
---@field MaxVisionRadius? number
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent) {
mass = (mass / siloBuildRate) * (self:GetBuildRate() or 0)
else
time, energy, mass = self:GetBuildCosts(focus:GetBlueprint())
if self:IsUnitState('Repairing') and focus.isFinishedUnit then
if self:IsUnitState('Repairing') and focus.isFinishedUnit then -- also applies to shield assisting
energy = energy * repairRatio
mass = mass * repairRatio
end
Expand Down

0 comments on commit f404996

Please sign in to comment.