@@ -35,7 +35,9 @@ using Content.Shared.Prying.Components;
|
||||
using Content.Shared.Traits.Assorted;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Content.Shared.Ghost.Roles.Components;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Zombies;
|
||||
@@ -61,6 +63,8 @@ public sealed partial class ZombieSystem
|
||||
[Dependency] private readonly NPCSystem _npc = default!;
|
||||
[Dependency] private readonly TagSystem _tag = default!;
|
||||
[Dependency] private readonly NameModifierSystem _nameMod = default!;
|
||||
[Dependency] private readonly SharedRoleSystem _roles = default!;
|
||||
[Dependency] private readonly ISharedPlayerManager _player = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> InvalidForGlobalSpawnSpellTag = "InvalidForGlobalSpawnSpell";
|
||||
private static readonly ProtoId<TagPrototype> CannotSuicideTag = "CannotSuicide";
|
||||
@@ -234,8 +238,8 @@ public sealed partial class ZombieSystem
|
||||
_npc.SleepNPC(target, htn);
|
||||
|
||||
//He's gotta have a mind
|
||||
var hasMind = _mind.TryGetMind(target, out var mindId, out _);
|
||||
if (hasMind && _mind.TryGetSession(mindId, out var session))
|
||||
var hasMind = _mind.TryGetMind(target, out var mindId, out var mind);
|
||||
if (hasMind && mind != null && _player.TryGetSessionById(mind.UserId, out var session))
|
||||
{
|
||||
//Zombie role for player manifest
|
||||
_role.MindAddRole(mindId, "MindRoleZombie", mind: null, silent: true);
|
||||
|
||||
Reference in New Issue
Block a user