mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Infiltration Kit & Overpressure Protection (#11674)
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||
var/max_pressure_protection // Set this variable if the item protects its wearer against high pressures below an upper bound. Keep at null to disable protection.
|
||||
var/min_pressure_protection // Set this variable if the item protects its wearer against low pressures above a lower bound. Keep at null to disable protection. 0 represents protection against hard vacuum.
|
||||
|
||||
var/datum/action/item_action/action
|
||||
var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button.
|
||||
@@ -920,3 +922,18 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
if(isFlameSource())
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/get_pressure_weakness(pressure, zone)
|
||||
. = 1
|
||||
if(pressure > ONE_ATMOSPHERE)
|
||||
if(max_pressure_protection != null)
|
||||
if(max_pressure_protection < pressure)
|
||||
return min(1, round((pressure - max_pressure_protection) / max_pressure_protection, 0.01))
|
||||
else
|
||||
return 0
|
||||
if(pressure < ONE_ATMOSPHERE)
|
||||
if(min_pressure_protection != null)
|
||||
if(min_pressure_protection > pressure)
|
||||
return min(1, round((min_pressure_protection - pressure) / min_pressure_protection, 0.01))
|
||||
else
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user