using Sandbox.Gravity; using Sasalka; namespace Sandbox.UI; [Icon( "skip_next" )] public sealed class PickupItem : InteractionButton { [Property] public override string Label { get; set; } = "E"; public override bool Press( IPressable.Event e ) { base.Press( e ); if ( e.Source.Components.TryGet( out var dedugan ) ) { dedugan.Inventory.AddItem( Components.Get() ); RpcDestroy(); } return true; } [Rpc.Broadcast] void RpcDestroy() { GameObject.Destroy(); } }