mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
a thing (#44077)
This commit is contained in:
committed by
AnturK
parent
c4ee42f10b
commit
e06dbbdd99
@@ -851,10 +851,6 @@
|
||||
. = t_air.return_temperature()
|
||||
return
|
||||
|
||||
/obj/mecha/portableConnectorReturnAir()
|
||||
return internal_tank.return_air()
|
||||
|
||||
|
||||
/obj/mecha/MouseDrop_T(mob/M, mob/user)
|
||||
if((user != M) || user.incapacitated() || !Adjacent(user))
|
||||
return
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
. = ..()
|
||||
temperature = initial_temperature
|
||||
|
||||
|
||||
//used by space tiles
|
||||
/datum/gas_mixture/immutable/space
|
||||
initial_temperature = TCMB
|
||||
|
||||
@@ -42,13 +42,6 @@
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], detach [connected_device] first!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/portables_connector/portableConnectorReturnAir()
|
||||
return connected_device.portableConnectorReturnAir()
|
||||
|
||||
/obj/proc/portableConnectorReturnAir()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/portables_connector/layer1
|
||||
piping_layer = 1
|
||||
icon_state = "connector_map-1"
|
||||
|
||||
@@ -218,7 +218,8 @@
|
||||
var/datum/pipeline/P = PL[i]
|
||||
if(!P)
|
||||
continue
|
||||
GL += P.return_air()
|
||||
GL += P.other_airs
|
||||
GL += P.air
|
||||
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
|
||||
@@ -228,20 +229,29 @@
|
||||
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()
|
||||
GL += C.connected_device.air_contents
|
||||
|
||||
var/total_thermal_energy = 0
|
||||
var/total_heat_capacity = 0
|
||||
var/datum/gas_mixture/total_gas_mixture = new(0)
|
||||
|
||||
var/list/total_gases = total_gas_mixture.gases
|
||||
|
||||
for(var/i in GL)
|
||||
var/datum/gas_mixture/G = i
|
||||
total_gas_mixture.volume += G.volume
|
||||
|
||||
total_gas_mixture.merge(G)
|
||||
// This is sort of a combined merge + heat_capacity calculation
|
||||
|
||||
var/list/giver_gases = G.gases
|
||||
//gas transfer
|
||||
for(var/giver_id in giver_gases)
|
||||
var/giver_gas_data = giver_gases[giver_id]
|
||||
ASSERT_GAS(giver_id, total_gas_mixture)
|
||||
total_gases[giver_id][MOLES] += giver_gas_data[MOLES]
|
||||
total_heat_capacity += giver_gas_data[MOLES] * giver_gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
|
||||
|
||||
total_thermal_energy += THERMAL_ENERGY(G)
|
||||
total_heat_capacity += G.heat_capacity()
|
||||
|
||||
total_gas_mixture.temperature = total_heat_capacity ? total_thermal_energy/total_heat_capacity : 0
|
||||
|
||||
|
||||
@@ -92,9 +92,6 @@
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/portable_atmospherics/portableConnectorReturnAir()
|
||||
return air_contents
|
||||
|
||||
/obj/machinery/portable_atmospherics/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, !ismonkey(user)))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user