mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
Prevent picking up chameleon projector disguises via context menu (#42656)
This commit is contained in:
@@ -46,6 +46,7 @@ public abstract class SharedChameleonProjectorSystem : EntitySystem
|
||||
SubscribeLocalEvent<ChameleonDisguiseComponent, DamageChangedEvent>(OnDisguiseDamaged);
|
||||
SubscribeLocalEvent<ChameleonDisguiseComponent, InsertIntoEntityStorageAttemptEvent>(OnDisguiseInsertAttempt);
|
||||
SubscribeLocalEvent<ChameleonDisguiseComponent, ComponentShutdown>(OnDisguiseShutdown);
|
||||
SubscribeLocalEvent<ChameleonDisguiseComponent, BeforeGettingEquippedHandEvent>(OnDisguiseBeforeEquippedHand);
|
||||
|
||||
SubscribeLocalEvent<ChameleonDisguisedComponent, EntGotInsertedIntoContainerMessage>(OnDisguisedInserted);
|
||||
|
||||
@@ -86,6 +87,12 @@ public abstract class SharedChameleonProjectorSystem : EntitySystem
|
||||
_actions.RemoveProvidedActions(ent.Comp.User, ent.Comp.Projector);
|
||||
}
|
||||
|
||||
private void OnDisguiseBeforeEquippedHand(Entity<ChameleonDisguiseComponent> ent, ref BeforeGettingEquippedHandEvent args)
|
||||
{
|
||||
args.Cancelled = true;
|
||||
TryReveal(ent.Comp.User);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Disguised player
|
||||
|
||||
Reference in New Issue
Block a user