Files
Bubberstation/code/modules/unit_tests/dropper.dm
MrMelbert 34d35c6048 Adds a bunch of interaction related unit tests (#88210)
## About The Pull Request

I made these a year ago and meant to PR them but never got around to it

Basically just adds a bunch of unit tests for a bunch of specific attack
chain interactions that are prone to breaking due to snowflake

Increasing coverage of attack chain is good so people who are working on
it don't have to worry about the 1000 edge cases breaking

- Blocking (both unarmed and armed)
- Cuffs
- Eyestab
- Flashes (combat mode, non combat mode, with flash protection)
- Help intent
- Pistol whip
- Butchering with a bayonet 
- Damp rag smothering
- Droppers
- EMP flashlights
- Holofans
- Door attack hand redirector
- Tool usage on Cyborgs
- Punching Cyborgs
- Ability to bash tables
- Ability to bash any structure
- Ability to use tools on machinery
- Kinetic Crusher projectile
- Spraycans (capping, making graffiti) 
- Loading a syringe gun
2024-11-27 11:38:43 -07:00

22 lines
1.0 KiB
Plaintext

/// Tests the droppper picks up and dispenses reagents correctly.
/datum/unit_test/dropper_use
/datum/unit_test/dropper_use/Run()
var/mob/living/carbon/human/consistent/chemist = EASY_ALLOCATE()
var/obj/item/reagent_containers/dropper/dropper = EASY_ALLOCATE()
var/obj/item/reagent_containers/cup/beaker/large/beaker = EASY_ALLOCATE()
var/starting_volume = 50
beaker.reagents.add_reagent(/datum/reagent/water, starting_volume)
chemist.put_in_active_hand(dropper, forced = TRUE)
click_wrapper(chemist, beaker)
TEST_ASSERT_EQUAL(dropper.reagents.total_volume, 5, "Dropper should have taken 5 units of reagents from the beaker.")
TEST_ASSERT_EQUAL(beaker.reagents.total_volume, starting_volume - 5, "Beaker should have transferred reagents to the dropper.")
click_wrapper(chemist, beaker)
TEST_ASSERT_EQUAL(dropper.reagents.total_volume, 0, "Dropper should have emptied itself into the beaker.")
TEST_ASSERT_EQUAL(beaker.reagents.total_volume, starting_volume, "Beaker should have received reagents from the dropper.")