[MIRROR] adds vars for damage done by temp on simplemobs (#3042)

* adds vars for damage done by temp on simplemobs (#56572)

instead of heat and cold damage being handled by unsuitable_atmos_damage, instead its handled by unsuitable_heat_damage and unsuitable_cold_damage
if these vars arent set on the mob, they are set by default to the value of unsuitable_atmos_damage

* adds vars for damage done by temp on simplemobs

Co-authored-by: Fikou <piotrbryla@onet.pl>
This commit is contained in:
SkyratBot
2021-02-03 15:46:21 +01:00
committed by GitHub
parent baef9d37b6
commit 64c8a4dd76
7 changed files with 26 additions and 54 deletions
+5 -5
View File
@@ -185,10 +185,13 @@
icon_dead = "scary_clown"
icon_gib = "scary_clown"
speak = list("...", ". . .")
maxHealth = 1e6
health = 1e6
maxHealth = INFINITY
health = INFINITY
emote_see = list("silently stares")
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 0
minbodytemp = 0
maxbodytemp = INFINITY
var/timer
/mob/living/simple_animal/hostile/clown_insane/Initialize()
@@ -254,9 +257,6 @@
return
return ..()
/mob/living/simple_animal/hostile/clown_insane/handle_temperature_damage()
return
/////////////////////////
// Spooky Uplink Items //
/////////////////////////
@@ -49,6 +49,8 @@
health = 30
maxHealth = 30
unsuitable_atmos_damage = 0
minbodytemp = 0
maxbodytemp = 0
wander = 0
speed = 0
ventcrawler = VENTCRAWLER_ALWAYS
@@ -300,9 +302,6 @@
if(cleared)
to_chat(src, "--- [class] alarm in [A.name] has been cleared.")
/mob/living/simple_animal/drone/handle_temperature_damage()
return
/mob/living/simple_animal/drone/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
if(affect_silicon)
return ..()
@@ -23,10 +23,10 @@
a_intent = INTENT_HARM
attack_sound = 'sound/weapons/bladeslice.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
faction = list(ROLE_ALIEN)
status_flags = CANPUSH
minbodytemp = 0
unsuitable_heat_damage = 20
see_in_dark = 8
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
unique_name = 1
@@ -147,16 +147,6 @@
damage = 30
icon_state = "toxin"
/mob/living/simple_animal/hostile/alien/handle_temperature_damage()
if(bodytemperature < minbodytemp)
adjustBruteLoss(2)
throw_alert("temp", /atom/movable/screen/alert/cold, 1)
else if(bodytemperature > maxbodytemp)
adjustBruteLoss(20)
throw_alert("temp", /atom/movable/screen/alert/hot, 3)
else
clear_alert("temp")
/mob/living/simple_animal/hostile/alien/maid
name = "lusty xenomorph maid"
melee_damage_lower = 0
@@ -55,6 +55,8 @@
maxHealth = 80
health = 80
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1)
unsuitable_cold_damage = 20
unsuitable_heat_damage = 20
obj_damage = 30
melee_damage_lower = 20
melee_damage_upper = 25
@@ -99,16 +101,6 @@
GLOB.spidermobs -= src
return ..()
/mob/living/simple_animal/hostile/poison/giant_spider/handle_temperature_damage()
if(bodytemperature < minbodytemp)
adjustBruteLoss(20)
throw_alert("temp", /atom/movable/screen/alert/cold, 3)
else if(bodytemperature > maxbodytemp)
adjustBruteLoss(20)
throw_alert("temp", /atom/movable/screen/alert/hot, 3)
else
clear_alert("temp")
/**
* # Spider Hunter
*
@@ -8,6 +8,7 @@
environment_smash = ENVIRONMENT_SMASH_WALLS
minbodytemp = 0
maxbodytemp = INFINITY
unsuitable_heat_damage = 20
response_harm_continuous = "strikes"
response_harm_simple = "strike"
status_flags = 0
@@ -59,13 +60,3 @@
/mob/living/simple_animal/hostile/asteroid/proc/spawn_crusher_loot()
butcher_results[crusher_loot] = 1
/mob/living/simple_animal/hostile/asteroid/handle_temperature_damage()
if(bodytemperature < minbodytemp)
adjustBruteLoss(2)
throw_alert("temp", /atom/movable/screen/alert/cold, 1)
else if(bodytemperature > maxbodytemp)
adjustBruteLoss(20)
throw_alert("temp", /atom/movable/screen/alert/hot, 3)
else
clear_alert("temp")
@@ -33,21 +33,12 @@
minbodytemp = 270
maxbodytemp = 370
unsuitable_atmos_damage = 10
unsuitable_heat_damage = 15
footstep_type = FOOTSTEP_MOB_SHOE
var/banana_time = 0 // If there's no time set it won't spawn.
var/banana_type = /obj/item/grown/bananapeel
var/attack_reagent
/mob/living/simple_animal/hostile/retaliate/clown/handle_temperature_damage()
if(bodytemperature < minbodytemp)
adjustBruteLoss(10)
throw_alert("temp", /atom/movable/screen/alert/cold, 2)
else if(bodytemperature > maxbodytemp)
adjustBruteLoss(15)
throw_alert("temp", /atom/movable/screen/alert/hot, 3)
else
clear_alert("temp")
/mob/living/simple_animal/hostile/retaliate/clown/attack_hand(mob/living/carbon/human/M)
..()
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
@@ -55,9 +55,14 @@
///How much stamina the mob recovers per call of update_stamina
var/stamina_recovery = 10
///Temperature effect.
///Minimal body temperature without receiving damage
var/minbodytemp = 250
///Maximal body temperature without receiving damage
var/maxbodytemp = 350
///This damage is taken when the body temp is too cold.
var/unsuitable_cold_damage
///This damage is taken when the body temp is too hot.
var/unsuitable_heat_damage
///Healable by medical stacks? Defaults to yes.
var/healable = 1
@@ -198,6 +203,10 @@
damage_coeff = string_assoc_list(damage_coeff)
if(footstep_type)
AddComponent(/datum/component/footstep, footstep_type)
if(!unsuitable_cold_damage)
unsuitable_cold_damage = unsuitable_atmos_damage
if(!unsuitable_heat_damage)
unsuitable_heat_damage = unsuitable_atmos_damage
/mob/living/simple_animal/Life()
. = ..()
@@ -396,8 +405,8 @@
/mob/living/simple_animal/proc/handle_temperature_damage()
if(bodytemperature < minbodytemp)
adjustHealth(unsuitable_atmos_damage)
switch(unsuitable_atmos_damage)
adjustHealth(unsuitable_cold_damage)
switch(unsuitable_cold_damage)
if(1 to 5)
throw_alert("temp", /atom/movable/screen/alert/cold, 1)
if(5 to 10)
@@ -405,8 +414,8 @@
if(10 to INFINITY)
throw_alert("temp", /atom/movable/screen/alert/cold, 3)
else if(bodytemperature > maxbodytemp)
adjustHealth(unsuitable_atmos_damage)
switch(unsuitable_atmos_damage)
adjustHealth(unsuitable_heat_damage)
switch(unsuitable_heat_damage)
if(1 to 5)
throw_alert("temp", /atom/movable/screen/alert/hot, 1)
if(5 to 10)