Skip to content

Commit

Permalink
whoops 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSuckerberg committed Sep 16, 2023
1 parent b8c6c50 commit 8a7d2f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/MC.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
/datum/controller/subsystem/verb_manager/##X/New(){\
NEW_SS_GLOBAL(SS##X);\
PreInit();\
ss_id="verb_manager_[#X]";\
}\
/datum/controller/subsystem/verb_manager/##X/fire() {..() /*just so it shows up on the profiler*/} \
/datum/controller/subsystem/verb_manager/##X
4 changes: 3 additions & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(

//check if the server is overloaded and if it is then queue up the click for next tick
//yes having it call a wrapping proc on the subsystem is fucking stupid glad we agree unfortunately byond insists its reasonable
if(!QDELETED(object) && TRY_QUEUE_VERB(VERB_CALLBACK(object, /atom/proc/_Click, location, control, params), VERB_HIGH_PRIORITY_QUEUE_THRESHOLD, SSinput, control))
/* disabled for responsiveness & prevention of unintentional duplicate clicks
if(!QDELETED(object) && TRY_QUEUE_VERB(VERB_CALLBACK(object, /atom/proc/_Click, location, control, params), VERB_OVERTIME_QUEUE_THRESHOLD, SSinput, control))
return
*/

if (prefs.hotkeys)
winset(src, null, "input.focus=false")
Expand Down
19 changes: 0 additions & 19 deletions code/modules/unit_tests/resist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,3 @@
SSverb_manager.run_verb_queue()

TEST_ASSERT(human.fire_stacks < 5, "Human did not lower fire stacks after resisting")

/// Test that you can resist out of a container
/datum/unit_test/container_resist/Run()
var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)
var/obj/structure/closet/closet = allocate(/obj/structure/closet, get_turf(human))

closet.open(human)
TEST_ASSERT(!(human in closet.contents), "Human was in the contents of an open closet")

closet.close(human)
TEST_ASSERT(human in closet.contents, "Human was not in the contents of the closed closet")

human.resist()

//since resist() is a verb that possibly queues itself for the next tick, we need to make the subsystem that handles the delayed execution process
//the callback. either that or sleep ourselves and see if it ran.
SSverb_manager.run_verb_queue()

TEST_ASSERT(!(human in closet.contents), "Human resisted out of a standard closet, but was still in it")

0 comments on commit 8a7d2f5

Please sign in to comment.