mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +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
|
||||
|
||||
@@ -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."
|
||||
Reference in New Issue
Block a user