diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index c3a1388b18..7c7319363d 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -28,9 +28,14 @@ MASS SPECTROMETER START_PROCESSING(SSobj, src) /obj/item/device/t_scanner/proc/flick_sonar(obj/pipe) - var/image/I = image('icons/effects/effects.dmi', pipe, "blip", pipe.layer+1) - I.alpha = 128 - flick_overlay_view(I, pipe, 8) + if(ismob(loc)) + var/mob/M = loc + var/image/I = new(loc = get_turf(pipe)) + var/mutable_appearance/MA = new(pipe) + MA.alpha = 128 + I.appearance = MA + if(M.client) + flick_overlay(I, list(M.client), 8) /obj/item/device/t_scanner/process() if(!on) @@ -46,21 +51,8 @@ MASS SPECTROMETER if(O.level != 1) continue - var/mob/living/L = locate() in O - if(O.invisibility == INVISIBILITY_MAXIMUM) - O.invisibility = 0 - if(L) - flick_sonar(O) - spawn(10) - if(O && O.loc) - var/turf/U = O.loc - if(U.intact) - O.invisibility = INVISIBILITY_MAXIMUM - else - if(L) - flick_sonar(O) - + flick_sonar(O) /obj/item/device/healthanalyzer name = "health analyzer" diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 9c6c960448..6720663fb7 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -8,7 +8,6 @@ origin_tech = "materials=3;magnets=3;engineering=3;plasmatech=3" var/mode = 0 //0 - regular mesons mode 1 - t-ray mode - var/invis_objects = list() var/range = 1 /obj/item/clothing/glasses/meson/engine/attack_self(mob/user) @@ -26,7 +25,6 @@ darkness_view = 1 lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE to_chat(loc, "You toggle the goggles' scanning mode to \[Meson].") - invis_update() if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -43,39 +41,32 @@ return if(!ishuman(loc)) - invis_update() return var/mob/living/carbon/human/user = loc if(user.glasses != src) - invis_update() return scan() /obj/item/clothing/glasses/meson/engine/proc/scan() for(var/turf/T in range(range, loc)) - - if(!T.intact) - continue - for(var/obj/O in T.contents) if(O.level != 1) continue if(O.invisibility == INVISIBILITY_MAXIMUM) - O.invisibility = 0 - invis_objects += O + flick_sonar(O) - addtimer(CALLBACK(src, .proc/invis_update), 5) - -/obj/item/clothing/glasses/meson/engine/proc/invis_update() - for(var/obj/O in invis_objects) - if(!t_ray_on() || !(O in range(range, loc))) - invis_objects -= O - var/turf/T = O.loc - if(T && T.intact) - O.invisibility = INVISIBILITY_MAXIMUM +/obj/item/clothing/glasses/meson/engine/proc/flick_sonar(obj/pipe) + if(ismob(loc)) + var/mob/M = loc + var/image/I = new(loc = get_turf(pipe)) + var/mutable_appearance/MA = new(pipe) + MA.alpha = 128 + I.appearance = MA + if(M.client) + flick_overlay(I, list(M.client), 8) /obj/item/clothing/glasses/meson/engine/proc/t_ray_on() if(!ishuman(loc)) @@ -125,7 +116,6 @@ else STOP_PROCESSING(SSobj, src) to_chat(user, "You turn the goggles off.") - invis_update() update_icon() for(var/X in actions) diff --git a/code/modules/clothing/glasses/engine_goggles.dm.rej b/code/modules/clothing/glasses/engine_goggles.dm.rej new file mode 100644 index 0000000000..4c922a8671 --- /dev/null +++ b/code/modules/clothing/glasses/engine_goggles.dm.rej @@ -0,0 +1,9 @@ +diff a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm (rejected hunks) +@@ -26,7 +25,6 @@ + darkness_view = 1 + invis_view = SEE_INVISIBLE_MINIMUM + to_chat(loc, "You toggle the goggles' scanning mode to \[Meson].") +- invis_update() + + if(ishuman(user)) + var/mob/living/carbon/human/H = user