Self replacement fix (#30834)

This commit is contained in:
Jordan Brown
2017-09-28 12:07:23 -04:00
committed by CitadelStationBot
parent 2d48a0cf50
commit a3c7a3fe11
+9 -2
View File
@@ -38,10 +38,14 @@
/obj/item/toy/eightball/Initialize(mapload)
. = ..()
if(prob(1))
new /obj/item/toy/eightball/haunted(get_turf(src))
if(MakeHaunted())
return INITIALIZE_HINT_QDEL
/obj/item/toy/eightball/proc/MakeHaunted()
. = prob(1)
if(.)
new /obj/item/toy/eightball/haunted(loc)
/obj/item/toy/eightball/attack_self(mob/user)
if(shaking)
return
@@ -105,6 +109,9 @@
GLOB.poi_list -= src
. = ..()
/obj/item/toy/eightball/haunted/MakeHaunted()
return FALSE
/obj/item/toy/eightball/haunted/attack_ghost(mob/user)
if(!shaking)
to_chat(user, "<span class='warning'>[src] is not currently being shaken.</span>")