mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Adds in the option to color all synth parts and two sets of parts
As the titles says
This commit is contained in:
@@ -29,6 +29,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
S["organ_data"] >> pref.organ_data
|
||||
S["rlimb_data"] >> pref.rlimb_data
|
||||
S["body_markings"] >> pref.body_markings
|
||||
S["synth_color"] >> pref.synth_color
|
||||
S["synth_red"] >> pref.r_synth
|
||||
S["synth_green"] >> pref.g_synth
|
||||
S["synth_blue"] >> pref.b_synth
|
||||
pref.preview_icon = null
|
||||
|
||||
/datum/category_item/player_setup_item/general/body/save_character(var/savefile/S)
|
||||
@@ -53,6 +57,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
S["organ_data"] << pref.organ_data
|
||||
S["rlimb_data"] << pref.rlimb_data
|
||||
S["body_markings"] << pref.body_markings
|
||||
S["synth_color"] << pref.synth_color
|
||||
S["synth_red"] << pref.r_synth
|
||||
S["synth_green"] << pref.g_synth
|
||||
S["synth_blue"] << pref.b_synth
|
||||
|
||||
/datum/category_item/player_setup_item/general/body/sanitize_character(var/savefile/S)
|
||||
if(!pref.species || !(pref.species in playable_species))
|
||||
@@ -101,6 +109,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
character.h_style = pref.h_style
|
||||
character.f_style = pref.f_style
|
||||
character.b_type = pref.b_type
|
||||
character.synth_color = pref.synth_color
|
||||
character.r_synth = pref.r_synth
|
||||
character.g_synth = pref.g_synth
|
||||
character.b_synth = pref.b_synth
|
||||
|
||||
// Destroy/cyborgize organs and limbs.
|
||||
for(var/name in list(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM, BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG, BP_GROIN, BP_TORSO))
|
||||
@@ -284,6 +296,11 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
. += "<font face='fixedsys' size='3' color='[pref.body_markings[M]]'><table style='display:inline;' bgcolor='[pref.body_markings[M]]'><tr><td>__</td></tr></table></font>"
|
||||
. += "<br>"
|
||||
|
||||
. += "<br>"
|
||||
. += "<b>Allow Synth color:</b> <a href='?src=\ref[src];synth_color=1'><b>[pref.synth_color ? "Yes" : "No"]</b></a><br>"
|
||||
if(pref.synth_color)
|
||||
. += "<a href='?src=\ref[src];synth2_color=1'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(pref.r_synth, 2)][num2hex(pref.g_synth, 2)][num2hex(pref.b_synth, 2)]'><table style='display:inline;' bgcolor='#[num2hex(pref.r_synth, 2)][num2hex(pref.g_synth, 2)][num2hex(pref.b_synth)]'><tr><td>__</td></tr></table></font> "
|
||||
|
||||
. = jointext(.,null)
|
||||
|
||||
/datum/category_item/player_setup_item/general/body/proc/has_flag(var/datum/species/mob_species, var/flag)
|
||||
@@ -665,6 +682,18 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
pref.equip_preview_mob ^= text2num(href_list["toggle_preview_value"])
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["synth_color"])
|
||||
pref.synth_color = !pref.synth_color
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["synth2_color"])
|
||||
var/new_color = input(user, "Choose your character's synth colour: ", "Character Preference", rgb(pref.r_synth, pref.g_synth, pref.b_synth)) as color|null
|
||||
if(new_color && CanUseTopic(user))
|
||||
pref.r_synth = hex2num(copytext(new_color, 2, 4))
|
||||
pref.g_synth = hex2num(copytext(new_color, 4, 6))
|
||||
pref.b_synth = hex2num(copytext(new_color, 6, 8))
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/general/body/proc/reset_limbs()
|
||||
|
||||
Reference in New Issue
Block a user