it compiles, UNTESTED YET
This commit is contained in:
@@ -298,20 +298,21 @@
|
||||
return doUnEquip(I, force, drop_location(), FALSE)
|
||||
|
||||
//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)
|
||||
return doUnEquip(I, force, newloc, FALSE)
|
||||
/mob/proc/transferItemToLoc(obj/item/I, newloc = null, force = FALSE, silent = TRUE)
|
||||
return doUnEquip(I, force, newloc, FALSE, silent = silent)
|
||||
|
||||
//visibly unequips I but it is NOT MOVED AND REMAINS IN SRC
|
||||
//item MUST BE FORCEMOVE'D OR QDEL'D
|
||||
/mob/proc/temporarilyRemoveItemFromInventory(obj/item/I, force = FALSE, idrop = TRUE)
|
||||
return doUnEquip(I, force, null, TRUE, idrop)
|
||||
return doUnEquip(I, force, null, TRUE, idrop, silent = TRUE)
|
||||
|
||||
//DO NOT CALL THIS PROC
|
||||
//use one of the above 3 helper procs
|
||||
//you may override it, but do not modify the args
|
||||
/mob/proc/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) //Force overrides TRAIT_NODROP for things like wizarditis and admin undress.
|
||||
/mob/proc/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) //Force overrides TRAIT_NODROP for things like wizarditis and admin undress.
|
||||
//Use no_move if the item is just gonna be immediately moved afterward
|
||||
//Invdrop is used to prevent stuff in pockets dropping. only set to false if it's going to immediately be replaced
|
||||
PROTECTED_PROC(TRUE)
|
||||
if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for TRAIT_NODROP.
|
||||
return TRUE
|
||||
|
||||
@@ -333,9 +334,7 @@
|
||||
I.moveToNullspace()
|
||||
else
|
||||
I.forceMove(newloc)
|
||||
on_item_dropped(I)
|
||||
if(I.dropped(src) == ITEM_RELOCATED_BY_DROPPED)
|
||||
return FALSE
|
||||
I.dropped(src, silent)
|
||||
return TRUE
|
||||
|
||||
//This is a SAFE proc. Use this instead of equip_to_slot()!
|
||||
|
||||
Reference in New Issue
Block a user