Files
OldThink/Content.Shared/_White/Cult/Systems/ConcealableSystem.cs
Aviu00 f9224ea2f5 Фиксы в основном (#495)
* - fix: No concealed rune interaction.

* - fix: Wizard rule min players.

* - add: Holosign stuff.

* - add: Don't despawn dragon.

* - tweak: Implants.

* - fix: Hijack.

* - remove: Hardsuit objective.

* - fix: Holosigns.

* - fix: Fix chair rotation.

* - fix: No shooting while delayed.

* - fix: Changeling felinid polymorph.

* - fix: Fix stuck in container in container.

* - fix: Fix flash in containers.

* - fix: Whistle chameleon.

* - fix: Loc.

* - fix: No shooting in body bags.

* - fix: Error.

* - fix: Ling felinid fix attempt 2.
2024-07-25 16:32:56 +03:00

39 lines
1.0 KiB
C#

using Content.Shared._White.Cult.Components;
using Content.Shared.Examine;
using Content.Shared.Interaction.Events;
namespace Content.Shared._White.Cult.Systems;
public sealed class ConcealableSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ConcealableComponent, ExamineAttemptEvent>(OnExamine);
SubscribeLocalEvent<ConcealableComponent, GettingInteractedWithAttemptEvent>(OnInteract);
}
private void OnInteract(Entity<ConcealableComponent> ent, ref GettingInteractedWithAttemptEvent args)
{
if (ent.Comp is {Concealed: true, ExaminableWhileConcealed: false})
args.Cancel();
}
private void OnExamine(Entity<ConcealableComponent> ent, ref ExamineAttemptEvent args)
{
if (ent.Comp is {Concealed: true, ExaminableWhileConcealed: false})
args.Cancel();
}
}
public sealed class ConcealEvent : EntityEventArgs
{
public bool Conceal;
public ConcealEvent(bool conceal)
{
Conceal = conceal;
}
}