body_marking 
Vars | |
| affected_bodyparts | The zones this marking draws on, as bitflags (HEAD, CHEST, ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT, LEG_RIGHT, LEG_LEFT). Claim a zone only where the sheet has its art: character setup offers the marking on every zone claimed here. The body_marking_art unit test checks each claim against the sheet. |
|---|---|
| color_mode | Where a newly worn marking takes its colour from, one of the MARKING_COLOR_* defines. See seed_color(). |
| default_color | The "#rrggbb" a MARKING_COLOR_FIXED_DEFAULT or MARKING_COLOR_LOCKED marking starts in. The following modes ignore it. |
| drawn_states | A limb's request -> the icon state this marking draws for it, or FALSE for nothing, as drawn_state() answered; null until a limb draws it. Read-only outside this type, where only BODY_MARKING_DRAWN_STATE() reads it. |
| exclusion_group | Markings sharing a group are alternatives: a zone wears at most one of them. A text token, or null for none. A save keeps what it held when a group is authored, so a group added after save version 21 needs a migration version of its own. |
| gendered | Whether the body marking sprite is the same for both sexes or not. Only relevant for chest right now. |
| icon | The icon file the body markign is located in |
| icon_state | The icon_state of the body marking |
| leg_shapes | The leg shapes this marking has art for, MARKING_LEG_* flags. A leg of another shape draws none of it. |
| name | The preview name of the body marking. NEEDS A UNIQUE NAME |
| recommended_colors | Colours character setup suggests beside the colour picker, lowercase "#rrggbb", or null for none. Markings declaring the same palette share one list. |
| recommended_species | The species this marking is meant for, species id -> TRUE, or null for any species. Without mismatched parts character setup offers and accepts it only for those. A marking in any /datum/body_marking_set has this replaced at init by the union of those sets' species (derive_body_marking_species()), so a declaration here counts only for a marking in no set. |
Procs | |
| allows_species | Returns whether a species may wear this marking without mismatched parts: any species when it names none, otherwise only the ones it names. Character setup's choices and actions, and a collection's validate_for_species(), all ask here. |
| drawn_state | Returns the icon state the limb renderer draws for this marking on one zone of a limb: zone_icon_state()'s state where the sheet has it, else FALSE, so a missing state draws nothing rather than the sheet's default state. It is missing on a zone a save holds but the marking no longer claims, which is no bug, so this stays silent; the body_marking_art unit test is the loud check of claimed zones. The answer is kept in drawn_states under the limb's request, where BODY_MARKING_DRAWN_STATE() reads it again with no proc call. |
| seed_color | Returns the colour this marking starts in when it is added, brought by a preset or reset, by its color_mode: the mutant colour it follows, or its own default_color. |
| zone_icon_state | Returns the icon state this marking draws on one zone of a limb, or null where it draws nothing there: a leg of a shape leg_shapes leaves out. The limb renderer draws every marking appearance from this, through drawn_state(), and character setup's picker, the custom sprite editor and the body_marking_art unit test ask it too, so all of them read the same art. The sheet can still lack the state, as it does on a zone a save holds but the marking no longer claims. |
Var Details
affected_bodyparts 
The zones this marking draws on, as bitflags (HEAD, CHEST, ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT, LEG_RIGHT, LEG_LEFT). Claim a zone only where the sheet has its art: character setup offers the marking on every zone claimed here. The body_marking_art unit test checks each claim against the sheet.
color_mode 
Where a newly worn marking takes its colour from, one of the MARKING_COLOR_* defines. See seed_color().
default_color 
The "#rrggbb" a MARKING_COLOR_FIXED_DEFAULT or MARKING_COLOR_LOCKED marking starts in. The following modes ignore it.
drawn_states 
A limb's request -> the icon state this marking draws for it, or FALSE for nothing, as drawn_state() answered; null until a limb draws it. Read-only outside this type, where only BODY_MARKING_DRAWN_STATE() reads it.
exclusion_group 
Markings sharing a group are alternatives: a zone wears at most one of them. A text token, or null for none. A save keeps what it held when a group is authored, so a group added after save version 21 needs a migration version of its own.
gendered 
Whether the body marking sprite is the same for both sexes or not. Only relevant for chest right now.
icon 
The icon file the body markign is located in
icon_state 
The icon_state of the body marking
leg_shapes 
The leg shapes this marking has art for, MARKING_LEG_* flags. A leg of another shape draws none of it.
name 
The preview name of the body marking. NEEDS A UNIQUE NAME
recommended_colors 
Colours character setup suggests beside the colour picker, lowercase "#rrggbb", or null for none. Markings declaring the same palette share one list.
recommended_species 
The species this marking is meant for, species id -> TRUE, or null for any species. Without mismatched parts character setup offers and accepts it only for those. A marking in any /datum/body_marking_set has this replaced at init by the union of those sets' species (derive_body_marking_species()), so a declaration here counts only for a marking in no set.
Proc Details
allows_species
Returns whether a species may wear this marking without mismatched parts: any species when it names none, otherwise only the ones it names. Character setup's choices and actions, and a collection's validate_for_species(), all ask here.
Arguments:
- species_id: the species' id.
drawn_state
Returns the icon state the limb renderer draws for this marking on one zone of a limb: zone_icon_state()'s state where the sheet has it, else FALSE, so a missing state draws nothing rather than the sheet's default state. It is missing on a zone a save holds but the marking no longer claims, which is no bug, so this stays silent; the body_marking_art unit test is the loud check of claimed zones. The answer is kept in drawn_states under the limb's request, where BODY_MARKING_DRAWN_STATE() reads it again with no proc call.
Arguments:
- request: the key of the limb's zone, leg shape and chest art, which the renderer builds once per limb.
- zone, digitigrade, limb_gender: as zone_icon_state() takes them.
Returns:
- string: the icon state, or FALSE.
seed_color
Returns the colour this marking starts in when it is added, brought by a preset or reset, by its color_mode: the mutant colour it follows, or its own default_color.
Arguments:
- features: the character's features, where a following mode reads its mutant colour. May be null.
- species: the character's species. No mode reads it yet; a species-dependent mode needs no caller changed.
Returns:
- string: the colour, as its source holds it. Null when the mutant colour followed is unset, which an entry stores as black, as it always did.
zone_icon_state
Returns the icon state this marking draws on one zone of a limb, or null where it draws nothing there: a leg of a shape leg_shapes leaves out. The limb renderer draws every marking appearance from this, through drawn_state(), and character setup's picker, the custom sprite editor and the body_marking_art unit test ask it too, so all of them read the same art. The sheet can still lack the state, as it does on a zone a save holds but the marking no longer claims.
Arguments:
- zone: the marking zone drawn on: a limb's body zone, or an arm's aux zone for its hand.
- digitigrade: TRUE for a digitigrade limb.
- limb_gender: the chest art a gendered marking draws, "m" or "f": a dimorphic chest's limb_gender, "m" on any other chest.
Returns:
- string: the icon state, or null.