From a6a3f995398dd306c574469b359bbabe4d8b75dd Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Sun, 25 Apr 2021 20:57:02 +0100 Subject: [PATCH] rp marking ui --- code/_globalvars/lists/flavor_misc.dm | 3 +++ code/modules/client/preferences.dm | 24 ++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index f0a8a4e2c6..518b61f4d2 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -350,3 +350,6 @@ GLOBAL_LIST_INIT(nongendered_limb_types, list("fly", "zombie" ,"synth", "shadow" //list of eye types, corresponding to a respective left and right icon state for the set of eyes GLOBAL_LIST_INIT(eye_types, list("normal", "insect", "moth", "double", "double2", "double3", "cyclops")) + +//list linking bodypart bitflags to their actual names +GLOBAL_LIST_INIT(bodypart_names, list(num2text(HEAD) = "Head", num2text(CHEST) = "Chest", num2text(LEG_LEFT) = "Left Leg", num2text(LEG_RIGHT) = "Right Leg", num2text(ARM_LEFT) = "Left Arm", num2text(ARM_RIGHT) = "Right Arm")) \ No newline at end of file diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index ccb79ce255..1a9a9a6cbf 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -512,7 +512,29 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "" mutant_category = 0 + // rp marking selection + // assume you can only have mam markings or regular markings or none, never both + var/marking_type + if(parent.can_have_part("body_markings")) + marking_type = "body_markings" + else if(parent.can_have_part("mam_body_markings")) + marking_type = "mam_body_markings" + if(marking_type) + dat += APPEARANCE_CATEGORY_COLUMN + dat += "

[GLOB.all_mutant_parts[marking_type]]

" // give it the appropriate title for the type of marking + // list out the current markings you have + if(length(features[marking_type])) + dat += "" + for(var/list/marking_list in features[marking_type]) + var/actual_name = GLOB.bodypart_names[num2text(marking_list[1])] // get the actual name from the bitflag representing the part the marking is applied to + dat += "" + dat += "
[marking_list[2]] - [actual_name] ˄ ˅
" + for(var/mutant_part in GLOB.all_mutant_parts) + // these are sorted out separately due to the rp marking system being funky + // NOTE TO SELF: UNCOMMENT THIS ONCE YOU'RE DONE DEBUGGING + //if(istype(accessory, /datum/sprite_accessory/mam_body_markings) || istype(accessory, /datum/sprite_accessory/body_markings)) + // continue if(parent.can_have_part(mutant_part)) if(!mutant_category) dat += APPEARANCE_CATEGORY_COLUMN @@ -531,8 +553,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(accessory) if(accessory.color_src == MATRIXED || accessory.color_src == MUTCOLORS || accessory.color_src == MUTCOLORS2 || accessory.color_src == MUTCOLORS3) //mutcolors1-3 are deprecated now, please don't rely on these in the future var/mutant_string = accessory.mutant_part_string - if(istype(accessory, /datum/sprite_accessory/mam_body_markings) || istype(accessory, /datum/sprite_accessory/body_markings)) - continue var/primary_feature = "[mutant_string]_primary" var/secondary_feature = "[mutant_string]_secondary" var/tertiary_feature = "[mutant_string]_tertiary"