mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-26 18:13:35 +00:00
adds more markings and changes the way digitigrade markings are handled
This commit is contained in:
@@ -4,10 +4,11 @@
|
||||
// preferentially take digitigrade value from owner if available, THEN DNA.
|
||||
// this allows limbs to be set properly when being printed in the bioprinter without an owner
|
||||
// this also allows the preview mannequin to update properly because customisation topic calls don't call a DNA check
|
||||
var/check_digi = istype(src,/obj/item/organ/external/leg) || istype(src,/obj/item/organ/external/foot)
|
||||
if(owner)
|
||||
digitigrade = owner.digitigrade && (istype(src,/obj/item/organ/external/leg) || istype(src,/obj/item/organ/external/foot))
|
||||
digitigrade = check_digi && owner.digitigrade
|
||||
else if(dna)
|
||||
digitigrade = dna.digitigrade && (istype(src,/obj/item/organ/external/leg) || istype(src,/obj/item/organ/external/foot))
|
||||
digitigrade = check_digi && dna.digitigrade
|
||||
|
||||
var/robotic_digi = prosthetic_digi && digitigrade //could make it so the prosthetic digi var is more of a "does this limb have a custom digitigrade sprite for its robospriting" but this is fine for now
|
||||
|
||||
@@ -57,13 +58,15 @@
|
||||
if((!istype(src,/obj/item/organ/external/head) && !(force_icon && !robotic_digi)) || (model && owner && owner.synth_markings))
|
||||
for(var/M in markings)
|
||||
var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"]
|
||||
var/isdigitype = istype(mark_style,/datum/sprite_accessory/marking/digi)
|
||||
if(!(digitigrade ^ isdigitype)) //Equivalent to XNOR; this code will only run if either both digitigrade and isdigitype are true, or if both are false.
|
||||
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
|
||||
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"]]"
|
||||
var/isdigitype = mark_style.digitigrade_acceptance
|
||||
if(check_digi)
|
||||
if (!(isdigitype & (digitigrade ? MARKING_DIGITIGRADE_ONLY : MARKING_NONDIGI_ONLY))) //checks flags based on which digitigrade type the limb is
|
||||
continue
|
||||
var/icon/mark_s = new/icon("icon" = digitigrade ? mark_style.digitigrade_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
|
||||
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"]]"
|
||||
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]]"
|
||||
if(!limb_icon_cache[cache_key])
|
||||
|
||||
Reference in New Issue
Block a user