/tg/ Station 13 - Modules - Types — Var Details - Proc Details

body_marking

Vars

affected_bodypartsThe 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_modeWhere a newly worn marking takes its colour from, one of the MARKING_COLOR_* defines. See seed_color().
default_colorThe "#rrggbb" a MARKING_COLOR_FIXED_DEFAULT or MARKING_COLOR_LOCKED marking starts in. The following modes ignore it.
drawn_statesA 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_groupMarkings 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.
genderedWhether the body marking sprite is the same for both sexes or not. Only relevant for chest right now.
iconThe icon file the body markign is located in
icon_stateThe icon_state of the body marking
leg_shapesThe leg shapes this marking has art for, MARKING_LEG_* flags. A leg of another shape draws none of it.
nameThe preview name of the body marking. NEEDS A UNIQUE NAME
recommended_colorsColours character setup suggests beside the colour picker, lowercase "#rrggbb", or null for none. Markings declaring the same palette share one list.
recommended_speciesThe 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_speciesReturns 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_stateReturns 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_colorReturns 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_stateReturns 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:

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:

Returns:

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:

Returns:

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:

Returns: