From 0518be5d38c5316f8c4d280fa3964648bb93ca22 Mon Sep 17 00:00:00 2001 From: SyaoranFox <99053675+SyaoranFox@users.noreply.github.com> Date: Sat, 14 Jun 2025 10:56:57 +1000 Subject: [PATCH] Zombies won't attack Initial Infected (#38128) * Added Zombie faction roles everywhere that makes sense for initial infected to be associated with Zombies. * Adding faction component to round start zombie. (not hopeful) * Removed stupid attempts and added zombie faction component to the zombie system when the player is given the ability to force themself to zombify. * Changed use of "zombie" for ProtoId * Update Content.Server/Zombies/ZombieSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Server/Zombies/ZombieSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Removed faction component from ZombieOutbreak event. Shouldn't cause problems with the event as II gets component with their ability to self zombify. --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --- Content.Server/Zombies/ZombieSystem.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs index d263df9ce5..55d226ca5e 100644 --- a/Content.Server/Zombies/ZombieSystem.cs +++ b/Content.Server/Zombies/ZombieSystem.cs @@ -1,9 +1,11 @@ using System.Linq; +using Content.Shared.NPC.Prototypes; using Content.Server.Actions; using Content.Server.Body.Systems; using Content.Server.Chat; using Content.Server.Chat.Systems; using Content.Server.Emoting.Systems; +using Content.Server.GameTicking.Rules.Components; using Content.Server.Speech.EntitySystems; using Content.Server.Roles; using Content.Shared.Anomaly.Components; @@ -43,6 +45,8 @@ namespace Content.Server.Zombies [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly SharedRoleSystem _role = default!; + public readonly ProtoId Faction = "Zombie"; + public const SlotFlags ProtectiveSlots = SlotFlags.FEET | SlotFlags.HEAD | @@ -88,6 +92,7 @@ namespace Content.Server.Zombies private void OnPendingMapInit(EntityUid uid, IncurableZombieComponent component, MapInitEvent args) { _actions.AddAction(uid, ref component.Action, component.ZombifySelfActionPrototype); + _faction.AddFaction(uid, Faction); if (HasComp(uid) || HasComp(uid)) return; -- 2.51.2