mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-22 12:46:40 +01:00
Merge remote-tracking branch 'upstream/dev' into power-net
Conflicts: code/ATMOSPHERICS/components/binary_devices/pump.dm code/game/machinery/alarm.dm code/game/machinery/spaceheater.dm
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
return 1
|
||||
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if((air1.total_moles() > 0) && (air1.temperature>0))
|
||||
if((air1.total_moles > 0) && (air1.temperature>0))
|
||||
var/pressure_delta = min(target_pressure - output_starting_pressure, (input_starting_pressure - output_starting_pressure)/2)
|
||||
//Can not have a pressure delta that would cause output_pressure > input_pressure
|
||||
|
||||
@@ -172,4 +172,4 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
del(src)
|
||||
|
||||
@@ -76,7 +76,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
var/pressure_delta = target_pressure - sink.return_pressure()
|
||||
|
||||
//Calculate necessary moles to transfer using PV=nRT
|
||||
//Calculate necessary moles to transfer using PV=nRT
|
||||
if(pressure_delta > 0.01 && (source.total_moles() > 0) && (source.temperature > 0 || sink.temperature > 0))
|
||||
//Figure out how much gas to transfer
|
||||
var/air_temperature = (sink.temperature > 0)? sink.temperature : source.temperature
|
||||
@@ -87,7 +87,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
//Return the number of moles that would have to be transfered to bring sink to the target pressure
|
||||
var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
|
||||
//Actually transfer the gas
|
||||
|
||||
//Calculate the amount of energy required
|
||||
@@ -278,5 +278,5 @@ Thus, the two variables affect pump operation are set in New():
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
Reference in New Issue
Block a user