Persisted data shape for a body part.

interface Data {
    __kind?: string;
    bodyZoneCode: string;
    canHoldItem: boolean;
    favoredFlag?: boolean;
    heldItemId: null | string;
    name?: string;
    permanentImpairment?: number;
    permanentlyUnusable?: boolean;
    probWeight?: number;
    roles: string[];
    shortcode: string;
}

Hierarchy (View Summary)

Properties

__kind?: string

Discriminator kind, written on serialization (SohlEntity.toJSON) and read back on revival. Optional as constructor input — it is derived from the concrete class, not supplied by callers.

bodyZoneCode: string

Shortcode of the sohl.entity.body.BodyZone this part belongs to. A part whose code matches no zone is not reachable in the hierarchy (see BodyStructure.orphanedParts).

canHoldItem: boolean

Whether this part can grip a held item.

favoredFlag?: boolean

Whether this part is favored for certain actions (legacy flag).

heldItemId: null | string

Id of the item this part is holding, or null if empty.

name?: string

Display name of the part (e.g. "Head"); falls back to the shortcode.

permanentImpairment?: number

Manually-set permanent impairment floor (non-positive; 0 = none).

permanentlyUnusable?: boolean

Whether the part is permanently unusable (withered/amputated).

probWeight?: number

Selection weight for this part within its zone: once a zone is rolled, each of its parts is drawn with probability probWeight / (sum of the zone's parts' probWeight). Also the area the aimed-strike drift spends spread against. (The persisted schema field; see BodyPart.probWeight for the derived modifier the entity exposes.)

roles: string[]

Functional roles this part fulfills (BodyRole values).

shortcode: string

Unique part identifier within the body structure.