Merge pull request #8241 from Allfd/fastest-linda

Fastest linda
This commit is contained in:
Crazy Lemon
2017-10-22 10:18:52 -07:00
committed by GitHub
53 changed files with 203 additions and 129 deletions
+2 -1
View File
@@ -33,7 +33,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/New()
..()
atmos_machinery += src
if(!icon_manager)
icon_manager = new()
@@ -54,6 +54,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/Destroy()
QDEL_NULL(stored)
atmos_machinery -= src
for(var/mob/living/L in src) //ventcrawling is serious business
L.remove_ventcrawl()
L.forceMove(get_turf(src))
@@ -147,6 +147,6 @@
T.assume_air(to_release)
air_update_turf(1)
/obj/machinery/atmospherics/binary/process()
/obj/machinery/atmospherics/binary/process_atmos()
..()
return parent1 && parent2
@@ -70,7 +70,7 @@
else
last_pressure_delta = 0
/obj/machinery/atmospherics/binary/circulator/process()
/obj/machinery/atmospherics/binary/circulator/process_atmos()
..()
update_icon()
@@ -104,8 +104,9 @@
else
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/dp_vent_pump/process()
if(!..() || !on)
/obj/machinery/atmospherics/binary/dp_vent_pump/process_atmos()
..()
if(!on)
return 0
var/datum/gas_mixture/environment = loc.return_air()
@@ -33,8 +33,9 @@
add_underlay(T, node1, turn(dir, 180))
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/passive_gate/process()
if(!..() || !on)
/obj/machinery/atmospherics/binary/passive_gate/process_atmos()
..()
if(!on)
return 0
var/output_starting_pressure = air2.return_pressure()
@@ -53,8 +53,9 @@ Thus, the two variables affect pump operation are set in New():
add_underlay(T, node1, turn(dir, -180))
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/pump/process()
if(!..() || (stat & (NOPOWER|BROKEN)) || !on)
/obj/machinery/atmospherics/binary/pump/process_atmos()
..()
if((stat & (NOPOWER|BROKEN)) || !on)
return 0
var/output_starting_pressure = air2.return_pressure()
@@ -51,8 +51,9 @@ Thus, the two variables affect pump operation are set in New():
add_underlay(T, node1, turn(dir, -180))
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/volume_pump/process()
if(!..() || (stat & (NOPOWER|BROKEN)) || !on)
/obj/machinery/atmospherics/binary/volume_pump/process_atmos()
..()
if((stat & (NOPOWER|BROKEN)) || !on)
return 0
// Pump mechanism just won't do anything if the pressure is too high/too low
@@ -42,8 +42,9 @@
return 0
/obj/machinery/atmospherics/omni/filter/process()
if(!..() || !on)
/obj/machinery/atmospherics/omni/filter/process_atmos()
..()
if(!on)
return 0
if(!input || !output)
@@ -83,8 +83,9 @@
return 0
/obj/machinery/atmospherics/omni/mixer/process()
if(!..() || !on)
/obj/machinery/atmospherics/omni/mixer/process_atmos()
..()
if(!on)
return 0
var/datum/gas_mixture/output_air = output.air
@@ -128,7 +128,7 @@
/obj/machinery/atmospherics/omni/attack_ghost(mob/user)
ui_interact(user)
/obj/machinery/atmospherics/omni/proc/build_icons()
if(!check_icon_cache())
return
@@ -293,7 +293,7 @@
P.parent = New
/obj/machinery/atmospherics/omni/process()
/obj/machinery/atmospherics/omni/process_atmos()
..()
for(var/datum/omni_port/port in ports)
if(!port.parent)
@@ -68,8 +68,9 @@ Filter types:
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/trinary/filter/process()
if(!..() || !on)
/obj/machinery/atmospherics/trinary/filter/process_atmos()
..()
if(!on)
return 0
var/output_starting_pressure = air3.return_pressure()
@@ -56,8 +56,9 @@
..()
air3.volume = 300
/obj/machinery/atmospherics/trinary/mixer/process()
if(!..() || !on)
/obj/machinery/atmospherics/trinary/mixer/process_atmos()
..()
if(!on)
return 0
var/output_starting_pressure = air3.return_pressure()
@@ -206,6 +206,6 @@
T.assume_air(to_release)
air_update_turf(1)
/obj/machinery/atmospherics/trinary/process()
/obj/machinery/atmospherics/trinary/process_atmos()
..()
return parent1 && parent2 && parent3
@@ -22,10 +22,11 @@
return
/obj/machinery/atmospherics/unary/cold_sink/process()
if(!..() || !on)
/obj/machinery/atmospherics/unary/cold_sink/process_atmos()
..()
if(!on)
return 0
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
var/old_temperature = air_contents.temperature
@@ -32,9 +32,8 @@
..()
/obj/machinery/atmospherics/unary/heat_exchanger/process()
if(!..())
return 0
/obj/machinery/atmospherics/unary/heat_exchanger/process_atmos()
..()
if(!partner)
return 0
@@ -22,8 +22,9 @@
return
/obj/machinery/atmospherics/unary/heat_reservoir/process()
if(!..() || !on)
/obj/machinery/atmospherics/unary/heat_reservoir/process_atmos()
..()
if(!on)
return 0
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
@@ -51,10 +51,9 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/outlet_injector/process()
if(!..())
return 0
/obj/machinery/atmospherics/unary/outlet_injector/process_atmos()
..()
injecting = 0
if(!on || stat & NOPOWER)
@@ -28,8 +28,9 @@
air_contents.volume = 50
/obj/machinery/atmospherics/unary/oxygen_generator/process()
if(!..() || !on)
/obj/machinery/atmospherics/unary/oxygen_generator/process_atmos()
..()
if(!on)
return 0
var/total_moles = air_contents.total_moles()
@@ -17,9 +17,8 @@
..()
air_contents.volume = volume
/obj/machinery/atmospherics/unary/passive_vent/process()
if(!..())
return 0
/obj/machinery/atmospherics/unary/passive_vent/process_atmos()
..()
if(!node)
return 0
@@ -28,8 +28,9 @@
return
add_underlay(T, node, dir)
/obj/machinery/atmospherics/unary/portables_connector/process()
if(!..() || !connected_device)
/obj/machinery/atmospherics/unary/portables_connector/process_atmos()
..()
if(!connected_device)
return 0
parent.update = 1
@@ -17,9 +17,8 @@
prefix="h"
icon_state = "[prefix]off"
/obj/machinery/atmospherics/unary/thermal_plate/process()
if(!..())
return 0
/obj/machinery/atmospherics/unary/thermal_plate/process_atmos()
..()
var/datum/gas_mixture/environment = loc.return_air()
@@ -99,6 +99,6 @@
T.assume_air(to_release)
air_update_turf(1)
/obj/machinery/atmospherics/unary/process()
/obj/machinery/atmospherics/unary/process_atmos()
..()
return parent
@@ -121,8 +121,9 @@
update_icon()
update_underlays()
/obj/machinery/atmospherics/unary/vent_pump/process()
if(!..() || (stat & (NOPOWER|BROKEN)))
/obj/machinery/atmospherics/unary/vent_pump/process_atmos()
..()
if((stat & (NOPOWER|BROKEN)))
return 0
if(!node)
on = 0
@@ -146,7 +147,7 @@
if(pressure_delta > 0.5)
if(air_contents.temperature > 0)
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION) / 5
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
@@ -164,7 +165,7 @@
if(pressure_delta > 0.5)
if(environment.temperature > 0)
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION) / 5
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if(isnull(removed)) //in space
@@ -175,9 +175,8 @@
src.broadcast_status()
check_turfs()
/obj/machinery/atmospherics/unary/vent_scrubber/process()
if(!..())
return 0
/obj/machinery/atmospherics/unary/vent_scrubber/process_atmos()
..()
if(widenet)
check_turfs()
@@ -215,7 +214,7 @@
if(scrubbing)
if((scrub_O2 && environment.oxygen>0.001) || (scrub_N2 && environment.nitrogen>0.001) || (scrub_CO2 && environment.carbon_dioxide>0.001) || (scrub_Toxins && environment.toxins>0.001) || (environment.trace_gases.len>0))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles() / 5
//Take a gas sample
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
@@ -257,7 +256,7 @@
if(air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
return
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume) / 5
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
+2 -1
View File
@@ -25,11 +25,12 @@
/obj/machinery/atmospherics/pipe/cap/pipeline_expansion()
return list(node)
/obj/machinery/atmospherics/pipe/cap/process()
/obj/machinery/atmospherics/pipe/cap/process_atmos()
if(!parent)
..()
else
. = PROCESS_KILL
/obj/machinery/atmospherics/pipe/cap/Destroy()
. = ..()
if(node)
+1 -1
View File
@@ -66,7 +66,7 @@
/obj/machinery/atmospherics/pipe/manifold/pipeline_expansion()
return list(node1, node2, node3)
/obj/machinery/atmospherics/pipe/manifold/process()
/obj/machinery/atmospherics/pipe/manifold/process_atmos()
if(!parent)
..()
else
+1 -1
View File
@@ -25,7 +25,7 @@
/obj/machinery/atmospherics/pipe/manifold4w/pipeline_expansion()
return list(node1, node2, node3, node4)
/obj/machinery/atmospherics/pipe/manifold4w/process()
/obj/machinery/atmospherics/pipe/manifold4w/process_atmos()
if(!parent)
..()
else
@@ -13,7 +13,7 @@
buckle_lying = 1
var/icon_temperature = T20C //stop small changes in temperature causing icon refresh
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process()
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process_atmos()
var/environment_temperature = 0
var/datum/gas_mixture/pipe_air = return_air()
if(!pipe_air)