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.
This commit is contained in:
Casper3667
2025-10-01 18:14:36 +02:00
committed by GitHub
parent 9ada39424f
commit c52ebc0485
2 changed files with 11 additions and 1 deletions
+4 -1
View File
@@ -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