body_marking_entry 
Vars | |
| cached_key | "[marking.name][color][emissive]", rebuilt after a setter clears it. |
|---|---|
| color | Literal lowercase #rrggbb, exactly what sanitize_hexcolor() returns. |
| emissive | 1 when the marking glows, else 0: the same integer the savefile holds. |
| marking | The GLOB.body_markings singleton worn here. Its name is this entry's identity. |
| zone | The marking zone this entry sits on, one of GLOB.marking_zones. |
Procs | |
| cache_key | Returns this entry's part of a limb icon cache key. |
| copy | Returns a new entry wearing the same marking on the same zone, in the same colour and glow. |
| get_color | Returns this entry's colour. |
| get_emissive | Returns whether this entry glows. |
| reseed_color | Gives this entry the colour its marking starts in again, by the marking's color_mode: the mutant colour it follows, or its own default_color. A locked marking gets its own colour back too, which set_color() refuses. |
| set_color | Recolours this entry, for every collection and limb holding it. A locked marking keeps its colour. |
| set_emissive | Turns this entry's glow on or off, for every collection and limb holding it. |
| store_color | Stores a colour and invalidates every icon key built from the old one. It refuses nothing; the callers decide. |
Var Details
cached_key 
"[marking.name][color][emissive]", rebuilt after a setter clears it.
color 
Literal lowercase #rrggbb, exactly what sanitize_hexcolor() returns.
emissive 
1 when the marking glows, else 0: the same integer the savefile holds.
marking 
The GLOB.body_markings singleton worn here. Its name is this entry's identity.
zone 
The marking zone this entry sits on, one of GLOB.marking_zones.
Proc Details
cache_key
Returns this entry's part of a limb icon cache key.
Returns:
- string: "[marking.name][color][emissive]", cached until a setter changes a field.
copy
Returns a new entry wearing the same marking on the same zone, in the same colour and glow.
Arguments:
- allow_emissives: FALSE to copy without the glow, as a body is dressed while its character's allow_emissives preference is off. The glow this entry holds is kept either way.
Returns:
- /datum/body_marking_entry: the new entry.
get_color
Returns this entry's colour.
Returns:
- string: a lowercase #rrggbb colour.
get_emissive
Returns whether this entry glows.
Returns:
- number: 1 when it glows, else 0.
reseed_color
Gives this entry the colour its marking starts in again, by the marking's color_mode: the mutant colour it follows, or its own default_color. A locked marking gets its own colour back too, which set_color() refuses.
A marking being newly worn is built with seed_color()'s colour instead, so no icon key is invalidated for an entry no key can hold yet.
Arguments:
- features: the character's features, where a following mode reads its mutant colour.
- species: the character's species.
set_color
Recolours this entry, for every collection and limb holding it. A locked marking keeps its colour.
Arguments:
- new_color: any colour sanitize_hexcolor() accepts. It is stored sanitized.
Returns:
- TRUE when the entry now wears the colour, FALSE when its marking is locked.
set_emissive
Turns this entry's glow on or off, for every collection and limb holding it.
Arguments:
- new_emissive: truthy to glow. It is stored as 0 or 1.
- allow_emissives: FALSE while the character's allow_emissives preference is off. Glow is then refused, as the custom sprite path refuses it; turning glow off is always allowed.
Returns:
- TRUE when the entry now glows as asked, FALSE when glow was refused.
store_color
Stores a colour and invalidates every icon key built from the old one. It refuses nothing; the callers decide.
Arguments:
- new_color: any colour sanitize_hexcolor() accepts. It is stored sanitized.