Dehardcode zombie damage values (#36494)

* Quick, send it!

* no spaces, no fun

* Noooo I have to adhere to good code standards
This commit is contained in:
UpAndLeaves
2025-04-12 21:43:31 +01:00
committed by GitHub
parent ba6995fa82
commit fa09c540a2
2 changed files with 15 additions and 11 deletions

View File

@@ -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<PryingComponent>(target);

View File

@@ -127,6 +127,20 @@ public sealed partial class ZombieComponent : Component
}
};
/// <summary>
/// The damage dealt on bite, dehardcoded for your enjoyment
/// </summary>
[DataField]
public DamageSpecifier DamageOnBite = new()
{
DamageDict = new()
{
{ "Slash", 13 },
{ "Piercing", 7 },
{ "Structural", 10 }
}
};
/// <summary>
/// Path to antagonist alert sound.
/// </summary>