mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-07-20 12:12:26 +01:00
cosmetic part ids and jointed ipc components
This commit is contained in:
@@ -6,5 +6,5 @@ GLOBAL_LIST_EMPTY(cosmetic_legs)
|
||||
/proc/init_cosmetic_parts(datum/cosmetic_part/type, list/global_list)
|
||||
for(var/subtype in subtypesof(type))
|
||||
var/datum/cosmetic_part/part = new subtype()
|
||||
global_list[part.name] = part
|
||||
global_list[part.id] = part
|
||||
return global_list
|
||||
+6
-11
@@ -149,11 +149,6 @@
|
||||
var/color2 = random_short_color()
|
||||
var/color3 = random_short_color()
|
||||
|
||||
var/cosmetic_head = pick(GLOB.cosmetic_heads)
|
||||
var/cosmetic_chest = pick(GLOB.cosmetic_chests)
|
||||
var/cosmetic_arms = pick(GLOB.cosmetic_arms)
|
||||
var/cosmetic_legs = pick(GLOB.cosmetic_legs)
|
||||
|
||||
//CIT CHANGE - changes this entire return to support cit's snowflake parts
|
||||
return(list(
|
||||
"mcolor" = color1,
|
||||
@@ -243,12 +238,12 @@
|
||||
"flavor_text" = "",
|
||||
"silicon_flavor_text" = "",
|
||||
"ooc_text" = "",
|
||||
"cosmetic_head" = GLOB.cosmetic_heads[cosmetic_head],
|
||||
"cosmetic_chest" = GLOB.cosmetic_chests[cosmetic_chest],
|
||||
"cosmetic_l_arm" = GLOB.cosmetic_arms[cosmetic_arms],
|
||||
"cosmetic_r_arm" = GLOB.cosmetic_arms[cosmetic_arms],
|
||||
"cosmetic_l_leg" = GLOB.cosmetic_legs[cosmetic_legs],
|
||||
"cosmetic_r_leg" = GLOB.cosmetic_legs[cosmetic_legs]))
|
||||
"cosmetic_head" = GLOB.cosmetic_heads["default"],
|
||||
"cosmetic_chest" = GLOB.cosmetic_chests["default"],
|
||||
"cosmetic_l_arm" = GLOB.cosmetic_arms["default"],
|
||||
"cosmetic_r_arm" = GLOB.cosmetic_arms["default"],
|
||||
"cosmetic_l_leg" = GLOB.cosmetic_legs["default"],
|
||||
"cosmetic_r_leg" = GLOB.cosmetic_legs["default"]))
|
||||
|
||||
/proc/random_hair_style(gender)
|
||||
switch(gender)
|
||||
|
||||
@@ -2349,14 +2349,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
selectable_parts[possible_part.name] = path
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt heads for this species!</span>")
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt head style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_head"] = GLOB.cosmetic_heads[new_cosmetic_part]
|
||||
features["cosmetic_head"] = GLOB.cosmetic_heads[selectable_parts[new_cosmetic_part]]
|
||||
update_preview_icon()
|
||||
|
||||
if("cosmetic_chest")
|
||||
@@ -2366,14 +2366,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
selectable_parts[possible_part.name] = path
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt chests for this species!</span>")
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt chest style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_chest"] = GLOB.cosmetic_chests[new_cosmetic_part]
|
||||
features["cosmetic_chest"] = GLOB.cosmetic_chests[selectable_parts[new_cosmetic_part]]
|
||||
update_preview_icon()
|
||||
|
||||
// currently symmetrical
|
||||
@@ -2384,15 +2384,15 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
selectable_parts[possible_part.name] = path
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt arms for this species!</span>")
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt arms style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_l_arm"] = GLOB.cosmetic_arms[new_cosmetic_part]
|
||||
features["cosmetic_r_arm"] = GLOB.cosmetic_arms[new_cosmetic_part]
|
||||
features["cosmetic_l_arm"] = GLOB.cosmetic_arms[selectable_parts[new_cosmetic_part]]
|
||||
features["cosmetic_r_arm"] = GLOB.cosmetic_arms[selectable_parts[new_cosmetic_part]]
|
||||
update_preview_icon()
|
||||
|
||||
if("cosmetic_legs")
|
||||
@@ -2402,15 +2402,15 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
selectable_parts[possible_part.name] = path
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt legs for this species!</span>")
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt legs style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_l_leg"] = GLOB.cosmetic_legs[new_cosmetic_part]
|
||||
features["cosmetic_r_leg"] = GLOB.cosmetic_legs[new_cosmetic_part]
|
||||
features["cosmetic_l_leg"] = GLOB.cosmetic_legs[selectable_parts[new_cosmetic_part]]
|
||||
features["cosmetic_r_leg"] = GLOB.cosmetic_legs[selectable_parts[new_cosmetic_part]]
|
||||
update_preview_icon()
|
||||
|
||||
// End hyper edit
|
||||
|
||||
Reference in New Issue
Block a user