Improves how gas mixture datums are handled, reduces proc calls, commenting. Removed ghost-heating from cryo and "oxygen_agent_b" gas type.

This commit is contained in:
SkyMarshal
2012-04-26 14:08:15 -07:00
parent ded68393ac
commit 15d72e3b0e
47 changed files with 537 additions and 398 deletions

View File

@@ -22,7 +22,7 @@
else
T = null
if (src.h_status)
var/t1 = src.gas.total_moles()
var/t1 = src.gas.total_moles
if ((t1 > 0 && src.gas.temperature < (src.h_tar+T0C)))
var/increase = src.heatrate / t1
var/n_temp = src.gas.temperature + increase
@@ -31,7 +31,7 @@
switch(src.t_status)
if(1.0)
if (src.holding)
var/t1 = src.gas.total_moles()
var/t1 = src.gas.total_moles
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
@@ -41,7 +41,7 @@
src.t_status = 3
if(2.0)
if (src.holding)
var/t1 = src.gas.total_moles()
var/t1 = src.gas.total_moles
var/t2 = src.maximum - t1
var/t = src.t_per
if (src.t_per > t2)
@@ -97,7 +97,7 @@
ct = text("<A href='?src=\ref[];c=1'>Release</A> <A href='?src=\ref[];c=2'>Accept</A> Stopped", src, src)
else
ct = "Disconnected"
var/dat = text("<TT><B>Canister Valves</B><BR>\n<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>\nUpper Valve Status: [][]<BR>\n\t<A href='?src=\ref[];tp=-[]'>M</A> <A href='?src=\ref[];tp=-10000'>-</A> <A href='?src=\ref[];tp=-1000'>-</A> <A href='?src=\ref[];tp=-100'>-</A> <A href='?src=\ref[];tp=-1'>-</A> [] <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=100'>+</A> <A href='?src=\ref[];tp=1000'>+</A> <A href='?src=\ref[];tp=10000'>+</A> <A href='?src=\ref[];tp=[]'>M</A><BR>\nHeater Status: [] - []<BR>\n\tTrg Tmp: <A href='?src=\ref[];ht=-50'>-</A> <A href='?src=\ref[];ht=-5'>-</A> <A href='?src=\ref[];ht=-1'>-</A> [] <A href='?src=\ref[];ht=1'>+</A> <A href='?src=\ref[];ht=5'>+</A> <A href='?src=\ref[];ht=50'>+</A><BR>\n<BR>\nPipe Valve Status: []<BR>\n\t<A href='?src=\ref[];cp=-[]'>M</A> <A href='?src=\ref[];cp=-10000'>-</A> <A href='?src=\ref[];cp=-1000'>-</A> <A href='?src=\ref[];cp=-100'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=100'>+</A> <A href='?src=\ref[];cp=1000'>+</A> <A href='?src=\ref[];cp=10000'>+</A> <A href='?src=\ref[];cp=[]'>M</A><BR>\n<BR>\n<A href='?src=\ref[];mach_close=canister'>Close</A><BR>\n</TT>", src.gas.total_moles(), src.maximum, tt, (src.holding ? text("<BR><A href='?src=\ref[];tank=1'>Tank ([]</A>)", src, src.holding.gas.total_moles()) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ht, (src.gas.total_moles() ? (src.gas.temperature-T0C) : 20), src, src, src, src.h_tar, src, src, src, ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user)
var/dat = text("<TT><B>Canister Valves</B><BR>\n<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>\nUpper Valve Status: [][]<BR>\n\t<A href='?src=\ref[];tp=-[]'>M</A> <A href='?src=\ref[];tp=-10000'>-</A> <A href='?src=\ref[];tp=-1000'>-</A> <A href='?src=\ref[];tp=-100'>-</A> <A href='?src=\ref[];tp=-1'>-</A> [] <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=100'>+</A> <A href='?src=\ref[];tp=1000'>+</A> <A href='?src=\ref[];tp=10000'>+</A> <A href='?src=\ref[];tp=[]'>M</A><BR>\nHeater Status: [] - []<BR>\n\tTrg Tmp: <A href='?src=\ref[];ht=-50'>-</A> <A href='?src=\ref[];ht=-5'>-</A> <A href='?src=\ref[];ht=-1'>-</A> [] <A href='?src=\ref[];ht=1'>+</A> <A href='?src=\ref[];ht=5'>+</A> <A href='?src=\ref[];ht=50'>+</A><BR>\n<BR>\nPipe Valve Status: []<BR>\n\t<A href='?src=\ref[];cp=-[]'>M</A> <A href='?src=\ref[];cp=-10000'>-</A> <A href='?src=\ref[];cp=-1000'>-</A> <A href='?src=\ref[];cp=-100'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=100'>+</A> <A href='?src=\ref[];cp=1000'>+</A> <A href='?src=\ref[];cp=10000'>+</A> <A href='?src=\ref[];cp=[]'>M</A><BR>\n<BR>\n<A href='?src=\ref[];mach_close=canister'>Close</A><BR>\n</TT>", src.gas.total_moles, src.maximum, tt, (src.holding ? text("<BR><A href='?src=\ref[];tank=1'>Tank ([]</A>)", src, src.holding.gas.total_moles) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ht, (src.gas.total_moles ? (src.gas.temperature-T0C) : 20), src, src, src, src.h_tar, src, src, src, ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user)
user << browse(dat, "window=canister;size=600x300")
onclose(user, "canister")
return */ //TODO: FIX

View File

@@ -59,17 +59,17 @@ var/linenums = 0
/*
/obj/machinery/pipeline/get_gas_moles(from)
return gas.total_moles()/capmult
return gas.total_moles/capmult
*/
/obj/machinery/pipeline/get_gas(from)
return gas
/obj/machinery/pipeline/gas_flow()
//if(suffix == "d" && Debug) world.log << "PLF1 [gas.total_moles()] ~ [ngas.total_moles()]"
//if(suffix == "d" && Debug) world.log << "PLF1 [gas.total_moles] ~ [ngas.total_moles]"
gas.copy_from(ngas)
//if(suffix == "d" && Debug) world.log << "PLF2 [gas.total_moles()] ~ [ngas.total_moles()]"
//if(suffix == "d" && Debug) world.log << "PLF2 [gas.total_moles] ~ [ngas.total_moles]"
/obj/machinery/pipeline/process()
/*
@@ -81,7 +81,7 @@ var/linenums = 0
// var/dbg = (suffix == "d") && Debug
//if(dbg) world.log << "PLP1 [gas.total_moles()] ~ [ngas.total_moles()]"
//if(dbg) world.log << "PLP1 [gas.total_moles] ~ [ngas.total_moles()]"
if(!numnodes)
return //dividing by zero is bad okay?