Device working volumes are configurable from setup

This commit is contained in:
mwerezak
2014-08-03 20:12:39 -04:00
parent 5d0ce492b7
commit 6eb2fe3028
10 changed files with 45 additions and 19 deletions

View File

@@ -45,6 +45,8 @@
/obj/machinery/atmospherics/binary/dp_vent_pump/New()
..()
air1.volume = ATMOS_DEFAULT_VOLUME_PUMP
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP
icon = null
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume
@@ -52,8 +54,8 @@
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume/New()
..()
air1.volume = 1000
air2.volume = 1000
air1.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0)
if(!check_icon_cache())

View File

@@ -36,6 +36,11 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/binary/pump/New()
..()
air1.volume = ATMOS_DEFAULT_VOLUME_PUMP
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP
/obj/machinery/atmospherics/binary/pump/on
icon_state = "map_on"
on = 1

View File

@@ -21,6 +21,8 @@
/obj/machinery/atmospherics/omni/filter/New()
..()
rebuild_filtering_list()
for(var/datum/omni_port/P in ports)
P.air.volume = ATMOS_DEFAULT_VOLUME_FILTER
/obj/machinery/atmospherics/omni/filter/Del()
input = null

View File

@@ -46,6 +46,9 @@
P.concentration = tag_west_con
con += max(0, tag_west_con)
for(var/datum/omni_port/P in ports)
P.air.volume = ATMOS_DEFAULT_VOLUME_MIXER
rebuild_mixing_inputs()
/obj/machinery/atmospherics/omni/mixer/Del()
@@ -61,7 +64,6 @@
if(inputs.Find(P))
inputs -= P
P.air.volume = 200
switch(P.mode)
if(ATM_INPUT)
inputs += P
@@ -73,7 +75,7 @@
P.concentration = 1 / max(1, inputs.len)
if(output)
output.air.volume = 200 * 0.75 * inputs.len
output.air.volume = ATMOS_DEFAULT_VOLUME_MIXER * 0.75 * inputs.len
output.concentration = 1
/obj/machinery/atmospherics/omni/mixer/proc/mapper_set()

View File

@@ -12,8 +12,7 @@
var/temp = null // -- TLE
var/max_flow_rate = 200 //L/s
var/set_flow_rate = 200
var/set_flow_rate = ATMOS_DEFAULT_VOLUME_FILTER
/*
Filter types:
@@ -39,6 +38,10 @@
/obj/machinery/atmospherics/trinary/filter/New()
..()
air1.volume = ATMOS_DEFAULT_VOLUME_FILTER
air2.volume = ATMOS_DEFAULT_VOLUME_FILTER
air3.volume = ATMOS_DEFAULT_VOLUME_FILTER
if(radio_controller)
initialize()
@@ -217,8 +220,8 @@
if (href_list["temp"])
src.temp = null
if(href_list["set_flow_rate"])
var/new_pressure = input(usr,"Enter new flow rate (0-[max_flow_rate]L/s)","Flow Rate Control",src.set_flow_rate) as num
src.set_flow_rate = max(0, min(max_flow_rate, new_pressure))
var/new_flow_rate = input(usr,"Enter new flow rate (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate) as num
src.set_flow_rate = max(0, min(air1.volume, new_flow_rate))
if(href_list["power"])
on=!on
src.update_icon()

View File

@@ -10,8 +10,7 @@
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 3700 //This also doubles as a measure of how powerful the mixer is, in Watts. 3700 W ~ 5 HP
var/max_flow_rate = 200 //L/s
var/set_flow_rate = 200
var/set_flow_rate = ATMOS_DEFAULT_VOLUME_MIXER
var/list/mixing_inputs
//for mapping
@@ -66,7 +65,9 @@
/obj/machinery/atmospherics/trinary/mixer/New()
..()
air3.volume = 300
air1.volume = ATMOS_DEFAULT_VOLUME_MIXER
air2.volume = ATMOS_DEFAULT_VOLUME_MIXER
air3.volume = ATMOS_DEFAULT_VOLUME_MIXER * 1.5
/obj/machinery/atmospherics/trinary/mixer/process()
..()
@@ -162,6 +163,7 @@
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/max_flow_rate = min(air1.volume, air2.volume)
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",src.set_flow_rate) as num
src.set_flow_rate = max(0, min(max_flow_rate, new_flow_rate))
if(href_list["node1_c"])

View File

@@ -62,6 +62,9 @@
icon_state = "map_vent_in"
/obj/machinery/atmospherics/unary/vent_pump/New()
..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP
icon = null
initial_loc = get_area(loc)
if (initial_loc.master)
@@ -73,7 +76,6 @@
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
..()
/obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "Large Air Vent"
@@ -81,7 +83,7 @@
/obj/machinery/atmospherics/unary/vent_pump/high_volume/New()
..()
air_contents.volume = 1000
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800
/obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0)
if(!check_icon_cache())

View File

@@ -26,6 +26,9 @@
var/radio_filter_in
/obj/machinery/atmospherics/unary/vent_scrubber/New()
..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_FILTER
icon = null
initial_loc = get_area(loc)
if (initial_loc.master)
@@ -37,7 +40,6 @@
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
..()
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
if(!check_icon_cache())

View File

@@ -138,7 +138,7 @@
name = "pipe"
desc = "A one meter section of regular pipe"
volume = 70
volume = ATMOS_DEFAULT_VOLUME_PIPE
dir = SOUTH
initialize_directions = SOUTH|NORTH
@@ -373,7 +373,7 @@
name = "pipe manifold"
desc = "A manifold composed of regular pipes"
volume = 105
volume = ATMOS_DEFAULT_VOLUME_PIPE * 1.5
dir = SOUTH
initialize_directions = EAST|NORTH|WEST
@@ -583,7 +583,7 @@
name = "4-way pipe manifold"
desc = "A manifold composed of regular pipes"
volume = 140
volume = ATMOS_DEFAULT_VOLUME_PIPE * 2
dir = SOUTH
initialize_directions = NORTH|SOUTH|EAST|WEST

View File

@@ -836,10 +836,16 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
#define MAX_FILTER_FLOWRATE 200 //L/s
//These balance how easy or hard it is to create huge pressure gradients with pumps and filters. Lower values means it takes longer to create large pressures differences.
//If you want to limit the ability of players to create very high pressures then it makes more sense to adjust these instead of artificially limiting the pump settings.
//Has no effect on pumping gasses from high pressure to low, only from low to high. Must be between 0 and 1.
#define ATMOS_PUMP_EFFICIENCY 0.6
#define ATMOS_FILTER_EFFICIENCY 0.45
#define MINUMUM_MOLES_TO_PUMP 0.01 //will not bother pumping or filtering if the gas source as fewer than this amount of moles, to help with performance.
//will not bother pumping or filtering if the gas source as fewer than this amount of moles, to help with performance.
#define MINUMUM_MOLES_TO_PUMP 0.01
#define MINUMUM_MOLES_TO_FILTER 0.1
//The flow rate/effectiveness of various atmos devices is limited by their internal volume, so these will control maximum flow rates in L/s
#define ATMOS_DEFAULT_VOLUME_PUMP 200 //L
#define ATMOS_DEFAULT_VOLUME_FILTER 200 //L
#define ATMOS_DEFAULT_VOLUME_MIXER 200 //L
#define ATMOS_DEFAULT_VOLUME_PIPE 70 //L