mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
fixes verbs not actually queuing. (#68990)
thanks to Vallat for pointing this out whoops turns out most verbs havent been queued since may 11th because I made /datum/controller/subsystem/verb_manager have the SS_NO_INIT flag, without also removing a check in verb_manager/proc/can_queue_verb() that stops the verb callback from being queued if the subsystem isnt initialized yet. since subsystems with SS_NO_INIT obviously never have initialized set to TRUE, this always failed for every verb manager subsystem except for SSinput (because it doesnt have SS_NO_INIT). also adds a debug var to force a subsystem to always queue incoming verbs if possible. now the default verb management subsystem, and speech_controller will successfully queue verbs again. SSinput always queued verbs so that shouldnt change.
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
// Stop, drop, and roll has a sleep call. This would delay the test, and is not necessary.
|
||||
call_async(human, /mob/living/verb/resist)
|
||||
|
||||
//since resist() is a verb that possibly queues its actual execution 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.fire_stacks < 5, "Human did not lower fire stacks after resisting")
|
||||
|
||||
/// Test that you can resist out of a container
|
||||
@@ -26,4 +30,9 @@
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user