From 20a055b90e085d9fbba14109ddfcce9cdf4dd952 Mon Sep 17 00:00:00 2001 From: coiax Date: Sun, 29 May 2016 23:54:38 +0100 Subject: [PATCH] Wisps can now be recalled with the lantern (#17999) :cl: coiax fix: Fixes bug where the wisp was unable to be recalled to the lantern. /:cl: The way that the code is structured suggests that wisp recall works in two parts, stripping the person who's being orbited of their thermal vision, and then putting the wisp back in. While I was there, I cleaned up some variables. --- .../mining/lavaland/necropolis_chests.dm | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 97a8d178266..2d9bf7cb5ce 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -79,41 +79,44 @@ /obj/item/device/wisp_lantern/attack_self(mob/user) if(!wisp) - user << "The wisp has gone missing!" + user << "The wisp has gone missing!" return if(wisp.loc == src) - user << "You release the wisp. It begins to bob around your head." + user << "You release the wisp. It begins to \ + bob around your head." user.sight |= SEE_MOBS icon_state = "lantern" wisp.orbit(user, 20) feedback_add_details("wisp_lantern","F") // freed else + user << "You return the wisp to the lantern.\ + " + if(wisp.orbiting) var/atom/A = wisp.orbiting if(istype(A, /mob/living)) var/mob/living/M = A M.sight &= ~SEE_MOBS - M << "The wisp has returned to it's latern. Your vision returns to normal." + M << "Your vision returns to \ + normal." - wisp.stop_orbit() - wisp.loc = src - user << "You return the wisp to the latern." - icon_state = "lantern-blue" - feedback_add_details("wisp_lantern","R") // returned + wisp.stop_orbit() + wisp.loc = src + icon_state = "lantern-blue" + feedback_add_details("wisp_lantern","R") // returned /obj/item/device/wisp_lantern/New() ..() - var/obj/effect/wisp/W = new(src) - wisp = W - W.home = src + wisp = new(src) /obj/item/device/wisp_lantern/Destroy() if(wisp) if(wisp.loc == src) qdel(wisp) else - wisp.home = null //stuck orbiting your head now + wisp.visible_message("[wisp] has a sad \ + feeling for a moment, then it passes.") ..() //Wisp Lantern @@ -122,7 +125,6 @@ desc = "Happy to light your way." icon = 'icons/obj/lighting.dmi' icon_state = "orb" - var/obj/item/device/wisp_lantern/home luminosity = 7 layer = ABOVE_ALL_MOB_LAYER