Adding scrubber procs to scrubbers and change default filter settings (#11041)

This commit is contained in:
Sierra Brown (SierraKomodo)
2021-01-25 19:49:35 +01:00
committed by GitHub
parent fa1b68fd0d
commit 5fe311801c
2 changed files with 61 additions and 2 deletions
@@ -21,7 +21,7 @@
var/hibernate = 0 //Do we even process?
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
var/list/scrubbing_gas = list(GAS_CO2)
var/list/scrubbing_gas
var/panic = 0 //is this scrubber panicked?
@@ -52,6 +52,24 @@
if (frequency)
set_frequency(frequency)
if (!scrubbing_gas)
reset_scrubbing()
/obj/machinery/atmospherics/unary/vent_scrubber/proc/reset_scrubbing()
if (initial(scrubbing_gas))
scrubbing_gas = initial(scrubbing_gas)
else
scrubbing_gas = list()
for (var/g in gas_data.gases)
if (g != GAS_OXYGEN && g != GAS_NITROGEN)
add_to_scrubbing(g)
/obj/machinery/atmospherics/unary/vent_scrubber/proc/add_to_scrubbing(new_gas)
scrubbing_gas |= new_gas
/obj/machinery/atmospherics/unary/vent_scrubber/proc/remove_from_scrubbing(old_gas)
scrubbing_gas -= old_gas
/obj/machinery/atmospherics/unary/vent_scrubber/atmos_init()
..()
broadcast_status()
@@ -243,7 +261,7 @@
toggle += GAS_N2O
else if(signal.data["toggle_n2o_scrub"])
toggle += GAS_N2O
if(!isnull(signal.data["h2_scrub"]) && text2num(signal.data["h2_scrub"]) != (GAS_HYDROGEN in scrubbing_gas))
toggle += GAS_HYDROGEN
else if(signal.data["toggle_h2_scrub"])
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: SierraKomodo
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "Scrubbers now filter all non-air gasses by default, instead of jsut CO2."