diff --git a/changelog/snippets/other.6029.md b/changelog/snippets/other.6029.md new file mode 100644 index 0000000000..408535c7f2 --- /dev/null +++ b/changelog/snippets/other.6029.md @@ -0,0 +1 @@ +- (#6029) Display the Loyalist's death EMP weapon in the additional unit details displayed when `Show Armament Detail in Build Menu` is enabled in the settings. diff --git a/units/URL0303/URL0303_Script.lua b/units/URL0303/URL0303_Script.lua index 6097c5d6b7..6000f8884c 100644 --- a/units/URL0303/URL0303_Script.lua +++ b/units/URL0303/URL0303_Script.lua @@ -30,7 +30,16 @@ URL0303 = ClassUnit(CWalkingLandUnit) { CreateLightParticle(self, -1, self.Army, 24, 62, 'flare_lens_add_02', 'ramp_red_10') -- apply a stun manually - local targets = GetTrueEnemyUnitsInSphere(self, self:GetPosition(), 10, categories.MOBILE - (categories.EXPERIMENTAL + categories.COMMAND)) + local radius = 10 + local bpWeapon = self.Blueprint.Weapon + for _, v in bpWeapon do + if v.Label == 'DeathStun' then + radius = v.DamageRadius + break + end + end + + local targets = GetTrueEnemyUnitsInSphere(self, self:GetPosition(), radius, categories.MOBILE - (categories.EXPERIMENTAL + categories.COMMAND)) if targets then for k = 1, table.getn(targets) do local target = targets[k] diff --git a/units/URL0303/URL0303_unit.bp b/units/URL0303/URL0303_unit.bp index 19012fba38..e920bd5a53 100644 --- a/units/URL0303/URL0303_unit.bp +++ b/units/URL0303/URL0303_unit.bp @@ -398,6 +398,16 @@ UnitBlueprint { WeaponUnpacks = false, UseFiringSolutionInsteadOfAimBone = true, }, + { + Damage = 0, + DamageFriendly = false, + DamageRadius = 10, + DamageType = "EMP", + DisplayName = "Death EMP", + DummyWeapon = true, + Label = "DeathStun", + WeaponCategory = "Death", + }, }, Wreckage = { Blueprint = "/props/DefaultWreckage/DefaultWreckage_prop.bp",