diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm
index 71c2b2e13b..09d4aadf50 100644
--- a/code/_globalvars/lists/flavor_misc.dm
+++ b/code/_globalvars/lists/flavor_misc.dm
@@ -279,7 +279,8 @@ GLOBAL_LIST_INIT(unlocked_mutant_parts, list("horns", "insect_fluff"))
//parts in either of the above two lists that require a second option that allows them to be coloured
GLOBAL_LIST_INIT(colored_mutant_parts, list("insect_wings" = "wings_color", "deco_wings" = "wings_color", "horns" = "horns_color"))
-//species ids that have greyscale sprites
+//body ids that have greyscale sprites
GLOBAL_LIST_INIT(greyscale_limb_types, list("human","moth","lizard","pod","plant","jelly","slime","golem","lum","stargazer","mush","ethereal","snail","c_golem","b_golem","mammal","xeno","ipc","insect","synthliz","avian","aquatic"))
-//species ids that need snowflake coloring applied
+//body ids that have prosthetic sprites
+GLOBAL_LIST_INIT(prosthetic_limb_types, list("xion","bishop","cybersolutions","grayson","hephaestus","nanotrasen","talon"))
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 48b86c68dd..44567a0306 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -431,7 +431,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Limb Modification:
"
dat += "Modify Limbs
"
for(var/modification in modified_limbs)
- dat += "[modification]: [modified_limbs[modification]]
"
+ if(modified_limbs[modification][1] == LOADOUT_LIMB_PROSTHETIC)
+ dat += "[modification]: prosthetic - [modified_limbs[modification][2]]
"
+ else
+ dat += "[modification]: [modified_limbs[modification]]
"
dat += "
"
dat += "Species:[pref_species.name]
"
dat += "Custom Species Name:[custom_species ? custom_species : "None"]
"
@@ -1237,7 +1240,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/datum/quirk/T = SSquirks.quirks[V]
bal -= initial(T.value)
for(var/modification in modified_limbs)
- if(modified_limbs[modification] == "Prosthetic")
+ if(modified_limbs[modification][1] == LOADOUT_LIMB_PROSTHETIC)
return bal + 1 //max 1 point regardless of how many prosthetics
return bal
@@ -1497,19 +1500,22 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/modification_type = input(user, "Choose the modification to the limb:", "Character Preference") as null|anything in LOADOUT_LIMBS
if(modification_type)
if(modification_type == LOADOUT_LIMB_PROSTHETIC)
- var/number_of_prosthetics = 0
- for(var/modification in modified_limbs)
- if(modified_limbs[modification] == LOADOUT_LIMB_PROSTHETIC)
- number_of_prosthetics += 1
- if(number_of_prosthetics >= MAXIMUM_LOADOUT_PROSTHETICS)
- to_chat(user, "You can only have up to two prosthetic limbs!")
- return
+ var/prosthetic_type = input(user, "Choose the type of prosthetic", "Character Preference") as null|anything in (list("old_prosthetic") + GLOB.prosthetic_limb_types)
+ if(prosthetic_type)
+ var/number_of_prosthetics = 0
+ for(var/modification in modified_limbs)
+ if(modified_limbs[modification][1] == LOADOUT_LIMB_PROSTHETIC)
+ number_of_prosthetics += 1
+ if(number_of_prosthetics >= MAXIMUM_LOADOUT_PROSTHETICS)
+ to_chat(user, "You can only have up to two prosthetic limbs!")
+ else
+ //save the actual prosthetic data
+ modified_limbs[limb_type] = list(modification_type, prosthetic_type)
else
if(modification_type == LOADOUT_LIMB_NORMAL)
modified_limbs -= limb_type
- ShowChoices(user)
- return 1
- modified_limbs[limb_type] = modification_type
+ else
+ modified_limbs[limb_type] = list(modification_type)
if("underwear")
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list
@@ -2588,7 +2594,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//limb stuff
character.regenerate_limbs() //possible optimisation: check for changes before regenerating?
for(var/modified_limb in modified_limbs)
- var/modification = modified_limbs[modified_limb]
+ var/modification = modified_limbs[modified_limb][1]
var/obj/item/bodypart/old_part = character.get_bodypart(modified_limb)
if(modification == LOADOUT_LIMB_PROSTHETIC)
var/obj/item/bodypart/new_limb
@@ -2601,6 +2607,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
new_limb = new/obj/item/bodypart/l_leg/robot/surplus(character)
if(BODY_ZONE_R_LEG)
new_limb = new/obj/item/bodypart/r_leg/robot/surplus(character)
+ var/prosthetic_type = modified_limbs[modified_limb][2]
+ if(prosthetic_type != "old_prosthetic") //lets just leave the old sprites as they are
+ new_limb.icon = 'icons/mob/augmentation/customized_prosthetics.dmi'
+ new_limb.icon_state = "[prosthetic_type]_[modified_limb]"
new_limb.replace_limb(character)
qdel(old_part)
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index c0a578862a..093d87f15a 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -514,7 +514,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["scars3"] >> scars_list["3"]
S["scars4"] >> scars_list["4"]
S["scars5"] >> scars_list["5"]
- json_decode(S["modified_limbs"]) >> modified_limbs
+ if(S["modified_limbs"])
+ json_decode(S["modified_limbs"]) >> modified_limbs
S["chosen_limb_id"] >> chosen_limb_id
//Custom names
@@ -871,7 +872,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["scars3"] , scars_list["3"])
WRITE_FILE(S["scars4"] , scars_list["4"])
WRITE_FILE(S["scars5"] , scars_list["5"])
- WRITE_FILE(S["modified_limbs"] , json_encode(modified_limbs))
+ if(modified_limbs)
+ WRITE_FILE(S["modified_limbs"] , json_encode(modified_limbs))
WRITE_FILE(S["chosen_limb_id"], chosen_limb_id)
//gear loadout
diff --git a/icons/mob/augmentation/customized_prosthetics.dmi b/icons/mob/augmentation/customized_prosthetics.dmi
new file mode 100644
index 0000000000..ee5e74b93f
Binary files /dev/null and b/icons/mob/augmentation/customized_prosthetics.dmi differ