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<NpcFactionPrototype> * 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>
This commit is contained in:
@@ -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<NpcFactionPrototype> 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<ZombieComponent>(uid) || HasComp<ZombieImmuneComponent>(uid))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user