mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Speeds up the preference menu, significantly. Adds object pooling, other stuff too [MDB IGNORE] (#9962)
* Speeds up the preference menu, significantly. Adds object pooling, other stuff too * First fixes * Feex * Quick fix for the unit test to shut up * Fixing the runtime with randomly-colored jumpsuits * Fixes that one hard del Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
LemonInTheDark
GoldenAlpharex
GoldenAlpharex
parent
f7a4750b59
commit
b7164873d4
@@ -62,6 +62,7 @@
|
||||
#include "crayons.dm"
|
||||
#include "create_and_destroy.dm"
|
||||
#include "designs.dm"
|
||||
#include "dummy_spawn.dm"
|
||||
#include "dynamic_ruleset_sanity.dm"
|
||||
#include "egg_glands.dm"
|
||||
#include "emoting.dm"
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
///This set of tests is focused on ensuring the stability of preference dummies
|
||||
///And by extension the hacks built to make them fast
|
||||
///Organ consistency, object pooling via the wardrobe ss, etc
|
||||
|
||||
//Test spawning one of every species
|
||||
/datum/unit_test/dummy_spawn_species
|
||||
|
||||
/datum/unit_test/dummy_spawn_species/Run()
|
||||
var/mob/living/carbon/human/dummy/lad = allocate(/mob/living/carbon/human/dummy)
|
||||
for(var/datum/species/testing_testing as anything in subtypesof(/datum/species))
|
||||
lad.set_species(testing_testing, icon_update = FALSE, pref_load = TRUE) //I wonder if I should somehow hook into the species pref here
|
||||
|
||||
///Equips and devests our dummy of one of every job outfit
|
||||
/datum/unit_test/dummy_spawn_outfit
|
||||
|
||||
/datum/unit_test/dummy_spawn_outfit/Run()
|
||||
var/mob/living/carbon/human/dummy/lad = allocate(/mob/living/carbon/human/dummy)
|
||||
for(var/datum/job/one_two_three as anything in subtypesof(/datum/job))
|
||||
var/datum/job/can_you_hear_this = SSjob.GetJobType(one_two_three)
|
||||
if(!can_you_hear_this)
|
||||
log_world("Job type [one_two_three] could not be retrieved from SSjob")
|
||||
continue
|
||||
lad.job = can_you_hear_this
|
||||
lad.dress_up_as_job(can_you_hear_this, TRUE)
|
||||
lad.wipe_state() //Nuke it all
|
||||
Reference in New Issue
Block a user