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
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
var/datum/cosmetic_part/r_arm = features["cosmetic_r_arm"]
|
||||
var/datum/cosmetic_part/l_leg = features["cosmetic_l_leg"]
|
||||
var/datum/cosmetic_part/r_leg = features["cosmetic_r_leg"]
|
||||
WRITE_FILE(S["feature_cosmetic_head"], head.name)
|
||||
WRITE_FILE(S["feature_cosmetic_chest"], chest.name)
|
||||
WRITE_FILE(S["feature_cosmetic_l_arm"], l_arm.name)
|
||||
WRITE_FILE(S["feature_cosmetic_r_arm"], r_arm.name)
|
||||
WRITE_FILE(S["feature_cosmetic_l_leg"], l_leg.name)
|
||||
WRITE_FILE(S["feature_cosmetic_r_leg"], r_leg.name)
|
||||
WRITE_FILE(S["feature_cosmetic_head"], head.id)
|
||||
WRITE_FILE(S["feature_cosmetic_chest"], chest.id)
|
||||
WRITE_FILE(S["feature_cosmetic_l_arm"], l_arm.id)
|
||||
WRITE_FILE(S["feature_cosmetic_r_arm"], r_arm.id)
|
||||
WRITE_FILE(S["feature_cosmetic_l_leg"], l_leg.id)
|
||||
WRITE_FILE(S["feature_cosmetic_r_leg"], r_leg.id)
|
||||
@@ -13,6 +13,8 @@ safely.
|
||||
*/
|
||||
|
||||
/datum/cosmetic_part
|
||||
/** A unique string that is used to identify this part for save files. Allows name changes without breaking saves */
|
||||
var/id
|
||||
/** The name of the cosmetic part. This shows up in the preferences dropdown. */
|
||||
var/name
|
||||
var/icon = 'hyperstation/icons/mob/char_parts.dmi'
|
||||
@@ -33,57 +35,86 @@ safely.
|
||||
// =========================================
|
||||
|
||||
/datum/cosmetic_part/head/default
|
||||
id = "default"
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/head/ipc_round
|
||||
id = "ipc_round"
|
||||
name = "round ipc head"
|
||||
icon_state = "ipc_round"
|
||||
supported_species = list("ipc")
|
||||
|
||||
|
||||
// CHESTS
|
||||
// =========================================
|
||||
|
||||
/datum/cosmetic_part/chest/default
|
||||
id = "default"
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/chest/ipc_sleek
|
||||
id = "ipc_sleek"
|
||||
name = "sleek ipc chest"
|
||||
icon_state = "ipc_sleek"
|
||||
supported_species = list("ipc")
|
||||
color_src = MATRIXED
|
||||
|
||||
/datum/cosmetic_part/chest/ipc_jointed
|
||||
id = "ipc_jointed"
|
||||
name = "jointed ipc chest"
|
||||
icon_state = "ipc_jointed"
|
||||
supported_species = list("ipc")
|
||||
color_src = MATRIXED
|
||||
|
||||
|
||||
// ARMS
|
||||
// =========================================
|
||||
|
||||
/datum/cosmetic_part/arms/default
|
||||
id = "default"
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/arms/avian_alt
|
||||
id = "avian_alt"
|
||||
name = "avian claws"
|
||||
icon_state = "avian_alt"
|
||||
supported_species = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
|
||||
|
||||
/datum/cosmetic_part/arms/insect
|
||||
id = "insect"
|
||||
name = "insect arms"
|
||||
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
icon_state = "insect"
|
||||
supported_species = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
|
||||
|
||||
/datum/cosmetic_part/arms/ipc_sleek
|
||||
id = "ipc_sleek"
|
||||
name = "sleek ipc arms"
|
||||
icon_state = "ipc_sleek"
|
||||
supported_species = list("ipc")
|
||||
color_src = MATRIXED
|
||||
|
||||
/datum/cosmetic_part/arms/ipc_jointed
|
||||
id = "ipc_jointed"
|
||||
name = "jointed ipc arms"
|
||||
icon_state = "ipc_jointed"
|
||||
supported_species = list("ipc")
|
||||
color_src = MATRIXED
|
||||
|
||||
|
||||
// LEGS
|
||||
// =========================================
|
||||
|
||||
/datum/cosmetic_part/legs/default
|
||||
id = "default"
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/legs/avian
|
||||
id = "avian"
|
||||
name = "avian legs"
|
||||
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
icon_state = "avian"
|
||||
@@ -91,6 +122,7 @@ safely.
|
||||
support_digitigrade = FALSE
|
||||
|
||||
/datum/cosmetic_part/legs/mammal
|
||||
id = "mammal"
|
||||
name = "mammal legs"
|
||||
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
icon_state = "mammal"
|
||||
@@ -98,6 +130,7 @@ safely.
|
||||
support_digitigrade = TRUE
|
||||
|
||||
/datum/cosmetic_part/legs/insect
|
||||
id = "insect"
|
||||
name = "insect legs"
|
||||
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
icon_state = "insect"
|
||||
@@ -105,8 +138,17 @@ safely.
|
||||
support_digitigrade = TRUE
|
||||
|
||||
/datum/cosmetic_part/legs/ipc_sleek
|
||||
id = "ipc_sleek"
|
||||
name = "sleek ipc legs"
|
||||
icon_state = "ipc_sleek"
|
||||
supported_species = list("ipc")
|
||||
color_src = MATRIXED
|
||||
support_digitigrade = FALSE
|
||||
|
||||
/datum/cosmetic_part/legs/ipc_jointed
|
||||
id = "ipc_jointed"
|
||||
name = "jointed ipc legs"
|
||||
icon_state = "ipc_jointed"
|
||||
supported_species = list("ipc")
|
||||
color_src = MATRIXED
|
||||
support_digitigrade = FALSE
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Reference in New Issue
Block a user