mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
fixes pod hair tgui bug (#65695)
This commit is contained in:
@@ -3,10 +3,27 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
category = PREFERENCE_CATEGORY_FEATURES
|
||||
main_feature_name = "Hairstyle"
|
||||
should_generate_icons = FALSE
|
||||
should_generate_icons = TRUE
|
||||
|
||||
/datum/preference/choiced/pod_hair/init_possible_values()
|
||||
return GLOB.pod_hair_list
|
||||
var/list/values = list()
|
||||
|
||||
var/icon/pod_head = icon('icons/mob/human_parts.dmi', "pod_head_m")
|
||||
|
||||
for (var/pod_name in GLOB.pod_hair_list)
|
||||
var/datum/sprite_accessory/pod_hair = GLOB.pod_hair_list[pod_name]
|
||||
|
||||
var/icon/icon_with_hair = new(pod_head)
|
||||
var/icon/icon_adj = icon(pod_hair.icon, "m_pod_hair_[pod_hair.icon_state]_ADJ")
|
||||
var/icon/icon_front = icon(pod_hair.icon, "m_pod_hair_[pod_hair.icon_state]_FRONT")
|
||||
icon_adj.Blend(icon_front, ICON_OVERLAY)
|
||||
icon_with_hair.Blend(icon_adj, ICON_OVERLAY)
|
||||
icon_with_hair.Scale(64, 64)
|
||||
icon_with_hair.Crop(15, 64, 15 + 31, 64 - 31)
|
||||
|
||||
values[pod_hair.name] = icon_with_hair
|
||||
|
||||
return values
|
||||
|
||||
/datum/preference/choiced/pod_hair/create_default_value()
|
||||
return pick(GLOB.pod_hair_list)
|
||||
|
||||
Reference in New Issue
Block a user