From 89392e2424a4d428fbb6996dec6615dfe0c05f41 Mon Sep 17 00:00:00 2001 From: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Date: Wed, 20 Nov 2024 02:00:38 +0100 Subject: [PATCH] Remove drag & drop dropping items from containers (#32706) * Initial commit * Update based on maintainer discussion * Forgot to remove this woops --- .../Systems/Storage/StorageUIController.cs | 6 ------ .../Storage/EntitySystems/SharedStorageSystem.cs | 14 -------------- Content.Shared/Storage/StorageComponent.cs | 14 -------------- 3 files changed, 34 deletions(-) diff --git a/Content.Client/UserInterface/Systems/Storage/StorageUIController.cs b/Content.Client/UserInterface/Systems/Storage/StorageUIController.cs index 97c9d8b795..1e61ad9838 100644 --- a/Content.Client/UserInterface/Systems/Storage/StorageUIController.cs +++ b/Content.Client/UserInterface/Systems/Storage/StorageUIController.cs @@ -307,12 +307,6 @@ public sealed class StorageUIController : UIController, IOnSystemChanged(OnInteractWithItem); SubscribeAllEvent(OnSetItemLocation); SubscribeAllEvent(OnInsertItemIntoLocation); - SubscribeAllEvent(OnRemoveItem); SubscribeAllEvent(OnSaveItemLocation); SubscribeLocalEvent(OnReclaimed); @@ -639,19 +638,6 @@ public abstract class SharedStorageSystem : EntitySystem TrySetItemStorageLocation(item!, storage!, msg.Location); } - private void OnRemoveItem(StorageRemoveItemEvent msg, EntitySessionEventArgs args) - { - if (!ValidateInput(args, msg.StorageEnt, msg.ItemEnt, out var player, out var storage, out var item)) - return; - - _adminLog.Add( - LogType.Storage, - LogImpact.Low, - $"{ToPrettyString(player):player} is removing {ToPrettyString(item):item} from {ToPrettyString(storage):storage}"); - TransformSystem.DropNextTo(item.Owner, player.Owner); - Audio.PlayPredicted(storage.Comp.StorageRemoveSound, storage, player, _audioParams); - } - private void OnInsertItemIntoLocation(StorageInsertItemIntoLocationEvent msg, EntitySessionEventArgs args) { if (!ValidateInput(args, msg.StorageEnt, msg.ItemEnt, out var player, out var storage, out var item, held: true)) diff --git a/Content.Shared/Storage/StorageComponent.cs b/Content.Shared/Storage/StorageComponent.cs index d2c607e57f..5683ae95a7 100644 --- a/Content.Shared/Storage/StorageComponent.cs +++ b/Content.Shared/Storage/StorageComponent.cs @@ -169,20 +169,6 @@ namespace Content.Shared.Storage } } - [Serializable, NetSerializable] - public sealed class StorageRemoveItemEvent : EntityEventArgs - { - public readonly NetEntity ItemEnt; - - public readonly NetEntity StorageEnt; - - public StorageRemoveItemEvent(NetEntity itemEnt, NetEntity storageEnt) - { - ItemEnt = itemEnt; - StorageEnt = storageEnt; - } - } - [Serializable, NetSerializable] public sealed class StorageInsertItemIntoLocationEvent : EntityEventArgs { -- 2.51.2