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.
This commit is contained in:
Mothblocks
2021-03-08 22:58:00 -08:00
committed by GitHub
parent 3303894d64
commit 04efb69dd4
+1
View File
@@ -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")