mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* 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>
27 lines
884 B
C#
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);
|