From 04efb69dd4de84b2cb879b7cb86c2bfe3ea4c93a Mon Sep 17 00:00:00 2001 From: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Date: Mon, 8 Mar 2021 22:58:00 -0800 Subject: [PATCH] Fix 2.4 damage test bug, with proof (#57560) I tracked down every source of damage, and just ran the test 100 times until it failed. It was shrapnel. I made the victim pierce immune, meaning they'll never take embeds. --- code/modules/unit_tests/projectiles.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/unit_tests/projectiles.dm b/code/modules/unit_tests/projectiles.dm index 00350a853a1..a55ff7ee674 100644 --- a/code/modules/unit_tests/projectiles.dm +++ b/code/modules/unit_tests/projectiles.dm @@ -9,6 +9,7 @@ var/obj/item/gun/test_gun = allocate(/obj/item/gun/ballistic/automatic/pistol) var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) var/mob/living/carbon/human/gunner = allocate(/mob/living/carbon/human) + ADD_TRAIT(victim, TRAIT_PIERCEIMMUNE, INNATE_TRAIT) // So the human isn't randomly affected by shrapnel var/obj/item/ammo_casing/loaded_casing = test_gun.chambered TEST_ASSERT(loaded_casing, "Gun started without round chambered, should be loaded")