mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 11:32:20 +00:00
* Removes like 50% of the cost of using the ui, it turns out that the storage component is fucking moronic. Likely significantly reduces the overtime of typecacheof * Reduces the cost of reloading the dummy by ~50% Turns out just initializing and deleting organs was like half the cost of reloading a default dummy. It occured to me (Mothblocks) that we don't actually care about any organs we can't see or that don't effect visuals. So almost all of our organ loading can just be skipped. This saves a significant chunk of cpu time, items next! Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
26 lines
1.2 KiB
Plaintext
26 lines
1.2 KiB
Plaintext
///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
|