Prevent picking up chameleon projector disguises via context menu (#42656)

This commit is contained in:
B_Kirill
2026-01-26 23:48:16 +10:00
committed by GitHub
parent a35a48c351
commit a237493841

View File

@@ -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