Fixes a bunch of things being able to get to centcom (#23485)

* Fixes a bunch of things being able to get to centcom

* whoops

* smart
This commit is contained in:
Joan Lung
2017-01-31 21:52:51 -05:00
committed by oranges
parent ba75a8001f
commit f2b4cd7dca
2 changed files with 10 additions and 7 deletions
@@ -138,9 +138,7 @@
/obj/item/device/warp_cube/attack_self(mob/user)
if(!linked)
user << "[src] fizzles uselessly."
if(linked.z == CENTCOMM)
user << "[linked] is somewhere you can't go."
return
new /obj/effect/particle_effect/smoke(user.loc)
user.forceMove(get_turf(linked))
feedback_add_details("warp_cube","[src.type]")
@@ -833,7 +831,7 @@
blast_range -= round(health_percent * 10) //one additional range for each missing 10% of health
/obj/item/weapon/hierophant_club/update_icon()
icon_state = "hierophant_club[timer <= world.time ? "_ready":""][beacon ? "":"_beacon"]"
icon_state = "hierophant_club[timer <= world.time ? "_ready":""][(beacon && !qdeleted(beacon)) ? "":"_beacon"]"
item_state = icon_state
if(ismob(loc))
var/mob/M = loc
@@ -855,7 +853,7 @@
if(!user.is_holding(src)) //you need to hold the staff to teleport
user << "<span class='warning'>You need to hold the club in your hands to [beacon ? "teleport with it":"detach the beacon"]!</span>"
return
if(!beacon)
if(!beacon || qdeleted(beacon))
if(isturf(user.loc))
user.visible_message("<span class='hierophant_warning'>[user] starts fiddling with [src]'s pommel...</span>", \
"<span class='notice'>You start detaching the hierophant beacon...</span>")
@@ -908,7 +906,7 @@
new /obj/effect/overlay/temp/hierophant/telegraph(source, user)
playsound(T,'sound/magic/Wand_Teleport.ogg', 200, 1)
playsound(source,'sound/machines/AirlockOpen.ogg', 200, 1)
if(!do_after(user, 3, target = user) || !user || !beacon) //no walking away shitlord
if(!do_after(user, 3, target = user) || !user || !beacon || qdeleted(beacon)) //no walking away shitlord
teleporting = FALSE
if(user)
user.update_action_buttons_icon()