From 795dcce69545f1bf10ac840495059f173c738deb Mon Sep 17 00:00:00 2001 From: Babaev Date: Sun, 17 Nov 2024 14:55:23 +0600 Subject: [PATCH] okay --- Content.Server/Antag/AntagSelectionSystem.cs | 6 ------ Content.Server/GameTicking/Rules/VampireRuleSystem.cs | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Content.Server/Antag/AntagSelectionSystem.cs b/Content.Server/Antag/AntagSelectionSystem.cs index 4ba001d4f95..1b60e9b801e 100644 --- a/Content.Server/Antag/AntagSelectionSystem.cs +++ b/Content.Server/Antag/AntagSelectionSystem.cs @@ -12,7 +12,6 @@ using Content.Server.Roles; using Content.Server.Roles.Jobs; using Content.Server.Shuttles.Components; -using Content.Server.Bible.Components; // Sunrise-Vampire using Content.Shared.Antag; using Content.Shared.Clothing; using Content.Shared.GameTicking; @@ -507,11 +506,6 @@ public bool IsEntityValid(EntityUid? entity, AntagSelectionDefinition def) if (entity == null) return true; - // Sunrise-Vampire-Start - if (def.PrefRoles.Any(role => role == "Vampire") && HasComp(entity.Value)) - return false; - // Sunrise-Vampire-End - if (HasComp(entity)) return false; diff --git a/Content.Server/GameTicking/Rules/VampireRuleSystem.cs b/Content.Server/GameTicking/Rules/VampireRuleSystem.cs index 91861c19228..536d6537021 100644 --- a/Content.Server/GameTicking/Rules/VampireRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/VampireRuleSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Objectives; using Content.Server.Roles; using Content.Server.Vampire; +using Content.Server.Bible.Components; using Content.Shared.Alert; using Content.Shared.Vampire.Components; using Content.Shared.NPC.Prototypes; @@ -48,7 +49,6 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnGetBriefing); - SubscribeLocalEvent(OnSelectAntag); SubscribeLocalEvent(OnTextPrepend); } @@ -56,6 +56,10 @@ public override void Initialize() private void OnSelectAntag(EntityUid mindId, VampireRuleComponent comp, ref AfterAntagEntitySelectedEvent args) { var ent = args.EntityUid; + + if (HasComp(ent)) + return; + _antag.SendBriefing(ent, MakeBriefing(ent), Color.Yellow, BriefingSound); MakeVampire(ent, comp); }