LINDA -> MILLA (#25328)

* LINDA -> MILLA

* Tiles now change their atmos mode properly.

* Fixed a bug that made walls generate supercold air when deconstructed/destroyed.

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

* Begone, var!

* MILLA -> milla

* Lint.

* More lint.

* Prevent negative/NaN atmos from spreading.

* Made fires start more reliably.

* Undef what the rest should not see.

* Enums are nice.

* Match LINDA better.

* Debugging verbs.

* Debug verb fixes.

* Labelled more lavaland stuff with ATMOS_MODE_LAVALAND

* Block superconductivity on a couple more things for Lavaland.

* Updated milla.dll

* Lavaland map fixes.

* Missed a spot.

* Begone, var! (again)

* Add libmilla_ci.so for continuous integration tests.

* Install/contributing instructions for MILLA.

* Directional plasmaglass windows on shuttles shouldn't stop protecting from heat after moving.

* Banish bad naming.

* Better naming and debug stats for SSair.

* Apply suggestions from code review

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

* Magic numbers and formatting.

* Don't screw up the temperature during reactions.

* Efficiency and readability.

* Fix hotspots.

* Removed redundant safety (MILLA will already output an error)

* Optimizations.

* oops

* TGS build script update.

* Change API of gas_mixture and how you get one from a turf.

* Get in there.

* so many vars

* MILLA binary updates.

* Lint

* Made MT cost more honest.

* Gave MILLA a read-only mode.

* More read-only vs synchronized mode work.

* Even more.

* Synchronize disposals.

* Updated a bunch of stuff to use SSair.synchronize or GM.synchronize.

* MILLA <3 Tracy

* lint

* cargo fmt

* more lint

* Test needed MILLA sync.

* Silence atmos machinery that's behaving as intended, but continue objecting to other potential failures to synchronize.

* Push new MILLA DLL

* Build MILLA

* Update PR instructions for MILLA.

* Add some fancy plasmaglass windows to the Lifebringers' ship.

* The golems remembered that they should insulate *all* their engines.

* First round of TM bugfixes.

* Build MILLA

* fix two lavaland ruin turf types

* bunch more maps

* fixes milla ci and makes the interesting turf verb better

* Solid turfs can no longer conduct heat (for now...)

* Made indoor tiles in beach and winter biodomes not lavaland air.

* Re-added random IT teleport, adjusted warning message

* Fixed a tinted window on Lavaland to be a plasglass window instead.

* Made firelocks and holofans heatproof

* Made RPD auto-wrench pipes if you have a wrench in your offhand.

* Runtime fixes.

* Made visuals update more reliably.

* Lint

* Update .github/CONTRIBUTING.md

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

* Build MILLA

* The Syndicate have installed tiny fans on their research base.

* The syndicate have figured out how to make plastitanium windows heatproof.

* This is getting out of hand. Now there are two of them.

* Un-break the auto-wrenching that I broke before committing.

* Build MILLA

* Build MILLA

* Massive MILLA refactor, assorted bugfixes.

* Build MILLA

* Explicit typing.

* Less sleeping/blocking.

* Build MILLA

* Yes, yes, this part can sleep.

* Build MILLA

* SSair reporting improvements.

* Build MILLA

* Please do not dock twice and splat yourself.

* Build MILLA

* Pls to not make SM go nuts.

* Build MILLA

* Build MILLA

* Added stricter lower bounds on plasmafire, fixing perpetually-burning SM.

* Build MILLA

* Lint

* Temporary logging, begone.

* Build MILLA

* Prevent hotspot strobing.

* Add in radiate_to_spess behavior.

* Build MILLA

* progress

* Compiling is good.

* bugfixes

* Progress.

* Ruins update.

* This one exists.

* Fixup temporary hotspots to last longer than one tick.

* Add/fix comments.

* Cut the slash.

* Fix test.

* No sleep for you.

* Build MILLA

* Prevent nested MILLA safety from runtiming.

* Build MILLA

* Runtime fix.

* Build MILLA

* Fix canisters not updating icon when gas contents change.

* Build MILLA

* Build MILLA

* Fixed an issue that made mechs very cold on environment air.

* Build MILLA

* oops

* Build MILLA

* Walls can make loud noises again.

* Build MILLA

* Fixes a rare runtime.

* Build MILLA

* Update .github/DOWNLOADING.md

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

* Review suggestions

* Lint

* Build MILLA

* bound_mixtures now only contains mixtures that can be written

* Build MILLA

* Apply suggestions from code review

Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

* Build MILLA

* Restore the original async behavior of pyro anomalies.

* Build MILLA

* Build MILLA

* Make the safety assertion in /datum/milla_safe safer.

* Build MILLA

---------

Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>
Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: GDN <Roanrichards1@Gmail.com>
This commit is contained in:
Charlie Nolan
2024-06-09 07:18:11 +00:00
committed by GitHub
co-authored by Burzah GDN AffectedArc07 FunnyMan3595 paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com> warriorstar-orion GDN
parent 56b4da8ffc
commit d3584b1d1c
200 changed files with 7244 additions and 3918 deletions
+2 -2
View File
@@ -13,8 +13,8 @@
move_on_shuttle = FALSE
flags_2 = IMMUNE_TO_SHUTTLECRUSH_2
/mob/camera/experience_pressure_difference()
return
/mob/camera/experience_pressure_difference(flow_x, flow_y)
return // Immune to gas flow.
/mob/camera/forceMove(atom/destination)
var/oldloc = loc
+1 -1
View File
@@ -68,7 +68,7 @@
//make sure the air can transmit speech - hearer's side
var/turf/T = get_turf(src)
if(T && !isobserver(src))
var/datum/gas_mixture/environment = T.return_air()
var/datum/gas_mixture/environment = T.get_readonly_air()
var/pressure = environment ? environment.return_pressure() : 0
if(pressure < SOUND_MINIMUM_PRESSURE && get_dist(speaker, src) > 1)
return FALSE
@@ -72,11 +72,11 @@
/mob/living/carbon/alien/check_eye_prot()
return 2
/mob/living/carbon/alien/handle_environment(datum/gas_mixture/environment)
if(!environment)
/mob/living/carbon/alien/handle_environment(datum/gas_mixture/readonly_environment)
if(!readonly_environment)
return
var/loc_temp = get_temperature(environment)
var/loc_temp = get_temperature(readonly_environment)
if(!on_fire) // If you're on fire, ignore local air temperature
if(loc_temp > bodytemperature)
@@ -8,23 +8,23 @@
var/toxins_used = 0
var/tox_detect_threshold = 0.02
var/breath_pressure = (breath.total_moles() * R_IDEAL_GAS_EQUATION * breath.temperature) / BREATH_VOLUME
var/breath_pressure = (breath.total_moles() * R_IDEAL_GAS_EQUATION * breath.temperature()) / BREATH_VOLUME
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath.toxins / breath.total_moles()) * breath_pressure
var/Toxins_pp = (breath.toxins() / breath.total_moles()) * breath_pressure
if(Toxins_pp > tox_detect_threshold) // Detect toxins in air
add_plasma(breath.toxins * 250)
add_plasma(breath.toxins() * 250)
throw_alert("alien_tox", /atom/movable/screen/alert/alien_tox)
toxins_used = breath.toxins
toxins_used = breath.toxins()
else
clear_alert("alien_tox")
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
breath.set_toxins(breath.toxins() - toxins_used)
breath.set_oxygen(breath.oxygen() + toxins_used)
/mob/living/carbon/alien/handle_status_effects()
..()
+24 -22
View File
@@ -42,21 +42,24 @@
//Start of a breath chain, calls breathe()
/mob/living/carbon/handle_breathing(times_fired)
if(times_fired % 2 == 1)
breathe() //Breathe every other tick, unless suffocating
var/datum/milla_safe/carbon_breathe/milla = new()
milla.invoke_async(src)
else
if(isobj(loc))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
/datum/milla_safe/carbon_breathe
/datum/milla_safe/carbon_breathe/on_run(mob/living/carbon/carbon)
var/turf/T = get_turf(carbon)
carbon.breathe(get_turf_air(T))
//Second link in a breath chain, calls check_breath()
/mob/living/carbon/proc/breathe()
/mob/living/carbon/proc/breathe(datum/gas_mixture/environment)
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
return
var/datum/gas_mixture/environment
if(loc)
environment = loc.return_air()
var/datum/gas_mixture/breath
if(health <= HEALTH_THRESHOLD_CRIT && check_death_method())
@@ -77,14 +80,14 @@
if(isobj(loc)) //Breathe from loc as object
var/obj/loc_as_obj = loc
breath = loc_as_obj.handle_internal_lifeform(src, BREATH_VOLUME)
breath = loc_as_obj.handle_internal_lifeform(src, BREATH_VOLUME, environment)
else if(isturf(loc)) //Breathe from loc as turf
var/breath_moles = 0
if(environment)
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
breath = environment.remove(breath_moles)
else //Breathe from loc as obj again
if(isobj(loc))
var/obj/loc_as_obj = loc
@@ -93,9 +96,8 @@
check_breath(breath)
if(breath)
loc.assume_air(breath)
air_update_turf()
if(ishuman(src) && !internal && environment.temperature < 273 && environment.return_pressure() > 20) //foggy breath :^)
environment.merge(breath)
if(ishuman(src) && !internal && environment.temperature() < 273 && environment.return_pressure() > 20) //foggy breath :^)
new /obj/effect/frosty_breath(loc, src)
//Third and last link in a breath chain
@@ -119,12 +121,12 @@
var/SA_para_min = 1
var/SA_sleep_min = 1
var/oxygen_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature())/BREATH_VOLUME
var/O2_partialpressure = (breath.oxygen/breath.total_moles())*breath_pressure
var/Toxins_partialpressure = (breath.toxins/breath.total_moles())*breath_pressure
var/CO2_partialpressure = (breath.carbon_dioxide/breath.total_moles())*breath_pressure
var/SA_partialpressure = (breath.sleeping_agent/breath.total_moles())*breath_pressure
var/O2_partialpressure = (breath.oxygen() / breath.total_moles()) * breath_pressure
var/Toxins_partialpressure = (breath.toxins() / breath.total_moles()) * breath_pressure
var/CO2_partialpressure = (breath.carbon_dioxide() / breath.total_moles()) * breath_pressure
var/SA_partialpressure = (breath.sleeping_agent() / breath.total_moles()) * breath_pressure
//OXYGEN
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
@@ -133,18 +135,18 @@
if(O2_partialpressure > 0)
var/ratio = 1 - O2_partialpressure/safe_oxy_min
adjustOxyLoss(min(5*ratio, 3))
oxygen_used = breath.oxygen*ratio
oxygen_used = breath.oxygen() * ratio
else
adjustOxyLoss(3)
throw_alert("not_enough_oxy", /atom/movable/screen/alert/not_enough_oxy)
else //Enough oxygen
adjustOxyLoss(-5)
oxygen_used = breath.oxygen
oxygen_used = breath.oxygen()
clear_alert("not_enough_oxy")
breath.oxygen -= oxygen_used
breath.carbon_dioxide += oxygen_used
breath.set_oxygen(breath.oxygen() - oxygen_used)
breath.set_carbon_dioxide(breath.carbon_dioxide() + oxygen_used)
//CARBON DIOXIDE
if(CO2_partialpressure > safe_co2_max)
@@ -163,14 +165,14 @@
//TOXINS/PLASMA
if(Toxins_partialpressure > safe_tox_max)
var/ratio = (breath.toxins/safe_tox_max) * 10
var/ratio = (breath.toxins() / safe_tox_max) * 10
adjustToxLoss(clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
throw_alert("too_much_tox", /atom/movable/screen/alert/too_much_tox)
else
clear_alert("too_much_tox")
//TRACE GASES
if(breath.sleeping_agent)
if(breath.sleeping_agent())
if(SA_partialpressure > SA_para_min)
Paralyse(6 SECONDS)
if(SA_partialpressure > SA_sleep_min)
@@ -772,10 +772,10 @@ emp_act
else
..()
/mob/living/carbon/human/experience_pressure_difference(pressure_difference, direction)
/mob/living/carbon/human/experience_pressure_difference(flow_x, flow_y)
playsound(src, 'sound/effects/space_wind.ogg', 50, TRUE)
if(HAS_TRAIT(src, TRAIT_NOSLIP))
return FALSE
return // Immune to gas flow.
return ..()
/mob/living/carbon/human/water_act(volume, temperature, source, method = REAGENT_TOUCH)
@@ -185,12 +185,11 @@
return null
/mob/living/carbon/human/handle_environment(datum/gas_mixture/environment)
if(!environment)
/mob/living/carbon/human/handle_environment(datum/gas_mixture/readonly_environment)
if(!readonly_environment)
return
var/loc_temp = get_temperature(environment)
// to_chat(world, "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)] - Heat capacity: [environment_heat_capacity] - Location: [loc] - src: [src]")
var/loc_temp = get_temperature(readonly_environment)
//Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit.
if(stat != DEAD)
@@ -254,7 +253,7 @@
// Account for massive pressure differences. Done by Polymorph
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
var/pressure = environment.return_pressure()
var/pressure = readonly_environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
if(status_flags & GODMODE) return 1 //godmode
@@ -117,8 +117,12 @@
return FALSE
if(H.has_status_effect(STATUS_EFFECT_BURNT_WINGS))
return FALSE
var/datum/gas_mixture/current = A.return_air()
if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85)) //as long as there's reasonable pressure and no gravity, flight is possible
if(isobj(H.loc))
// Can't fly if you're in a box/mech/whatever.
return FALSE
var/turf/T = get_turf(H)
var/datum/gas_mixture/current = T.get_readonly_air()
if(current && (current.return_pressure() >= ONE_ATMOSPHERE * 0.85)) //as long as there's reasonable pressure and no gravity, flight is possible
return TRUE
/datum/species/moth/spec_thunk(mob/living/carbon/human/H)
@@ -153,11 +153,17 @@
/datum/species/plasmaman/handle_life(mob/living/carbon/human/H)
var/atmos_sealed = !HAS_TRAIT(H, TRAIT_NOFIRE) && (isclothing(H.wear_suit) && H.wear_suit.flags & STOPSPRESSUREDMAGE) && (isclothing(H.head) && H.head.flags & STOPSPRESSUREDMAGE)
if(!atmos_sealed && (!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman) && !HAS_TRAIT(H, TRAIT_NOSELFIGNITION_HEAD_ONLY)))
var/datum/gas_mixture/environment = H.loc.return_air()
var/datum/gas_mixture/environment = null
if(isobj(H.loc))
var/obj/O = H.loc
environment = O.return_obj_air()
if(isnull(environment))
var/turf/T = get_turf(H)
environment = T.get_readonly_air()
if(environment)
if(environment.total_moles())
if(!HAS_TRAIT(H, TRAIT_NOFIRE))
if(environment.oxygen && environment.oxygen >= OXYCONCEN_PLASMEN_IGNITION) //Same threshhold that extinguishes fire
if(environment.oxygen() && environment.oxygen() >= OXYCONCEN_PLASMEN_IGNITION) //Same threshhold that extinguishes fire
H.adjust_fire_stacks(0.5)
if(!H.on_fire && H.fire_stacks > 0)
H.visible_message("<span class='danger'>[H]'s body reacts with the atmosphere and bursts into flames!</span>","<span class='userdanger'>Your body reacts with the atmosphere and bursts into flame!</span>")
+21 -7
View File
@@ -671,7 +671,7 @@
else
return pick("trails_1", "trails_2")
/mob/living/experience_pressure_difference(pressure_difference, direction, pressure_resistance_prob_delta = 0)
/mob/living/experience_pressure_difference(flow_x, flow_y, pressure_resistance_prob_delta = 0)
if(buckled)
return
if(client && client.move_delay >= world.time + world.tick_lag * 2)
@@ -680,6 +680,16 @@
var/list/turfs_to_check = list()
if(has_limbs)
var/direction = 0
if(flow_x > 100)
direction |= EAST
if(flow_x < -100)
direction |= WEST
if(flow_y > 100)
direction |= NORTH
if(flow_y < -100)
direction |= SOUTH
var/turf/T = get_step(src, angle2dir(dir2angle(direction) + 90))
if(T)
turfs_to_check += T
@@ -698,7 +708,7 @@
pressure_resistance_prob_delta -= 20
break
..(pressure_difference, direction, pressure_resistance_prob_delta)
..(flow_x, flow_y, pressure_resistance_prob_delta)
/*//////////////////////
START RESIST PROCS
@@ -885,10 +895,14 @@
var/loc_temp = T0C
if(ismecha(loc))
var/obj/mecha/M = loc
loc_temp = M.return_temperature()
var/datum/gas_mixture/cabin = M.return_obj_air()
if(cabin)
loc_temp = cabin.temperature()
else
loc_temp = environment.temperature()
else if(istype(loc, /obj/structure/transit_tube_pod))
loc_temp = environment.temperature
loc_temp = environment.temperature()
else if(isspaceturf(get_turf(src)))
var/turf/heat_turf = get_turf(src)
@@ -898,12 +912,12 @@
var/obj/machinery/atmospherics/unary/cryo_cell/C = loc
if(C.air_contents.total_moles() < 10)
loc_temp = environment.temperature
loc_temp = environment.temperature()
else
loc_temp = C.air_contents.temperature
loc_temp = C.air_contents.temperature()
else
loc_temp = environment.temperature
loc_temp = environment.temperature()
return loc_temp
+4 -4
View File
@@ -223,12 +223,12 @@
else
ExtinguishMob()
return FALSE
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
if(G.oxygen < 1)
var/turf/T = get_turf(src)
var/datum/gas_mixture/G = T?.get_readonly_air() // Check if we're standing in an oxygenless environment
if(!G || G.oxygen() < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return FALSE
var/turf/location = get_turf(src)
location.hotspot_expose(700, 50, 1)
T.hotspot_expose(700, 50, 1)
SEND_SIGNAL(src, COMSIG_LIVING_FIRE_TICK)
return TRUE
+9 -3
View File
@@ -51,9 +51,15 @@
handle_heartattack()
//Handle temperature/pressure differences between body and environment
var/datum/gas_mixture/environment = loc.return_air()
if(environment)
handle_environment(environment)
var/datum/gas_mixture/readonly_environment = null
if(isobj(loc))
var/obj/O = loc
readonly_environment = O.return_obj_air()
if(isnull(readonly_environment))
var/turf/T = get_turf(src)
if(!isnull(T))
readonly_environment = T.get_readonly_air()
handle_environment(readonly_environment)
handle_fire()
+1 -1
View File
@@ -239,7 +239,7 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key)
if(T)
//make sure the air can transmit speech - speaker's side
var/datum/gas_mixture/environment = T.return_air()
var/datum/gas_mixture/environment = T.get_readonly_air()
var/pressure = environment ? environment.return_pressure() : 0
if(!ignore_atmospherics)
if(pressure < SOUND_MINIMUM_PRESSURE)
@@ -22,6 +22,6 @@
/mob/living/silicon/robot/mob_has_gravity()
return ..() || mob_negates_gravity()
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
/mob/living/silicon/robot/experience_pressure_difference(flow_x, flow_y)
if(!HAS_TRAIT(src, TRAIT_MAGPULSE))
return ..()
@@ -864,12 +864,6 @@
new /obj/effect/decal/cleanable/blood/oil(loc)
..()
/mob/living/simple_animal/bot/mulebot/remove_air(amount) //To prevent riders suffocating
if(loc)
return loc.remove_air(amount)
else
return null
/mob/living/simple_animal/bot/mulebot/run_resist()
. = ..()
if(load)
@@ -593,7 +593,9 @@ Difficulty: Hard
var/turf/C = get_turf(src)
new /obj/effect/temp_visual/lava_warning(C, enraged ? 18 SECONDS : 6 SECONDS)
for(var/turf/T in range (1,src))
new /obj/effect/hotspot(T)
var/obj/effect/hotspot/hotspot = new /obj/effect/hotspot/fake(T)
hotspot.temperature = 1000
hotspot.recolor()
T.hotspot_expose(700,50,1)
if(mode == VORTEX)
var/turf/T = get_turf(src)
@@ -279,7 +279,9 @@ Difficulty: Medium
for(var/turf/T in turfs)
if(T.density)
break
new /obj/effect/hotspot(T)
var/obj/effect/hotspot/hotspot = new /obj/effect/hotspot/fake(T)
hotspot.temperature = 1000
hotspot.recolor()
T.hotspot_expose(700,50,1)
for(var/mob/living/L in T.contents)
if(L in hit_list || L == source)
@@ -473,7 +475,7 @@ Difficulty: Medium
duration = 82
color = COLOR_DARK_ORANGE
/obj/effect/temp_visual/drakewall/CanAtmosPass()
/obj/effect/temp_visual/drakewall/CanAtmosPass(direction)
return !density
/obj/effect/temp_visual/lava_safe
@@ -567,7 +569,9 @@ Difficulty: Medium
var/turf/simulated/mineral/M = T
M.gets_drilled()
playsound(T, "explosion", 80, TRUE)
new /obj/effect/hotspot(T)
var/obj/effect/hotspot/hotspot = new /obj/effect/hotspot/fake(T)
hotspot.temperature = 1000
hotspot.recolor()
T.hotspot_expose(700, 50, 1)
for(var/mob/living/L in T.contents)
if(istype(L, /mob/living/simple_animal/hostile/megafauna/dragon))
@@ -366,12 +366,12 @@
/obj/structure/spider/terrorweb/queen/Initialize(mapload)
. = ..()
air_update_turf(TRUE)
recalculate_atmos_connectivity()
/obj/structure/spider/terrorweb/queen/CanAtmosPass(turf/T)
/obj/structure/spider/terrorweb/queen/CanAtmosPass(direction)
return FALSE
/obj/structure/spider/terrorweb/queen/Destroy()
var/turf/T = get_turf(src)
. = ..()
T.air_update_turf(TRUE)
T.recalculate_atmos_connectivity()
@@ -289,20 +289,22 @@
custom_emote(EMOTE_AUDIBLE, pick(emote_hear))
/mob/living/simple_animal/handle_environment(datum/gas_mixture/environment)
/mob/living/simple_animal/handle_environment(datum/gas_mixture/readonly_environment)
if(!readonly_environment)
return
var/atmos_suitable = 1
var/areatemp = get_temperature(environment)
var/areatemp = get_temperature(readonly_environment)
if(abs(areatemp - bodytemperature) > 5 && !HAS_TRAIT(src, TRAIT_NOBREATH))
var/diff = areatemp - bodytemperature
diff = diff / 5
bodytemperature += diff
var/tox = environment.toxins
var/oxy = environment.oxygen
var/n2 = environment.nitrogen
var/co2 = environment.carbon_dioxide
var/tox = readonly_environment.toxins()
var/oxy = readonly_environment.oxygen()
var/n2 = readonly_environment.nitrogen()
var/co2 = readonly_environment.carbon_dioxide()
if(atmos_requirements["min_oxy"] && oxy < atmos_requirements["min_oxy"])
atmos_suitable = 0
@@ -101,11 +101,11 @@
AIproc = FALSE
/mob/living/simple_animal/slime/handle_environment(datum/gas_mixture/environment)
if(!environment)
/mob/living/simple_animal/slime/handle_environment(datum/gas_mixture/readonly_environment)
if(!readonly_environment)
return
var/loc_temp = get_temperature(environment)
var/loc_temp = get_temperature(readonly_environment)
adjust_bodytemperature(adjust_body_temperature(bodytemperature, loc_temp, 1))
+11 -9
View File
@@ -95,18 +95,20 @@
set category = "Admin"
set hidden = 1
if(!loc) return 0
var/turf/T = get_turf(src)
var/datum/gas_mixture/environment = T.get_readonly_air()
var/datum/gas_mixture/environment = loc.return_air()
if(!environment)
return
var/t = "<span class='notice'>Coordinates: [x],[y] \n</span>"
t+= "<span class='warning'>Temperature: [environment.temperature] \n</span>"
t+= "<span class='notice'>Nitrogen: [environment.nitrogen] \n</span>"
t+= "<span class='notice'>Oxygen: [environment.oxygen] \n</span>"
t+= "<span class='notice'>Plasma : [environment.toxins] \n</span>"
t+= "<span class='notice'>Carbon Dioxide: [environment.carbon_dioxide] \n</span>"
t+= "<span class='notice'>N2O: [environment.sleeping_agent] \n</span>"
t+= "<span class='notice'>Agent B: [environment.agent_b] \n</span>"
t+= "<span class='warning'>Temperature: [environment.temperature()] \n</span>"
t+= "<span class='notice'>Nitrogen: [environment.nitrogen()] \n</span>"
t+= "<span class='notice'>Oxygen: [environment.oxygen()] \n</span>"
t+= "<span class='notice'>Plasma : [environment.toxins()] \n</span>"
t+= "<span class='notice'>Carbon Dioxide: [environment.carbon_dioxide()] \n</span>"
t+= "<span class='notice'>N2O: [environment.sleeping_agent()] \n</span>"
t+= "<span class='notice'>Agent B: [environment.agent_b()] \n</span>"
usr.show_message(t, EMOTE_VISIBLE)