mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Fixes some dropItemToGround runtimes (#45257)
* Simplified * unfucked * Documentation
This commit is contained in:
@@ -289,12 +289,17 @@
|
||||
|
||||
//The following functions are the same save for one small difference
|
||||
|
||||
//for when you want the item to end up on the ground
|
||||
//will force move the item to the ground and call the turf's Entered
|
||||
/**
|
||||
* Used to drop an item (if it exists) to the ground.
|
||||
* * Will pass as TRUE is successfully dropped, or if there is no item to drop.
|
||||
* * Will pass FALSE if the item can not be dropped due to TRAIT_NODROP via doUnEquip()
|
||||
* If the item can be dropped, it will be forceMove()'d to the ground and the turf's Entered() will be called.
|
||||
*/
|
||||
/mob/proc/dropItemToGround(obj/item/I, force = FALSE)
|
||||
I.pixel_x = rand(-6,6)
|
||||
I.pixel_y = rand(-6,6)
|
||||
return doUnEquip(I, force, drop_location(), FALSE)
|
||||
. = doUnEquip(I, force, drop_location(), FALSE)
|
||||
if(. && I) //ensure the item exists and that it was dropped properly.
|
||||
I.pixel_x = rand(-6,6)
|
||||
I.pixel_y = rand(-6,6)
|
||||
|
||||
//for when the item will be immediately placed in a loc other than the ground
|
||||
/mob/proc/transferItemToLoc(obj/item/I, newloc = null, force = FALSE)
|
||||
|
||||
Reference in New Issue
Block a user