mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Ventcrawler update (#18709)
* mob atmos properly handled * Ventcrawling signals * ventcrawler blowout * clarity * fix * fix again * again * consistency * Teshari rattler * scrubbers can be welded shut
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
handle_weakened()
|
||||
handle_paralysed()
|
||||
handle_supernatural()
|
||||
handle_atmos()
|
||||
|
||||
handle_special()
|
||||
|
||||
@@ -102,73 +101,62 @@
|
||||
/mob/living/simple_mob/proc/handle_special()
|
||||
return
|
||||
|
||||
|
||||
// Handle interacting with and taking damage from atmos
|
||||
// TODO - Refactor this to use handle_environment() like a good /mob/living
|
||||
/mob/living/simple_mob/proc/handle_atmos()
|
||||
var/atmos_unsuitable = 0
|
||||
/mob/living/simple_mob/handle_environment(datum/gas_mixture/environment)
|
||||
|
||||
if(in_stasis)
|
||||
return 1 // return early to skip atmos checks
|
||||
if(is_incorporeal())
|
||||
return 1
|
||||
|
||||
var/atom/A = src.loc
|
||||
if( abs(environment.temperature - bodytemperature) > temperature_range )
|
||||
bodytemperature += ((environment.temperature - bodytemperature) / 5)
|
||||
|
||||
if(istype(A,/turf))
|
||||
var/turf/T = A
|
||||
var/atmos_unsuitable = 0
|
||||
if(min_oxy && environment.gas[GAS_O2] < min_oxy)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("oxy", /atom/movable/screen/alert/not_enough_oxy)
|
||||
else if(max_oxy && environment.gas[GAS_O2] > max_oxy)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("oxy", /atom/movable/screen/alert/too_much_oxy)
|
||||
else
|
||||
clear_alert("oxy")
|
||||
|
||||
var/datum/gas_mixture/Environment = T.return_air()
|
||||
if(min_tox && environment.gas[GAS_PHORON] < min_tox)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("tox_in_air", /atom/movable/screen/alert/not_enough_tox)
|
||||
else if(max_tox && environment.gas[GAS_PHORON] > max_tox)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("tox_in_air", /atom/movable/screen/alert/tox_in_air)
|
||||
else
|
||||
clear_alert("tox_in_air")
|
||||
|
||||
if(Environment)
|
||||
if(min_n2 && environment.gas[GAS_N2] < min_n2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("n2o", /atom/movable/screen/alert/not_enough_nitro)
|
||||
else if(max_n2 && environment.gas[GAS_N2] > max_n2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("n2o", /atom/movable/screen/alert/too_much_nitro)
|
||||
else
|
||||
clear_alert("n2o")
|
||||
|
||||
if( abs(Environment.temperature - bodytemperature) > temperature_range ) //VOREStation Edit: heating adjustments
|
||||
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
|
||||
if(min_co2 && environment.gas[GAS_CO2] < min_co2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("co2", /atom/movable/screen/alert/not_enough_co2)
|
||||
else if(max_co2 && environment.gas[GAS_CO2] > max_co2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("co2", /atom/movable/screen/alert/too_much_co2)
|
||||
else
|
||||
clear_alert("co2")
|
||||
|
||||
if(min_oxy && Environment.gas[GAS_O2] < min_oxy)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("oxy", /atom/movable/screen/alert/not_enough_oxy)
|
||||
else if(max_oxy && Environment.gas[GAS_O2] > max_oxy)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("oxy", /atom/movable/screen/alert/too_much_oxy)
|
||||
else
|
||||
clear_alert("oxy")
|
||||
|
||||
if(min_tox && Environment.gas[GAS_PHORON] < min_tox)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("tox_in_air", /atom/movable/screen/alert/not_enough_tox)
|
||||
else if(max_tox && Environment.gas[GAS_PHORON] > max_tox)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("tox_in_air", /atom/movable/screen/alert/tox_in_air)
|
||||
else
|
||||
clear_alert("tox_in_air")
|
||||
|
||||
if(min_n2 && Environment.gas[GAS_N2] < min_n2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("n2o", /atom/movable/screen/alert/not_enough_nitro)
|
||||
else if(max_n2 && Environment.gas[GAS_N2] > max_n2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("n2o", /atom/movable/screen/alert/too_much_nitro)
|
||||
else
|
||||
clear_alert("n2o")
|
||||
|
||||
if(min_co2 && Environment.gas[GAS_CO2] < min_co2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("co2", /atom/movable/screen/alert/not_enough_co2)
|
||||
else if(max_co2 && Environment.gas[GAS_CO2] > max_co2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("co2", /atom/movable/screen/alert/too_much_co2)
|
||||
else
|
||||
clear_alert("co2")
|
||||
|
||||
if(min_ch4 && Environment.gas[GAS_CH4] < min_ch4)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("methane_in_air", /atom/movable/screen/alert/not_enough_methane)
|
||||
else if(max_tox && Environment.gas[GAS_CH4] > max_ch4)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("methane_in_air", /atom/movable/screen/alert/methane_in_air)
|
||||
else
|
||||
clear_alert("methane_in_air")
|
||||
if(min_ch4 && environment.gas[GAS_CH4] < min_ch4)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("methane_in_air", /atom/movable/screen/alert/not_enough_methane)
|
||||
else if(max_tox && environment.gas[GAS_CH4] > max_ch4)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("methane_in_air", /atom/movable/screen/alert/methane_in_air)
|
||||
else
|
||||
clear_alert("methane_in_air")
|
||||
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
|
||||
@@ -71,14 +71,12 @@
|
||||
/mob/living/simple_mob/vore/demon/UnarmedAttack()
|
||||
if(shifted_out)
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demon/can_fall()
|
||||
if(shifted_out)
|
||||
return FALSE
|
||||
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demon/zMove(direction)
|
||||
if(shifted_out)
|
||||
@@ -86,26 +84,23 @@
|
||||
if(destination)
|
||||
forceMove(destination)
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demon/Life()
|
||||
. = ..()
|
||||
if(shifted_out)
|
||||
density = FALSE
|
||||
|
||||
/mob/living/simple_mob/vore/demon/handle_atmos()
|
||||
/mob/living/simple_mob/vore/demon/handle_environment(datum/gas_mixture/environment) // TODO - Refactor demons to use is_incorporeal()
|
||||
if(shifted_out)
|
||||
return
|
||||
else
|
||||
return .=..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demon/update_canmove()
|
||||
if(is_shifting)
|
||||
canmove = FALSE
|
||||
return canmove
|
||||
else
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demon/apply_melee_effects(var/atom/A)
|
||||
if(isliving(A))
|
||||
|
||||
@@ -74,14 +74,12 @@
|
||||
/mob/living/simple_mob/vore/demonAI/UnarmedAttack()
|
||||
if(shifted_out)
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demonAI/can_fall()
|
||||
if(shifted_out)
|
||||
return FALSE
|
||||
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demonAI/zMove(direction)
|
||||
if(shifted_out)
|
||||
@@ -89,19 +87,17 @@
|
||||
if(destination)
|
||||
forceMove(destination)
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demonAI/Life()
|
||||
. = ..()
|
||||
if(shifted_out)
|
||||
density = FALSE
|
||||
|
||||
/mob/living/simple_mob/vore/demonAI/handle_atmos()
|
||||
/mob/living/simple_mob/vore/demonAI/handle_environment(datum/gas_mixture/environment) // TODO - Refactor demons to use is_incorporeal()
|
||||
if(shifted_out)
|
||||
return
|
||||
else
|
||||
return .=..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/demonAI/update_canmove()
|
||||
if(is_shifting)
|
||||
|
||||
@@ -347,11 +347,6 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_mob/shadekin/handle_atmos()
|
||||
if(comp.in_phase)
|
||||
return
|
||||
else
|
||||
return .=..()
|
||||
/* //VOREStation AI Removal
|
||||
//Friendly ones wander towards people, maybe shy-ly if they are set to shy
|
||||
/mob/living/simple_mob/shadekin/handle_wander_movement()
|
||||
|
||||
@@ -262,5 +262,6 @@
|
||||
VAR_PROTECTED/list/resistances
|
||||
|
||||
var/custom_footstep = FOOTSTEP_MOB_SHOE
|
||||
var/vent_crawl_time = 4.5 SECONDS // Time to animate entering a vent
|
||||
VAR_PRIVATE/is_motion_tracking = FALSE // Prevent multiple unsubs and resubs, also used to check if the vis layer is enabled, use has_motiontracking() to get externally.
|
||||
VAR_PRIVATE/wants_to_see_motion_echos = TRUE
|
||||
|
||||
Reference in New Issue
Block a user