Ports tgstation/tgstation#40577 - Makes /datum/gas_mixture/share() roughly 5% faster by removing fairly useless abstraction, also contains a small boost to pipelines

This commit is contained in:
deathride58
2019-04-02 03:07:13 -04:00
parent 23fb3cb940
commit ee8df80c80
3 changed files with 84 additions and 87 deletions
@@ -221,13 +221,16 @@
if(!P)
continue
GL += P.return_air()
for(var/obj/machinery/atmospherics/components/binary/valve/V in P.other_atmosmch)
if(V.on)
PL |= V.parents[1]
PL |= V.parents[2]
for(var/obj/machinery/atmospherics/components/unary/portables_connector/C in P.other_atmosmch)
if(C.connected_device)
GL += C.portableConnectorReturnAir()
for(var/atmosmch in P.other_atmosmch)
if (istype(atmosmch, /obj/machinery/atmospherics/components/binary/valve))
var/obj/machinery/atmospherics/components/binary/valve/V = atmosmch
if(V.on)
PL |= V.parents[1]
PL |= V.parents[2]
else if (istype(atmosmch, /obj/machinery/atmospherics/components/unary/portables_connector))
var/obj/machinery/atmospherics/components/unary/portables_connector/C = atmosmch
if(C.connected_device)
GL += C.portableConnectorReturnAir()
var/total_thermal_energy = 0
var/total_heat_capacity = 0