From 70f0ccc02b1d8dfde1c1f2c6ea1fb8bbaa0ed598 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 17 May 2024 19:33:52 -0500 Subject: [PATCH 1/2] fixes create and destroy fail --- code/modules/mob/living/carbon/human/human_defense.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 123ecf6d4fba..7898509dacb3 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -498,6 +498,10 @@ else if(!(flags & SHOCK_NOGLOVES)) //This gets the siemens_coeff for all non tesla shocks if(gloves) siemens_coeff *= gloves.siemens_coefficient + //If it doesnt have physiology its prob still initializing. + if(!physiology) + . = ..() + return siemens_coeff *= physiology.siemens_coeff siemens_coeff *= dna.species.siemens_coeff . = ..() From 50bb3218e6a7c69b22156a17f99937eb1b61551b Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 17 May 2024 19:35:02 -0500 Subject: [PATCH 2/2] put it at the front so we just dont. --- code/modules/mob/living/carbon/human/human_defense.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 7898509dacb3..e437ba3e13d9 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -485,6 +485,9 @@ ///Calculates the siemens coeff based on clothing and species, can also restart hearts. /mob/living/carbon/human/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE) + //If it doesnt have physiology its prob still initializing. + if(!physiology) + return //Calculates the siemens coeff based on clothing. Completely ignores the arguments if(flags & SHOCK_TESLA) //I hate this entire block. This gets the siemens_coeff for tesla shocks if(gloves && gloves.siemens_coefficient <= 0) @@ -498,10 +501,6 @@ else if(!(flags & SHOCK_NOGLOVES)) //This gets the siemens_coeff for all non tesla shocks if(gloves) siemens_coeff *= gloves.siemens_coefficient - //If it doesnt have physiology its prob still initializing. - if(!physiology) - . = ..() - return siemens_coeff *= physiology.siemens_coeff siemens_coeff *= dna.species.siemens_coeff . = ..()