From fa09c540a219735772b13c584ecd05621e37a561 Mon Sep 17 00:00:00 2001 From: UpAndLeaves <92269094+Alpha-Two@users.noreply.github.com> Date: Sat, 12 Apr 2025 21:43:31 +0100 Subject: [PATCH] Dehardcode zombie damage values (#36494) * Quick, send it! * no spaces, no fun * Noooo I have to adhere to good code standards --- Content.Server/Zombies/ZombieSystem.Transform.cs | 12 +----------- Content.Shared/Zombies/ZombieComponent.cs | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Content.Server/Zombies/ZombieSystem.Transform.cs b/Content.Server/Zombies/ZombieSystem.Transform.cs index 48954db4f1..a7a22c4175 100644 --- a/Content.Server/Zombies/ZombieSystem.Transform.cs +++ b/Content.Server/Zombies/ZombieSystem.Transform.cs @@ -178,17 +178,7 @@ public sealed partial class ZombieSystem _humanoidAppearance.SetBaseLayerId(target, HumanoidVisualLayers.Snout, zombiecomp.BaseLayerExternal, humanoid: huApComp); //This is done here because non-humanoids shouldn't get baller damage - //lord forgive me for the hardcoded damage - DamageSpecifier dspec = new() - { - DamageDict = new() - { - { "Slash", 13 }, - { "Piercing", 7 }, - { "Structural", 10 } - } - }; - melee.Damage = dspec; + melee.Damage = zombiecomp.DamageOnBite; // humanoid zombies get to pry open doors and shit var pryComp = EnsureComp(target); diff --git a/Content.Shared/Zombies/ZombieComponent.cs b/Content.Shared/Zombies/ZombieComponent.cs index 94e1e5afec..f9576dd3aa 100644 --- a/Content.Shared/Zombies/ZombieComponent.cs +++ b/Content.Shared/Zombies/ZombieComponent.cs @@ -127,6 +127,20 @@ public sealed partial class ZombieComponent : Component } }; + /// + /// The damage dealt on bite, dehardcoded for your enjoyment + /// + [DataField] + public DamageSpecifier DamageOnBite = new() + { + DamageDict = new() + { + { "Slash", 13 }, + { "Piercing", 7 }, + { "Structural", 10 } + } + }; + /// /// Path to antagonist alert sound. /// -- 2.51.2