Zombification resistance rework (#36485)

* initial commit

* Commit cuz beck said so 👍

* Implement balance changes, and revert some stuff

* fix yaml test real

* Added full stop, ensured display of infection chance, buffed biosuit speed

* Maint reviews, I commit

* Review completed, winter coats nerfed, CMO bio suit removed for future PR

* Final-final commit-REAL (2)-COPY
This commit is contained in:
UpAndLeaves
2025-04-16 19:21:45 +01:00
committed by GitHub
parent c183231834
commit 1c7e6592e9
12 changed files with 153 additions and 34 deletions

View File

@@ -1,4 +1,6 @@
using Content.Shared.Movement.Systems;
using Content.Shared.Armor;
using Content.Shared.Inventory;
using Content.Shared.Movement.Systems;
using Content.Shared.NameModifier.EntitySystems;
namespace Content.Shared.Zombies;
@@ -12,6 +14,24 @@ public abstract class SharedZombieSystem : EntitySystem
SubscribeLocalEvent<ZombieComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshSpeed);
SubscribeLocalEvent<ZombieComponent, RefreshNameModifiersEvent>(OnRefreshNameModifiers);
SubscribeLocalEvent<ZombificationResistanceComponent, ArmorExamineEvent>(OnArmorExamine);
SubscribeLocalEvent<ZombificationResistanceComponent, InventoryRelayedEvent<ZombificationResistanceQueryEvent>>(OnResistanceQuery);
}
private void OnResistanceQuery(Entity<ZombificationResistanceComponent> ent, ref InventoryRelayedEvent<ZombificationResistanceQueryEvent> query)
{
query.Args.TotalCoefficient *= ent.Comp.ZombificationResistanceCoefficient;
}
private void OnArmorExamine(Entity<ZombificationResistanceComponent> ent, ref ArmorExamineEvent args)
{
var value = MathF.Round((1f - ent.Comp.ZombificationResistanceCoefficient) * 100, 1);
if (value == 0)
return;
args.Msg.PushNewline();
args.Msg.AddMarkupOrThrow(Loc.GetString(ent.Comp.Examine, ("value", value)));
}
private void OnRefreshSpeed(EntityUid uid, ZombieComponent component, RefreshMovementSpeedModifiersEvent args)