Files
Bubberstation/code/modules/unit_tests/interaction_door.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

14 lines
753 B
Plaintext

/// Tests that airlocks can be closed by clicking on the floor, as [/datum/component/redirect_attack_hand_from_turf ] dictates
/datum/unit_test/door_click
/datum/unit_test/door_click/Run()
var/mob/living/carbon/human/consistent/tider = EASY_ALLOCATE()
var/obj/machinery/door/airlock/public/glass/door = EASY_ALLOCATE()
tider.forceMove(locate(door.x + 1, door.y, door.z))
door.open() // this sleeps we just have to cope
TEST_ASSERT(!door.operating, "Airlock was operating after being opened.")
TEST_ASSERT(!door.density, "Airlock was not open after being opened.")
click_wrapper(tider, get_turf(door))
TEST_ASSERT(door.operating, "Airlock was not closing after clicking the turf below, as per /datum/component/redirect_attack_hand_from_turf.")