[MIRROR] Fixes many basic mobs not being vulnerable to extreme atmospheres and temperatures by making it the default [MDB IGNORE] (#18029)

* Fixes many basic mobs not being vulnerable to extreme atmospheres and temperatures by making it the default

* borgi update

Co-authored-by: kawoppi <94711066+kawoppi@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
SkyratBot
2022-12-13 00:02:37 +01:00
committed by GitHub
parent 10ac371e8d
commit df8dbcdab4
9 changed files with 43 additions and 68 deletions
+22
View File
@@ -85,6 +85,20 @@
///Sentience type, for slime potions. SHOULD BE AN ELEMENT BUT I DONT CARE ABOUT IT FOR NOW
var/sentience_type = SENTIENCE_ORGANIC
///Leaving something at 0 means it's off - has no maximum.
var/list/habitable_atmos = list("min_oxy" = 5, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
///This damage is taken when atmos doesn't fit all the requirements above. Set to 0 to avoid adding the atmos_requirements element.
var/unsuitable_atmos_damage = 1
///Minimal body temperature without receiving damage
var/minimum_survivable_temperature = 250
///Maximal body temperature without receiving damage
var/maximum_survivable_temperature = 350
///This damage is taken when the body temp is too cold. Set both this and unsuitable_heat_damage to 0 to avoid adding the basic_body_temp_sensitive element.
var/unsuitable_cold_damage = 1
///This damage is taken when the body temp is too hot. Set both this and unsuitable_cold_damage to 0 to avoid adding the basic_body_temp_sensitive element.
var/unsuitable_heat_damage = 1
/mob/living/basic/Initialize(mapload)
. = ..()
@@ -102,6 +116,14 @@
if(speak_emote)
speak_emote = string_list(speak_emote)
if(unsuitable_atmos_damage != 0)
//String assoc list returns a cached list, so this is like a static list to pass into the element below.
habitable_atmos = string_assoc_list(habitable_atmos)
AddElement(/datum/element/atmos_requirements, habitable_atmos, unsuitable_atmos_damage)
if(unsuitable_cold_damage != 0 && unsuitable_heat_damage != 0)
AddElement(/datum/element/basic_body_temp_sensitive, minimum_survivable_temperature, maximum_survivable_temperature, unsuitable_cold_damage, unsuitable_heat_damage)
/mob/living/basic/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
///Automatic stamina re-gain
@@ -31,6 +31,8 @@
attack_verb_continuous = "kicks"
attack_verb_simple = "kick"
butcher_results = list(/obj/item/food/meat/slab = 1)
unsuitable_cold_damage = 0.5 // Cold damage is 0.5 here to account for low health on the rabbit.
unsuitable_heat_damage = 0.5 // Heat damage is 0.5 here to account for low health on the rabbit.
ai_controller = /datum/ai_controller/basic_controller/rabbit
/// passed to animal_varity as the prefix icon.
var/icon_prefix = "rabbit"
@@ -85,27 +87,10 @@
icon_dead = "space_rabbit_white_dead"
icon_prefix = "space_rabbit"
ai_controller = /datum/ai_controller/basic_controller/rabbit/easter/space
// Minimum Allowable Body Temp, zero because we are meant to survive in space and we have a fucking RABBIT SPACE MASK.
var/minimum_survivable_temperature = 0
// Maximum Allowable Body Temp, 1500 because we might overheat and die in said RABBIT SPACE MASK.
var/maximum_survivable_temperature = 1500
/mob/living/basic/rabbit/easter/space/Initialize(mapload)
. = ..()
// string_assoc_list returns a cached list, which we then use as a static list to pass into the below AddElement
var/list/habitable_atmos = string_assoc_list(list(
"min_oxy" = 0,
"max_oxy" = 0,
"min_plas" = 0,
"max_plas" = 0,
"min_co2" = 0,
"max_co2" = 0,
"min_n2" = 0,
"max_n2" = 0,
))
AddElement(/datum/element/atmos_requirements, atmos_requirements = habitable_atmos, unsuitable_atmos_damage = 0)
// heat_damage is 0.5 here to account for low health on the rabbit.
AddElement(/datum/element/basic_body_temp_sensitive, min_body_temp = minimum_survivable_temperature, max_body_temp = maximum_survivable_temperature, cold_damage = 0, heat_damage = 0.5)
unsuitable_atmos_damage = 0 // Zero because we are meant to survive in space.
minimum_survivable_temperature = 0 // Minimum Allowable Body Temp, zero because we are meant to survive in space and we have a fucking RABBIT SPACE MASK.
maximum_survivable_temperature = 1500 // Maximum Allowable Body Temp, 1500 because we might overheat and die in said RABBIT SPACE MASK.
unsuitable_cold_damage = 0 // Zero because we are meant to survive in space.
/datum/ai_controller/basic_controller/rabbit/easter/space
planning_subtrees = list(/datum/ai_planning_subtree/random_speech/rabbit/easter/space)
@@ -3,10 +3,12 @@
combat_mode = TRUE
faction = list("mining")
unsuitable_atmos_damage = 0
minimum_survivable_temperature = 0
maximum_survivable_temperature = INFINITY
/mob/living/basic/mining/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_LAVA_IMMUNE, INNATE_TRAIT)
ADD_TRAIT(src, TRAIT_ASHSTORM_IMMUNE, INNATE_TRAIT)
AddElement(/datum/element/mob_killed_tally, "mobs_killed_mining")
AddElement(/datum/element/basic_body_temp_sensitive, max_body_temp = INFINITY)
@@ -711,6 +711,9 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
icon_dead = "void_puppy_dead"
nofur = TRUE
held_state = "void_puppy"
unsuitable_atmos_damage = 0
minimum_survivable_temperature = TCMB
maximum_survivable_temperature = T0C + 40
/mob/living/basic/pet/dog/corgi/puppy/void/Initialize(mapload)
. = ..()
-15
View File
@@ -17,21 +17,6 @@
/mob/living/basic/pet/Initialize(mapload)
. = ..()
// String assoc list returns a cached list, so this is like a static list to pass into the element below.
var/static/list/habitable_atmos = list(
"min_oxy" = 5,
"max_oxy" = 0,
"min_plas" = 0,
"max_plas" = 1,
"min_co2" = 0,
"max_co2" = 5,
"min_n2" = 0,
"max_n2" = 0,
)
AddElement(/datum/element/atmos_requirements, atmos_requirements = habitable_atmos, unsuitable_atmos_damage = 1)
AddElement(/datum/element/basic_body_temp_sensitive)
/// Can set the collar var beforehand to start the pet with a collar.
if(collar)
collar = new(src)
@@ -16,26 +16,15 @@
attack_sound = 'sound/weapons/punch1.ogg'
combat_mode = TRUE
faction = list("stickman")
unsuitable_atmos_damage = 7.5
unsuitable_cold_damage = 7.5
unsuitable_heat_damage = 7.5
ai_controller = /datum/ai_controller/basic_controller/stickman
/mob/living/basic/stickman/Initialize(mapload)
. = ..()
// String assoc list returns a cached list, so this is like a static list to pass into the element below.
var/list/habitable_atmos = string_assoc_list(list(
"min_oxy" = 5,
"max_oxy" = 0,
"min_plas" = 0,
"max_plas" = 1,
"min_co2" = 0,
"max_co2" = 5,
"min_n2" = 0,
"max_n2" = 0,
))
new /obj/effect/temp_visual/paper_scatter(get_turf(src))
AddElement(/datum/element/basic_body_temp_sensitive, cold_damage = 7.5, heat_damage = 7.5)
AddElement(/datum/element/atmos_requirements, atmos_requirements = habitable_atmos, unsuitable_atmos_damage = 7.5)
/datum/ai_controller/basic_controller/stickman
blackboard = list(
@@ -35,20 +35,6 @@
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
var/list/habitable_atmos = string_assoc_list(list(
"min_oxy" = 5,
"max_oxy" = 0,
"min_plas" = 0,
"max_plas" = 1,
"min_co2" = 0,
"max_co2" = 5,
"min_n2" = 0,
"max_n2" = 0,
))
AddElement(/datum/element/atmos_requirements, habitable_atmos, unsuitable_atmos_damage = 1)
AddElement(/datum/element/basic_body_temp_sensitive)
/datum/ai_controller/basic_controller/axolotl
ai_traits = STOP_MOVING_WHEN_PULLED
ai_movement = /datum/ai_movement/basic_avoidance
@@ -25,6 +25,10 @@
basic_mob_flags = DEL_ON_DEATH
faction = list("hostile", FACTION_MAINT_CREATURES)
unsuitable_atmos_damage = 0
minimum_survivable_temperature = 270
maximum_survivable_temperature = INFINITY
ai_controller = /datum/ai_controller/basic_controller/cockroach
var/cockroach_cell_line = CELL_LINE_TABLE_COCKROACH
@@ -59,6 +59,8 @@
gold_core_spawnable = NO_SPAWN
nofur = TRUE
ai_controller = /datum/ai_controller/dog/borgi
unsuitable_atmos_damage = 0
minimum_survivable_temperature = 0
// These lights enable when E-N is emagged
light_system = MOVABLE_LIGHT_DIRECTIONAL
@@ -72,9 +74,6 @@
/mob/living/basic/pet/dog/corgi/borgi/Initialize(mapload)
. = ..()
RemoveElement(/datum/element/atmos_requirements)
RemoveElement(/datum/element/basic_body_temp_sensitive)
AddElement(/datum/element/basic_body_temp_sensitive, min_body_temp = 0)
var/static/list/borgi_drops = list(/obj/effect/decal/cleanable/oil/slippery)
AddElement(/datum/element/death_drops, borgi_drops)