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
+9 -2
View File
@@ -38,10 +38,14 @@
/obj/item/toy/eightball/Initialize(mapload) /obj/item/toy/eightball/Initialize(mapload)
. = ..() . = ..()
if(prob(1)) if(MakeHaunted())
new /obj/item/toy/eightball/haunted(get_turf(src))
return INITIALIZE_HINT_QDEL 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) /obj/item/toy/eightball/attack_self(mob/user)
if(shaking) if(shaking)
return return
@@ -105,6 +109,9 @@
GLOB.poi_list -= src GLOB.poi_list -= src
. = ..() . = ..()
/obj/item/toy/eightball/haunted/MakeHaunted()
return FALSE
/obj/item/toy/eightball/haunted/attack_ghost(mob/user) /obj/item/toy/eightball/haunted/attack_ghost(mob/user)
if(!shaking) if(!shaking)
to_chat(user, "<span class='warning'>[src] is not currently being shaken.</span>") to_chat(user, "<span class='warning'>[src] is not currently being shaken.</span>")