Fixes that pesky dumping issue (#46025)

This commit is contained in:
nemvar
2019-08-21 01:08:36 -07:00
committed by Rob Bailey
parent e3b6671d04
commit 1ec07b1508
+23 -21
View File
@@ -536,28 +536,30 @@
/datum/component/storage/proc/mousedrop_onto(datum/source, atom/over_object, mob/M)
set waitfor = FALSE
. = COMPONENT_NO_MOUSEDROP
if(!ismob(M))
return
if(!over_object)
return
if(ismecha(M.loc)) // stops inventory actions in a mech
return
if(M.incapacitated() || !M.canUseStorage())
return
var/atom/A = parent
if(ismob(M)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
A.add_fingerprint(M)
if(!over_object)
return FALSE
if(ismecha(M.loc)) // stops inventory actions in a mech
return FALSE
// this must come before the screen objects only block, dunno why it wasn't before
if(over_object == M)
user_show_to_mob(M)
if(!M.incapacitated())
if(!istype(over_object, /obj/screen))
dump_content_at(over_object, M)
return
if(A.loc != M)
return
playsound(A, "rustle", 50, 1, -5)
if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(A, H.held_index)
return
A.add_fingerprint(M)
A.add_fingerprint(M)
// this must come before the screen objects only block, dunno why it wasn't before
if(over_object == M)
user_show_to_mob(M)
if(!istype(over_object, /obj/screen))
dump_content_at(over_object, M)
return
if(A.loc != M)
return
playsound(A, "rustle", 50, 1, -5)
if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(A, H.held_index)
return
A.add_fingerprint(M)
/datum/component/storage/proc/user_show_to_mob(mob/M, force = FALSE)
var/atom/A = parent