Chainsaw nullrod fix (#93283)

## About The Pull Request

Fixes #93280

It would give you the null rod arm, then equip the null rod, then try to
give you the null rod arm again, which removed your null rod arm and
caused... problems

## Changelog

🆑 Melbert
fix: Fixed chainsaw nullrod
/🆑
This commit is contained in:
MrMelbert
2025-10-05 16:24:35 -06:00
committed by GitHub
parent 99b105630f
commit 601f6faea5
3 changed files with 27 additions and 1 deletions
+22
View File
@@ -131,3 +131,25 @@
basic_brute_heal.success(user, clothed_patient, BODY_ZONE_CHEST)
TEST_ASSERT(naked_patient.getBruteLoss() < clothed_patient.getBruteLoss(), "Naked patient did not heal more from wounds tending than a clothed patient")
/// Tests items-as-prosthetic-limbs can apply
/datum/unit_test/prosthetic_item
/datum/unit_test/prosthetic_item/Run()
var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human/consistent)
var/obj/item/claymore/sword = allocate(/obj/item/claymore)
patient.make_item_prosthetic(sword)
TEST_ASSERT(HAS_TRAIT_FROM(sword, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT), "Prosthetic item attachment failed! Item does not have the nodrop trait")
/// Specifically checks the chainsaw nullrod
/datum/unit_test/prosthetic_item/nullrod
/datum/unit_test/prosthetic_item/nullrod/Run()
var/mob/living/carbon/human/picker = allocate(/mob/living/carbon/human/consistent)
var/obj/item/nullrod/chainsaw/nullrod = allocate(/obj/item/nullrod/chainsaw)
nullrod.on_selected(null, picker)
TEST_ASSERT(HAS_TRAIT_FROM(nullrod, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT), "Chainsaw nullrod item attachment failed! Item does not have the nodrop trait")