mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Fix buckling and probably a lot more mousedrop interactions (#93352)
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
#include "blindness.dm"
|
||||
#include "bloody_footprints.dm"
|
||||
#include "breath.dm"
|
||||
#include "buckle.dm"
|
||||
#include "burning.dm"
|
||||
#include "cable_powernets.dm"
|
||||
#include "can_see.dm"
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/// Test you can buckle yourself to a chair
|
||||
/datum/unit_test/buckling_self
|
||||
|
||||
/datum/unit_test/buckling_self/Run()
|
||||
var/mob/living/carbon/human/consistent/dummy = EASY_ALLOCATE()
|
||||
dummy.mock_client = new()
|
||||
var/obj/structure/chair/chair = EASY_ALLOCATE()
|
||||
|
||||
var/old_usr = usr
|
||||
|
||||
usr = dummy // mouse drop still uses usr
|
||||
|
||||
dummy.MouseDrop(chair)
|
||||
if(dummy.buckled != chair)
|
||||
TEST_FAIL("The dummy failed to buckle themselves to a chair via mouse drop.")
|
||||
|
||||
usr = old_usr
|
||||
|
||||
/// Test you can buckle someone else to a chair
|
||||
/datum/unit_test/buckling_others
|
||||
|
||||
/datum/unit_test/buckling_others/Run()
|
||||
var/mob/living/carbon/human/consistent/dummy = EASY_ALLOCATE()
|
||||
dummy.mock_client = new()
|
||||
var/mob/living/carbon/human/consistent/victim = EASY_ALLOCATE()
|
||||
var/obj/structure/chair/chair = EASY_ALLOCATE()
|
||||
|
||||
var/old_usr = usr
|
||||
|
||||
usr = dummy // mouse drop still uses usr
|
||||
|
||||
victim.MouseDrop(chair)
|
||||
if(victim.buckled != chair)
|
||||
TEST_FAIL("The dummy failed to buckle the victim to a chair via mouse drop.")
|
||||
|
||||
usr = old_usr
|
||||
Reference in New Issue
Block a user