Merge pull request #12217 from Putnam3145/putnamos-for-real
The real fastmos: C++ monstermos port
This commit is contained in:
@@ -40,12 +40,11 @@
|
||||
if(hotspot && istype(T) && T.air)
|
||||
qdel(hotspot)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
var/plas_amt = min(30,G.gases[/datum/gas/plasma]) //Absorb some plasma
|
||||
G.gases[/datum/gas/plasma] -= plas_amt
|
||||
var/plas_amt = min(30,G.get_moles(/datum/gas/plasma)) //Absorb some plasma
|
||||
G.adjust_moles(/datum/gas/plasma,-plas_amt)
|
||||
absorbed_plasma += plas_amt
|
||||
if(G.temperature > T20C)
|
||||
G.temperature = max(G.temperature/2,T20C)
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
if(G.return_temperature() > T20C)
|
||||
G.set_temperature(max(G.return_temperature()/2,T20C))
|
||||
T.air_update_turf()
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/kill_foam()
|
||||
@@ -317,15 +316,13 @@
|
||||
O.ClearWet()
|
||||
if(O.air)
|
||||
var/datum/gas_mixture/G = O.air
|
||||
G.temperature = 293.15
|
||||
G.set_temperature(293.15)
|
||||
for(var/obj/effect/hotspot/H in O)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
for(var/I in G_gases)
|
||||
for(var/I in G.get_gases())
|
||||
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
|
||||
continue
|
||||
G_gases[I] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
G.set_moles(I, 0)
|
||||
O.air_update_turf()
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in O)
|
||||
if(!U.welded)
|
||||
|
||||
@@ -166,15 +166,13 @@
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(!distcheck || get_dist(T, location) < blast) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = temperature
|
||||
G.set_temperature(temperature)
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
if(G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/nitrogen] += (G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/plasma] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
if(G.get_moles(/datum/gas/plasma))
|
||||
G.adjust_moles(/datum/gas/nitrogen, G.get_moles(/datum/gas/plasma))
|
||||
G.set_moles(/datum/gas/plasma, 0)
|
||||
if (weldvents)
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
var/obj/item/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
PT.air_contents.gases[/datum/gas/plasma] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
|
||||
PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
|
||||
PT.air_contents.set_moles(/datum/gas/plasma, pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)))
|
||||
PT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_p))
|
||||
|
||||
OT.air_contents.gases[/datum/gas/oxygen] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
|
||||
OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
|
||||
OT.air_contents.set_moles(/datum/gas/oxygen, pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)))
|
||||
OT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_o))
|
||||
|
||||
V.tank_one = PT
|
||||
V.tank_two = OT
|
||||
|
||||
@@ -486,4 +486,15 @@
|
||||
addtimer(CALLBACK(src, .proc/end), 15)
|
||||
|
||||
/obj/effect/constructing_effect/proc/end()
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/space_wind
|
||||
icon = 'icons/effects/atmospherics.dmi'
|
||||
icon_state = "space_wind"
|
||||
layer = FLY_LAYER
|
||||
duration = 20
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/space_wind/Initialize(mapload, set_dir, set_alpha = 255)
|
||||
. = ..()
|
||||
alpha = set_alpha
|
||||
|
||||
Reference in New Issue
Block a user