From 509062db01a4a9d8e7cfccdf19afe7cd973d7e10 Mon Sep 17 00:00:00 2001 From: Pierre-Louis <44984704+PIerreLouisH@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:32:22 +0200 Subject: [PATCH] Service borg tray no longer drap inventory version of items (stack count number) (#24521) * Service borg trays no longer drop stack count items Service borg trays no longer drop stack count items. Therefore Fixes #23825 * fixing some indents * Replace qdel with remove_from_storage Deleting an item and replacing it with the same type is a terrible solution for this * Update code/game/objects/items/weapons/storage/bags.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/bags.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/bags.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Fixing positions of items in the service tray --------- Co-authored-by: Pierre-Louis Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --- code/game/objects/items/weapons/storage/bags.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 75d04fa1805..96a360c191f 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -479,8 +479,9 @@ var/dropped_something = FALSE for(var/obj/item/I in contents) - I.loc = dropspot - contents.Remove(I) + remove_from_storage(I) + // Set the properties of the new item here, e.g., stack count, hover highlight, tooltip + I.forceMove(target.loc) dropped_something = TRUE if(!found_table && isturf(dropspot)) // if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!