Fix duplicate results from analyzing some objects (#7660)

This commit is contained in:
Meghan-Rossi
2020-09-20 12:17:40 +01:00
committed by VirgoBot
parent e700936b20
commit cbfd4789d7
6 changed files with 8 additions and 18 deletions

View File

@@ -70,10 +70,6 @@
if(istype(W, /obj/item/device/pipe_painter)) if(istype(W, /obj/item/device/pipe_painter))
return return
if(istype(W, /obj/item/device/analyzer) && in_range(user, src))
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
/obj/machinery/atmospherics/pipe/tank/air /obj/machinery/atmospherics/pipe/tank/air
name = "Pressure Tank (Air)" name = "Pressure Tank (Air)"
icon_state = "air_map" icon_state = "air_map"

View File

@@ -136,12 +136,6 @@
else else
to_chat(user, "<span class='notice'>Nothing happens.</span>") to_chat(user, "<span class='notice'>Nothing happens.</span>")
return return
else if ((istype(W, /obj/item/device/analyzer)) && Adjacent(user))
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
return
return return

View File

@@ -110,10 +110,6 @@
update_icon() update_icon()
return return
if(istype(W, /obj/item/device/analyzer))
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
return
..() ..()
return return

View File

@@ -120,9 +120,6 @@ var/list/global/tank_gauge_cache = list()
if (istype(src.loc, /obj/item/assembly)) if (istype(src.loc, /obj/item/assembly))
icon = src.loc icon = src.loc
if ((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
else if (istype(W,/obj/item/latexballon)) else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W var/obj/item/latexballon/LB = W
LB.blow(src) LB.blow(src)

View File

@@ -43,9 +43,12 @@
for(var/obj/item/I in contents) for(var/obj/item/I in contents)
. += "<span class='notice'>\the [I]</span>" . += "<span class='notice'>\the [I]</span>"
/obj/machinery/particle_smasher/atmosanalyze(var/mob/user)
return list("<span class='notice'>\The [src] reads an energy level of [energy].</span>")
/obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob) /obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob)
if(W.type == /obj/item/device/analyzer) if(W.type == /obj/item/device/analyzer)
to_chat(user, "<span class='notice'>\The [src] reads an energy level of [energy].</span>") return
else if(istype(W, /obj/item/stack/material)) else if(istype(W, /obj/item/stack/material))
var/obj/item/stack/material/M = W var/obj/item/stack/material/M = W
if(M.uses_charge) if(M.uses_charge)

View File

@@ -0,0 +1,4 @@
author: Meghan-Rossi
delete-after: True
changes:
- bugfix: "Fixed some objects giving duplicate results when an analyzer was used on them"