From 711eb0501c369aca2c55dc59506d9bf56cb07b47 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 5 Jun 2015 21:13:34 +0200 Subject: [PATCH 1/5] Fixes #9697 Replaces and closes the --- code/modules/mob/living/carbon/human/life.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 472833dcb07..f7e23fc3c41 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1491,7 +1491,7 @@ return if(shock_stage == 10) - src << ""+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!") + src << "[pick("It hurts so much", "You really need some painkillers", "Dear god, the pain")]!" if(shock_stage >= 30) if(shock_stage == 30) emote("me",1,"is having trouble keeping their eyes open.") @@ -1499,22 +1499,22 @@ stuttering = max(stuttering, 5) if(shock_stage == 40) - src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!") + src << "[pick("The pain is excruciating", "Please, just end the pain", "Your whole body is going numb")]!" if (shock_stage >= 60) if(shock_stage == 60) emote("me",1,"'s body becomes limp.") if (prob(2)) - src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!") + src << "[pick("The pain is excruciating", "Please, just end the pain", "Your whole body is going numb")]!" Weaken(20) if(shock_stage >= 80) if (prob(5)) - src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!") + src << "[pick("The pain is excruciating", "Please, just end the pain", "Your whole body is going numb")]!" Weaken(20) if(shock_stage >= 120) if (prob(2)) - src << ""+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness.") + src << "[pick("You black out", "You feel like you could die any moment now", "You're about to lose consciousness")]!" Paralyse(5) if(shock_stage == 150) From fb1904ef4e81095b64beba7cde36b9449c5c96a3 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Sat, 6 Jun 2015 02:23:06 +0100 Subject: [PATCH 2/5] Fixes a pair of null.z runtimes Fixes explosions with multiz maps breaking if the epicenter is null Fixes supermatter trying to irradiate mobs in nullspace crashing the proc --- code/game/objects/explosion.dm | 8 ++++---- code/modules/supermatter/supermatter.dm | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 32f05901b4a..9c61234a077 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -16,16 +16,16 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa explosion_rec(epicenter, power) return + var/start = world.timeofday + epicenter = get_turf(epicenter) + if(!epicenter) return + ///// Z-Level Stuff if(z_transfer && (devastation_range > 0 || heavy_impact_range > 0)) //transfer the explosion in both directions explosion_z_transfer(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range) ///// Z-Level Stuff - var/start = world.timeofday - epicenter = get_turf(epicenter) - if(!epicenter) return - var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flash_range) //playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) ) //playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) ) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 6cdf0c3e91d..43ff63833d6 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -102,7 +102,8 @@ grav_pulling = 1 exploded = 1 for(var/mob/living/mob in living_mob_list) - if(loc.z == mob.loc.z) + var/turf/T = get_turf(mob) + if(T && (loc.z == T.z)) if(istype(mob, /mob/living/carbon/human)) //Hilariously enough, running into a closet should make you get hit the hardest. var/mob/living/carbon/human/H = mob From cbead4224b56f2630c2574d5712924073836c176 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 6 Jun 2015 15:44:49 +0200 Subject: [PATCH 3/5] Fixes #9685. Observer from the lobby do not have minds, while observers that once lived do. Re-arranges the MayRespawn() logic to handle these situation. --- code/modules/mob/dead/observer/observer.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index e9f000eb3f2..f65b07b2c79 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -620,9 +620,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return 1 mob/dead/observer/MayRespawn(var/feedback = 0) - if(!client || !mind) + if(!client) return 0 - if(mind.current && mind.current.stat != DEAD) + if(mind && mind.current && mind.current.stat != DEAD) if(feedback) src << "Your non-dead body prevent you from respawning." return 0 From 636ead5bbebc7f5b71c3155ab9f324bbed8a7a1d Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 6 Jun 2015 22:16:51 -0400 Subject: [PATCH 4/5] Makes reagents_explosion apply bombcap in the same manner as tank transfer valves. Also fixed reagents_explosion/start() checking the flash var instead of the flashing var. Fixes #8280 --- code/game/objects/effects/effect_system.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index ea9af2f70fe..1af12f3606c 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -739,23 +739,23 @@ steam.start() -- spawns the effect var/light = -1 var/flash = -1 - // Clamp all values to max_explosion_range + // Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs if (round(amount/12) > 0) - devastation = min (max_explosion_range, devastation + round(amount/12)) + devastation = min (max_explosion_range*0.25, devastation + amount/12) if (round(amount/6) > 0) - heavy = min (max_explosion_range, heavy + round(amount/6)) + heavy = min (max_explosion_range*0.5, heavy + amount/6) if (round(amount/3) > 0) - light = min (max_explosion_range, light + round(amount/3)) + light = min (max_explosion_range, light + amount/3) - if (flash && flashing_factor) - flash += (round(amount/4) * flashing_factor) + if (flashing && flashing_factor) + flash = min (max_explosion_range*1.5, ((amount/4) * flashing_factor)) for(var/mob/M in viewers(8, location)) M << "\red The solution violently explodes." - explosion(location, devastation, heavy, light, flash) + explosion(location, round(devastation), round(heavy), round(light), round(flash)) proc/holder_damage(var/atom/holder) if(holder) From 821285bcee802c30fcc91a0cfb93838d528391bf Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 6 Jun 2015 22:38:56 -0400 Subject: [PATCH 5/5] Adds defines for bombcap components --- code/game/objects/effects/effect_system.dm | 18 ++++++++++++------ code/game/objects/items/weapons/tanks/tanks.dm | 15 +++++++++------ code/setup.dm | 5 +++++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 1af12f3606c..f412ba838d0 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -734,28 +734,34 @@ steam.start() -- spawns the effect M.Weaken(rand(1,5)) return else - var/devastation = -1 + var/devst = -1 var/heavy = -1 var/light = -1 var/flash = -1 // Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs if (round(amount/12) > 0) - devastation = min (max_explosion_range*0.25, devastation + amount/12) + devst = devst + amount/12 if (round(amount/6) > 0) - heavy = min (max_explosion_range*0.5, heavy + amount/6) + heavy = heavy + amount/6 if (round(amount/3) > 0) - light = min (max_explosion_range, light + amount/3) + light = light + amount/3 if (flashing && flashing_factor) - flash = min (max_explosion_range*1.5, ((amount/4) * flashing_factor)) + flash = (amount/4) * flashing_factor for(var/mob/M in viewers(8, location)) M << "\red The solution violently explodes." - explosion(location, round(devastation), round(heavy), round(light), round(flash)) + explosion( + location, + round(min(devst, BOMBCAP_DVSTN_RADIUS)), + round(min(heavy, BOMBCAP_HEAVY_RADIUS)), + round(min(light, BOMBCAP_LIGHT_RADIUS)), + round(min(flash, BOMBCAP_FLASH_RADIUS)) + ) proc/holder_damage(var/atom/holder) if(holder) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 551e4790dc2..cf65f483e01 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -261,19 +261,22 @@ if(!istype(src.loc,/obj/item/device/transfer_valve)) message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].") log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].") - //world << "\blue[x],[y] tank is exploding: [pressure] kPa" + //Give the gas a chance to build up more pressure through reacting air_contents.react() air_contents.react() air_contents.react() + pressure = air_contents.return_pressure() var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE - range = min(range, max_explosion_range) // was 8 - - - Changed to a configurable define -- TLE - var/turf/epicenter = get_turf(loc) - //world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]" - - explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) + explosion( + get_turf(loc), + round(min(BOMBCAP_DVSTN_RADIUS, range*0.25)), + round(min(BOMBCAP_HEAVY_RADIUS, range*0.50)), + round(min(BOMBCAP_LIGHT_RADIUS, range*1.00)), + round(min(BOMBCAP_FLASH_RADIUS, range*1.50)), + ) del(src) else if(pressure > TANK_RUPTURE_PRESSURE) diff --git a/code/setup.dm b/code/setup.dm index e127925632f..7faa91e45a2 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -773,3 +773,8 @@ var/list/be_special_flags = list( #define ROBOT_NOTIFICATION_NEW_NAME 2 #define ROBOT_NOTIFICATION_NEW_MODULE 3 #define ROBOT_NOTIFICATION_MODULE_RESET 4 + +#define BOMBCAP_DVSTN_RADIUS (max_explosion_range/4) +#define BOMBCAP_HEAVY_RADIUS (max_explosion_range/2) +#define BOMBCAP_LIGHT_RADIUS max_explosion_range +#define BOMBCAP_FLASH_RADIUS (max_explosion_range*1.5)