Skip to content

Commit

Permalink
Fix missed atmos computer Topic override
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze committed Feb 1, 2025
1 parent b3e610e commit 9ce3e7b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions code/game/machinery/computer/area_atmos.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@
show_browser(user, "[dat]", "window=miningshuttle;size=400x400")
status = ""

/obj/machinery/computer/area_atmos/Topic(href, href_list)
if(..())
/obj/machinery/computer/area_atmos/OnTopic(mob/user, href_list)
if((. = ..()))
return
usr.set_machine(src)


if(href_list["scan"])
scanscrubbers()
return TOPIC_REFRESH
else if(href_list["toggle"])
var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber = locate(href_list["scrub"])

if(!validscrubber(scrubber))
spawn(20)
spawn(2 SECONDS)
status = "ERROR: Couldn't connect to scrubber! (timeout)"
connectedscrubbers -= scrubber
src.updateUsrDialog()
return
updateUsrDialog()
return TOPIC_REFRESH

scrubber.update_use_power(text2num(href_list["toggle"]) ? POWER_USE_ACTIVE : POWER_USE_IDLE)
return TOPIC_REFRESH

/obj/machinery/computer/area_atmos/proc/validscrubber(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber)
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
Expand Down

0 comments on commit 9ce3e7b

Please sign in to comment.