rp marking ui

This commit is contained in:
Timothy Teakettle
2021-04-25 20:57:02 +01:00
parent 371b250623
commit a6a3f99539
2 changed files with 25 additions and 2 deletions
+22 -2
View File
@@ -512,7 +512,29 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</td>"
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 += "<h3>[GLOB.all_mutant_parts[marking_type]]</h3>" // give it the appropriate title for the type of marking
// list out the current markings you have
if(length(features[marking_type]))
dat += "<table>"
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 += "<tr><td>[marking_list[2]] - [actual_name]</td> <td><a>&#708;</a> <a>&#709;</a></td></tr>"
dat += "</table>"
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"