mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-03 21:42:06 +00:00
[MIRROR] Optimize cardboard cutouts saving 1.5s+ on init times [MDB IGNORE] (#19435)
* Optimize cardboard cutouts saving 1.5s+ on init times (#73404) New regression in init times. Closes https://github.com/tgstation/dev-cycles-initiative/issues/32. CC @ Fikou - Instead of creating a human and icon for *every* cardboard cutout when initialized, only creates the one we're actually using. When you're about to use a crayon, creates all of them. - Instead of using getFlatIcon, uses appearances directly. * Optimize cardboard cutouts saving 1.5s+ on init times --------- Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -387,8 +387,6 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
|
||||
var/l_hand = NO_REPLACE
|
||||
/// Which slots on the mob should be bloody?
|
||||
var/bloody_slots = NONE
|
||||
/// Directions we generate for the mob.
|
||||
var/generated_dirs = list(NORTH, SOUTH, EAST, WEST)
|
||||
/// Do we draw more than one frame for the mob?
|
||||
var/animated = TRUE
|
||||
|
||||
@@ -406,7 +404,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/mapping_helpers/atom_injector/human_icon_injector/inject(atom/target)
|
||||
apply_dynamic_human_icon(target, outfit_path, species_path, mob_spawn_path, r_hand, l_hand, bloody_slots, generated_dirs, animated)
|
||||
apply_dynamic_human_appearance(target, outfit_path, species_path, mob_spawn_path, r_hand, l_hand, bloody_slots, animated)
|
||||
|
||||
/obj/effect/mapping_helpers/atom_injector/human_icon_injector/generate_stack_trace()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user