mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 21:10:30 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user