Merge pull request #4494 from VOREStation/vplk-small-fixes

Fix runtimes in MouseDrop when dragging out of the screen
This commit is contained in:
Anewbe
2018-01-02 20:03:47 -05:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -40,7 +40,7 @@
return ..()
/obj/item/clothing/MouseDrop(var/obj/over_object)
if (ishuman(usr) || issmall(usr))
if (over_object && (ishuman(usr) || issmall(usr)))
//makes sure that the clothing is equipped so that we can't drag it into our hand from miles away.
if (!(src.loc == usr))
return

View File

@@ -12,6 +12,8 @@
/obj/item/weapon/evidencebag/MouseDrop(var/obj/item/I as obj)
if (!ishuman(usr))
return
if(!istype(I) || I.anchored)
return ..()
var/mob/living/carbon/human/user = usr
@@ -36,9 +38,6 @@
else
return
if(!istype(I) || I.anchored)
return
if(istype(I, /obj/item/weapon/evidencebag))
user << "<span class='notice'>You find putting an evidence bag in another evidence bag to be slightly absurd.</span>"
return