CatStation/Content.Shared/Item/BindItemOnEquipSystem.cs
AndrewFenriz dd46064672
Unify blink and katana dash teleportation (also removed EnergyKatana system/component) (#45041)
* ActionRestrictions

* katana use ActionGrant/ItemActionGrant

* TeleportAction

* no more DashAbility

* no more TeleportSpell

* no more EnergyKatana

* cleanup

* fix whitelist and popup

* docs

* display recharge cooldown

* refactor: whitespace consistency!111

* Revert "display recharge cooldown"

This reverts commit 3b93b179

* popup for limited charges

* maybe fix

* no more CanUseCharge

* upd

* better?

* refactor: using _SharedPhysicsSystem for TeleportActionSystem collision detection + small refactoring

* refactor: xml-doc

---------

Co-authored-by: Fildrance <fildrance@gmail.com>
2026-08-09 12:27:08 +00:00

27 lines
884 B
C#

using Content.Shared.Inventory.Events;
namespace Content.Shared.Item;
/// <summary>
/// Sends a <see cref="BindItemEvent"/> to the wearer of an item with
/// <see cref="BindItemOnEquipComponent"/>.
/// </summary>
public sealed partial class BindItemOnEquipSystem : EntitySystem
{
[SubscribeLocalEvent]
private void OnEquipped(Entity<BindItemOnEquipComponent> ent, ref GotEquippedEvent args)
{
var ev = new BindItemEvent(ent.Owner);
RaiseLocalEvent(args.EquipTarget, ref ev);
}
}
/// <summary>
/// Raised on a wearer when an equipped item requests to be bound to them.
/// </summary>
/// <remarks>
/// The receiving system defines what binding means. This event only identifies the
/// <see cref="Item"/> and does not enforce ownership or replacement behavior.
/// </remarks>
[ByRefEvent]
public readonly record struct BindItemEvent(EntityUid Item);