From c52ebc0485afe6fbd213db19e69c04eadcb101ee Mon Sep 17 00:00:00 2001 From: Casper3667 <8396443+Casper3667@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:14:36 +0200 Subject: [PATCH] Make custom items spawn in hands before being dropped on the floor (#21417) A small safety net. Currently when people latejoin, a custom item such as a journal risk being dropped into the lift or cryo, where it can't be retrived from without admin help, if their bags are filled from the loadout. This fixes that issue by putting it into peoples hands first if possible. Also it makes the alert for when it is dropped on the ground be nice and red, as otherwise it was way too easy to miss between all the other messages from spawning in. --- code/modules/customitems/item_spawning.dm | 5 ++++- html/changelogs/CustomItemFix.yml | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/CustomItemFix.yml diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index 25c6061cd18..500d121da56 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -341,6 +341,9 @@ GLOBAL_LIST_EMPTY(character_id_to_custom_items_mapping) if(target_mob.equip_to_storage(newitem)) return TRUE + if(target_mob.put_in_any_hand_if_possible(newitem)) + return TRUE + newitem.forceMove(get_turf(target_mob.loc)) - to_chat(target_mob, "A custom item has been placed on the floor as there was no space for it on your mob.") + to_chat(target_mob, SPAN_ALERT("A custom item has been placed on the floor as there was no space for it on your mob.")) return TRUE diff --git a/html/changelogs/CustomItemFix.yml b/html/changelogs/CustomItemFix.yml new file mode 100644 index 00000000000..06926bc3d5e --- /dev/null +++ b/html/changelogs/CustomItemFix.yml @@ -0,0 +1,7 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - bugfix: "Custom items will now attempt to spawn in a character's hands, before dropping to the floor. This should prevent items being lost to the lifts or cryo." + - rscadd: "The alert for a custom item being dropped on the ground is now red, to make it easier to spot."