mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Adds a breathing sound when you're in low pressure.
This commit is contained in:
@@ -72,3 +72,10 @@
|
||||
|
||||
/proc/is_station_turf(var/turf/T)
|
||||
return T && isStationLevel(T.z)
|
||||
|
||||
/proc/is_below_sound_pressure(var/turf/T)
|
||||
var/datum/gas_mixture/environment = T ? T.return_air() : null
|
||||
var/pressure = environment ? environment.return_pressure() : 0
|
||||
if(pressure < SOUND_MINIMUM_PRESSURE)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning.
|
||||
var/hazard_low_pressure = HAZARD_LOW_PRESSURE // Dangerously low pressure.
|
||||
var/light_dam // If set, mob will be damaged in light over this value and heal in light below its negative.
|
||||
var/breathing_sound = 'sound/voice/monkey.ogg' // If set, this mob will have a breathing sound.
|
||||
var/body_temperature = 310.15 // Non-IS_SYNTHETIC species will try to stabilize at this temperature.
|
||||
// (also affects temperature processing)
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
breath_vol_mul = 1/6 // 0.5 liters * breath_vol_mul = breath volume
|
||||
breath_eff_mul = 6 // 1/6 * breath_eff_mul = fraction of gas consumed
|
||||
poison_type = "nitrogen" //a species that breathes plasma shouldn't be poisoned by it.
|
||||
breathing_sound = null //They don't work that way I guess? I'm a coder not a purple man.
|
||||
mob_size = 13 //their half an inch thick exoskeleton and impressive height, plus all of their mechanical organs.
|
||||
natural_climbing = TRUE
|
||||
climb_coeff = 0.75
|
||||
|
||||
@@ -249,6 +249,13 @@
|
||||
else
|
||||
last_successful_breath = world.time
|
||||
owner.oxygen_alert = 0
|
||||
if(!BP_IS_ROBOTIC(src) && species.breathing_sound && is_below_sound_pressure(get_turf(owner)))
|
||||
if(breathing || owner.shock_stage >= 10)
|
||||
sound_to(owner, sound(species.breathing_sound,0,0,0,5))
|
||||
breathing = 0
|
||||
else
|
||||
breathing = 1
|
||||
|
||||
return failed_breath
|
||||
|
||||
/obj/item/organ/internal/lungs/proc/handle_temperature_effects(datum/gas_mixture/breath)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user