From d8df59a24483b361922e44b30fc967f3781e2901 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Thu, 31 Jul 2014 11:38:19 +0200 Subject: [PATCH 1/3] Fixes #5844 by only having a supermatter explosion affect living entities on the same Z-level. --- code/modules/supermatter/supermatter.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index e7e3cc4972f..5402957fcd8 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -141,11 +141,12 @@ if(damage > explosion_point) for(var/mob/living/mob in living_mob_list) - if(istype(mob, /mob/living/carbon/human)) - //Hilariously enough, running into a closet should make you get hit the hardest. - mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) ) - var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) ) - mob.apply_effect(rads, IRRADIATE) + if(mob.loc.z == loc.z) + if(istype(mob, /mob/living/carbon/human)) + //Hilariously enough, running into a closet should make you get hit the hardest. + mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) ) + var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) ) + mob.apply_effect(rads, IRRADIATE) explode() else From ba247ffa40303b66690f68d1acf9c53c17a9c963 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Thu, 31 Jul 2014 12:01:45 +0200 Subject: [PATCH 2/3] Recasts objects to avoid usage of : --- code/modules/supermatter/supermatter.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 5402957fcd8..9db1f4addd4 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -141,10 +141,11 @@ if(damage > explosion_point) for(var/mob/living/mob in living_mob_list) - if(mob.loc.z == loc.z) + if(loc.z == mob.loc.z) if(istype(mob, /mob/living/carbon/human)) //Hilariously enough, running into a closet should make you get hit the hardest. - mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) ) + var/mob/living/carbon/human/H = mob + H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) ) var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) ) mob.apply_effect(rads, IRRADIATE) @@ -335,7 +336,8 @@ if(!X:anchored) //unanchored objects pulled twice as fast step_towards(X,src) if(istype(X, /obj/structure/window)) //shatter windows - X.ex_act(2.0) + var/obj/structure/window/W = X + W.ex_act(2.0) else if(istype(X,/mob/living/carbon/human)) var/mob/living/carbon/human/H = X if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) From da4dd93e7575cc14631bf0189ee61f60cad6412d Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Thu, 31 Jul 2014 14:24:39 +0200 Subject: [PATCH 3/3] Is a little convoluted but this removes the last X: use in supermatter.dm --- code/modules/supermatter/supermatter.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 9db1f4addd4..ce36d810747 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -333,7 +333,11 @@ if(is_type_in_list(X, uneatable)) continue if(((X) && (!istype(X,/mob/living/carbon/human)))) step_towards(X,src) - if(!X:anchored) //unanchored objects pulled twice as fast + if(istype(X, /obj)) //unanchored objects pulled twice as fast + var/obj/O = X + if(!O.anchored) + step_towards(X,src) + else step_towards(X,src) if(istype(X, /obj/structure/window)) //shatter windows var/obj/structure/window/W = X