Files
Bubberstation/code/modules/unit_tests/wizard.dm
SkyratBot 27f9b1041f [MIRROR] Fix Wizard Loadouts from the Wizard Spellbook crashing the server. (#5566)
* Fix Wizard Loadouts from the Wizard Spellbook crashing the server. (#58939)

* Fix Wizard Loadouts from the Wizard Spellbook crashing the server.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2021-05-09 23:39:05 +01:00

13 lines
666 B
Plaintext

// Once upon a time, a Game Master decided to upgrade the wizard's spellbook to tgui.
// In doing so, he introduced an infinite loop that crashed many servers and made many wizards sad.
// May this never happen again.
/// Test loadouts for crashes, runtimes, stack traces and infinite loops. No ASSERTs necessary.
/datum/unit_test/wizard_loadout/Run()
for(var/loadout in ALL_WIZARD_LOADOUTS)
var/obj/item/spellbook/wizard_book = allocate(/obj/item/spellbook)
var/mob/living/carbon/human/wizard = allocate(/mob/living/carbon/human)
wizard.mind_initialize()
wizard.put_in_active_hand(wizard_book, forced = TRUE)
wizard_book.wizard_loadout(wizard, loadout)