From 7c2224b88039f7e2f3e70225309aff8764cafc19 Mon Sep 17 00:00:00 2001 From: Markolie Date: Fri, 27 Feb 2015 21:11:36 +0100 Subject: [PATCH 1/3] Temperature fixes --- code/modules/mob/living/carbon/carbon.dm | 4 --- code/modules/mob/living/carbon/human/life.dm | 38 ++++++++++---------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index b8c50d3a362..90ff4d4841f 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -449,10 +449,6 @@ item.throw_at(target, item.throw_range, item.throw_speed, src) -/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - ..() - bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10) - /mob/living/carbon/can_use_hands() if(handcuffed) return 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 95dee276004..b821d8881e4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -576,32 +576,30 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc //Body temperature is too hot. fire_alert = max(fire_alert, 1) if(status_flags & GODMODE) return 1 //godmode - switch(bodytemperature) - if(species.heat_level_1 to species.heat_level_2) - take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 2) - if(species.heat_level_2 to species.heat_level_3) - take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 2) - if(species.heat_level_3 to INFINITY) - take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 2) + if(bodytemperature >= species.heat_level_1 && bodytemperature <= species.heat_level_2) + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 2) + if(bodytemperature > species.heat_level_2 && bodytemperature <= species.heat_level_3) + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 2) + if(bodytemperature > species.heat_level_3 && bodytemperature < INFINITY) + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 2) else if(bodytemperature < species.cold_level_1) fire_alert = max(fire_alert, 1) if(status_flags & GODMODE) return 1 //godmode if(stat == DEAD) return 1 //ZomgPonies -- No need for cold burn damage if dead if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) - switch(bodytemperature) - if(species.cold_level_2 to species.cold_level_1) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 1) - if(species.cold_level_3 to species.cold_level_2) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 1) - if(-INFINITY to species.cold_level_3) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 1) + if(bodytemperature >= species.cold_level_2 && bodytemperature <= species.cold_level_1) + take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 1) + if(bodytemperature >= species.cold_level_3 && bodytemperature < species.cold_level_2) + take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 1) + if(bodytemperature > -INFINITY && bodytemperature < species.cold_level_3) + take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 1) // Account for massive pressure differences. Done by Polymorph // Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense! From 42935580dacad66f614c86dd9a5e86a62208756f Mon Sep 17 00:00:00 2001 From: Markolie Date: Fri, 27 Feb 2015 21:32:31 +0100 Subject: [PATCH 2/3] Adjust cold temperature message --- code/modules/mob/living/carbon/human/life.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b821d8881e4..8cb97661611 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -592,13 +592,13 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc if(stat == DEAD) return 1 //ZomgPonies -- No need for cold burn damage if dead if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) if(bodytemperature >= species.cold_level_2 && bodytemperature <= species.cold_level_1) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") + take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "Low Body Temperature") fire_alert = max(fire_alert, 1) if(bodytemperature >= species.cold_level_3 && bodytemperature < species.cold_level_2) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") + take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "Low Body Temperature") fire_alert = max(fire_alert, 1) if(bodytemperature > -INFINITY && bodytemperature < species.cold_level_3) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") + take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "Low Body Temperature") fire_alert = max(fire_alert, 1) // Account for massive pressure differences. Done by Polymorph From a735e6855ce9f290abc0990ecba385fb74ad3f44 Mon Sep 17 00:00:00 2001 From: Markolie Date: Sat, 28 Feb 2015 15:44:43 +0100 Subject: [PATCH 3/3] Reduce malf ticker time, update fire damage, fix breathing --- code/game/gamemodes/malfunction/malfunction.dm | 2 +- code/game/objects/structures/displaycase.dm | 7 ++++--- code/modules/mob/living/carbon/_defines.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 8 ++++++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 64656fb1a7e..4684d94410d 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -15,7 +15,7 @@ var/const/waittime_l = 600 var/const/waittime_h = 1800 // started at 1800 - var/AI_win_timeleft = 2000 //started at 2000, in case I change this for testing round end. + var/AI_win_timeleft = 1500 //started at 1500, in case I change this for testing round end. var/malf_mode_declared = 0 var/station_captured = 0 var/to_nuke_or_not_to_nuke = 0 diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index f153035fede..ff47eec90fa 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -72,10 +72,11 @@ desc = "A display case for the captain's antique laser gun. It taunts you to kick it." /obj/structure/displaycase/captains_laser/New() - req_access = list(access_captain) - occupant = new /obj/item/weapon/gun/energy/laser/captain(src) + req_access = list(access_captain) locked = 1 - update_icon() + spawn(5) + occupant = new /obj/item/weapon/gun/energy/laser/captain(src) + update_icon() /obj/structure/proc/getPrint(mob/user as mob) return md5(user:dna:uni_identity) diff --git a/code/modules/mob/living/carbon/_defines.dm b/code/modules/mob/living/carbon/_defines.dm index aa8fa28c131..2abbbf91cbc 100644 --- a/code/modules/mob/living/carbon/_defines.dm +++ b/code/modules/mob/living/carbon/_defines.dm @@ -1,6 +1,6 @@ //NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick! #define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it. -#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /5) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks. +#define HUMAN_CRIT_MAX_OXYLOSS ( (tickerProcess.getLastTickerTimeDuration()) / 3) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks. #define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point #define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8cb97661611..fead221fbf0 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -583,8 +583,12 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") fire_alert = max(fire_alert, 2) if(bodytemperature > species.heat_level_3 && bodytemperature < INFINITY) - take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 2) + if(on_fire) + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "Fire") + fire_alert = max(fire_alert, 2) + else + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 2) else if(bodytemperature < species.cold_level_1) fire_alert = max(fire_alert, 1)