Skip to content

Commit

Permalink
okay
Browse files Browse the repository at this point in the history
  • Loading branch information
babaevlsdd committed Nov 17, 2024
1 parent fb79ffa commit 795dcce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions Content.Server/Antag/AntagSelectionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<BibleUserComponent>(entity.Value))
return false;
// Sunrise-Vampire-End

if (HasComp<PendingClockInComponent>(entity))
return false;

Expand Down
6 changes: 5 additions & 1 deletion Content.Server/GameTicking/Rules/VampireRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -48,14 +49,17 @@ public override void Initialize()
base.Initialize();

SubscribeLocalEvent<VampireRuleComponent, GetBriefingEvent>(OnGetBriefing);

SubscribeLocalEvent<VampireRuleComponent, AfterAntagEntitySelectedEvent>(OnSelectAntag);
SubscribeLocalEvent<VampireRuleComponent, ObjectivesTextPrependEvent>(OnTextPrepend);
}

private void OnSelectAntag(EntityUid mindId, VampireRuleComponent comp, ref AfterAntagEntitySelectedEvent args)
{
var ent = args.EntityUid;

if (HasComp<BibleUserComponent>(ent))
return;

_antag.SendBriefing(ent, MakeBriefing(ent), Color.Yellow, BriefingSound);
MakeVampire(ent, comp);
}
Expand Down

0 comments on commit 795dcce

Please sign in to comment.