- 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:
Aviu00
2024-02-27 21:00:02 +09:00
committed by GitHub
parent 292743ae3e
commit e856e3de2f
4 changed files with 49 additions and 1 deletions

View 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();
}
}