From 91f250af3b72e71d983bd9cc6fa3b5c9d0f06057 Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 5 Jul 2018 14:31:29 +0300 Subject: [PATCH 1/3] Adds an option to disable markings on synth limbs. -You can now have clean robolimbs on your artfully painted organic bodies again. -In char setup near the synth color option. -Tested working although it requires a physical change (colors, markings, limb status, etc.) to refresh the body cache before it can show up in preview. --- .../client/preference_setup/general/03_body.dm | 8 ++++++++ code/modules/client/preferences.dm | 1 + .../mob/living/carbon/human/human_defines_vr.dm | 3 ++- code/modules/organs/organ_icon.dm | 15 ++++++++------- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 203527fb184..cc3a20b668e 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -36,6 +36,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O S["synth_red"] >> pref.r_synth S["synth_green"] >> pref.g_synth S["synth_blue"] >> pref.b_synth + S["synth_markings"] >> pref.synth_markings //VOREStation edit. pref.preview_icon = null S["bgstate"] >> pref.bgstate @@ -65,6 +66,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O S["synth_red"] << pref.r_synth S["synth_green"] << pref.g_synth S["synth_blue"] << pref.b_synth + S["synth_markings"] << pref.synth_markings //VOREStation edit. S["bgstate"] << pref.bgstate /datum/category_item/player_setup_item/general/body/sanitize_character(var/savefile/S) @@ -120,6 +122,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O character.r_synth = pref.r_synth character.g_synth = pref.g_synth character.b_synth = pref.b_synth + character.synth_markings = pref.synth_markings //VOREStation edit. // 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)) @@ -305,6 +308,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O . += "
" . += "
" + . += "Allow Synth markings: [pref.synth_markings ? "Yes" : "No"]
" //VOREStation edit. . += "Allow Synth color: [pref.synth_color ? "Yes" : "No"]
" if(pref.synth_color) . += "Change Color
__
" @@ -701,6 +705,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O pref.synth_color = !pref.synth_color return TOPIC_REFRESH_UPDATE_PREVIEW + else if(href_list["synth_markings"]) //VOREStation edit. + pref.synth_markings = !pref.synth_markings //VOREStation edit. + return TOPIC_REFRESH_UPDATE_PREVIEW //VOREStation edit. + 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)) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d0aefa286f4..34826e24d94 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -60,6 +60,7 @@ datum/preferences var/r_synth //Used with synth_color to color synth parts that normaly can't be colored. var/g_synth //Same as above var/b_synth //Same as above + var/synth_markings = 1 //VOREStation edit. Enable/disable markings on synth parts. //Some faction information. var/home_system = "Unset" //System of birth. diff --git a/code/modules/mob/living/carbon/human/human_defines_vr.dm b/code/modules/mob/living/carbon/human/human_defines_vr.dm index d3bb4f0b57f..750fe4592ef 100644 --- a/code/modules/mob/living/carbon/human/human_defines_vr.dm +++ b/code/modules/mob/living/carbon/human/human_defines_vr.dm @@ -6,4 +6,5 @@ var/wagging = 0 //UGH. var/flapping = 0 var/vantag_pref = VANTAG_NONE //What's my status? - var/impersonate_bodytype //For impersonating a bodytype \ No newline at end of file + var/impersonate_bodytype //For impersonating a bodytype + var/synth_markings = 1 \ No newline at end of file diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 9de48edc906..71adba5b115 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -180,13 +180,14 @@ var/global/list/limb_icon_cache = list() icon_cache_key += "_model_[model]" apply_colouration(mob_icon) // VOREStation edit to enable markings on synths - for(var/M in markings) - var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"] - var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]") - mark_s.Blend(markings[M]["color"], mark_style.color_blend_mode) // VOREStation edit - overlays |= mark_s //So when it's not on your body, it has icons - mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons - icon_cache_key += "[M][markings[M]["color"]]" + if(owner && owner.synth_markings) + for(var/M in markings) + var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"] + var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]") + mark_s.Blend(markings[M]["color"], mark_style.color_blend_mode) // VOREStation edit + overlays |= mark_s //So when it's not on your body, it has icons + mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons + icon_cache_key += "[M][markings[M]["color"]]" if(body_hair && islist(h_col) && h_col.len >= 3) var/cache_key = "[body_hair]-[icon_name]-[h_col[1]][h_col[2]][h_col[3]]" From 1b9fb9dc345e8b313fd4f9031f0b605fd2ecbcd8 Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 7 Jul 2018 10:20:12 +0300 Subject: [PATCH 2/3] overlay system update for the vs edit part --- code/modules/organs/organ_icon.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 71adba5b115..c3e39a513cc 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -185,7 +185,7 @@ var/global/list/limb_icon_cache = list() var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"] var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]") mark_s.Blend(markings[M]["color"], mark_style.color_blend_mode) // VOREStation edit - overlays |= mark_s //So when it's not on your body, it has icons + add_overlay(mark_s) //So when it's not on your body, it has icons mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons icon_cache_key += "[M][markings[M]["color"]]" From 85a7c2d7d4fe786b7f6f2d79c6870700d326ef99 Mon Sep 17 00:00:00 2001 From: Verkister Date: Tue, 14 Aug 2018 09:16:42 +0300 Subject: [PATCH 3/3] snip --- code/modules/client/preference_setup/general/03_body.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 811e8427a27..f1d6d95f2a2 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -705,10 +705,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O pref.synth_color = !pref.synth_color return TOPIC_REFRESH_UPDATE_PREVIEW - else if(href_list["synth_markings"]) //VOREStation edit. - pref.synth_markings = !pref.synth_markings //VOREStation edit. - return TOPIC_REFRESH_UPDATE_PREVIEW //VOREStation edit. - 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))