- add: Runes can't be examined by crew. (#129)
* - add: Runes can't be examined by crew. * - add: No rune pointing.
This commit is contained in:
23
Content.Shared/_White/Cult/Systems/CultRuneSystem.cs
Normal file
23
Content.Shared/_White/Cult/Systems/CultRuneSystem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Ghost;
|
||||
|
||||
namespace Content.Shared._White.Cult.Systems;
|
||||
|
||||
public sealed class CultRuneSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<CultRuneComponent, ExamineAttemptEvent>(OnExamine);
|
||||
}
|
||||
|
||||
private void OnExamine(Entity<CultRuneComponent> ent, ref ExamineAttemptEvent args)
|
||||
{
|
||||
if (HasComp<GhostComponent>(args.Examiner) || HasComp<CultistComponent>(args.Examiner))
|
||||
return;
|
||||
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user