From 9bf5b930f6632dbcdcc3a413f9f4ace7941fa408 Mon Sep 17 00:00:00 2001 From: Selis <12716288+ItsSelis@users.noreply.github.com> Date: Fri, 14 Feb 2025 17:12:08 +0100 Subject: [PATCH] hair (#17143) --- code/modules/client/preference_setup/general/03_body.dm | 8 ++++---- code/modules/client/preference_setup/preference_setup.dm | 2 +- code/modules/mob/new_player/preferences_setup.dm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 6d095705bd..82d918a0ce 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -549,7 +549,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O pref.set_biological_gender(mob_species.genders[1]) pref.custom_species = null //grab one of the valid hair styles for the newly chosen species - var/list/valid_hairstyles = pref.get_valid_hairstyles() + var/list/valid_hairstyles = pref.get_valid_hairstyles(user) if(valid_hairstyles.len) if(!(pref.h_style in valid_hairstyles)) @@ -601,7 +601,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O return TOPIC_REFRESH_UPDATE_PREVIEW else if(href_list["hair_style"]) - var/list/valid_hairstyles = pref.get_valid_hairstyles() + var/list/valid_hairstyles = pref.get_valid_hairstyles(user) var/new_h_style = tgui_input_list(user, "Choose your character's hair style:", "Character Preference", valid_hairstyles, pref.h_style) if(new_h_style && CanUseTopic(user)) @@ -618,7 +618,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O else if(href_list["hair_style_left"]) var/H = href_list["hair_style_left"] - var/list/valid_hairstyles = pref.get_valid_hairstyles() + var/list/valid_hairstyles = pref.get_valid_hairstyles(user) var/start = valid_hairstyles.Find(H) if(start != 1) //If we're not the beginning of the list, become the previous element. @@ -629,7 +629,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O else if(href_list["hair_style_right"]) var/H = href_list["hair_style_right"] - var/list/valid_hairstyles = pref.get_valid_hairstyles() + var/list/valid_hairstyles = pref.get_valid_hairstyles(user) var/start = valid_hairstyles.Find(H) if(start != valid_hairstyles.len) //If we're not the end of the list, become the next element. diff --git a/code/modules/client/preference_setup/preference_setup.dm b/code/modules/client/preference_setup/preference_setup.dm index 1024f44a59..9debf34698 100644 --- a/code/modules/client/preference_setup/preference_setup.dm +++ b/code/modules/client/preference_setup/preference_setup.dm @@ -232,7 +232,7 @@ if(!pref_mob || !pref_mob.client) return 1 - . = OnTopic(href, href_list, usr) + . = OnTopic(href, href_list, pref_mob) if(!pref_mob || !pref_mob.client) // Just in case we disappeared during OnTopic return 1 diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 50ca3080c5..f1780c31ec 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -310,7 +310,7 @@ var/datum/sprite_accessory/S = hair_styles_list[hairstyle] if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed))) //VOREStation Edit - Custom species base species allowance continue - if((!S.ckeys_allowed) || (user?.ckey in S.ckeys_allowed)) //VOREStation Edit, allows ckey locked hairstyles. + if((!S.ckeys_allowed) || (user.ckey in S.ckeys_allowed)) //VOREStation Edit, allows ckey locked hairstyles. valid_hairstyles[S.name] = hairstyle //VOREStation Edit, allows ckey locked hairstyles. //valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] //VOREStation Edit. Replaced by above.