mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Crop moth wings to 32x32, saving about 0.18s in init time (yes really) (#71243)
Crops all moth wings to 32x32 and saves the very expensive Crop cost in the preference icon generation for moth wings.
This commit is contained in:
@@ -86,17 +86,11 @@
|
||||
should_generate_icons = TRUE
|
||||
|
||||
/datum/preference/choiced/moth_wings/init_possible_values()
|
||||
var/list/icon/values = possible_values_for_sprite_accessory_list_for_body_part(
|
||||
return possible_values_for_sprite_accessory_list_for_body_part(
|
||||
GLOB.moth_wings_list,
|
||||
"moth_wings",
|
||||
list("BEHIND", "FRONT"),
|
||||
)
|
||||
|
||||
// Moth wings are in a stupid dimension
|
||||
for (var/name in values)
|
||||
values[name].Crop(1, 1, 32, 32)
|
||||
|
||||
return values
|
||||
|
||||
/datum/preference/choiced/moth_wings/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.dna.features["moth_wings"] = value
|
||||
|
||||
Reference in New Issue
Block a user