Merge pull request #2978 from Citadel-Station-13/upstream-merge-30834

[MIRROR] Self replacement fix
This commit is contained in:
LetterJay
2017-09-29 01:42:17 -04:00
committed by GitHub

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>")