ManeManager

Utility functions related to manes are stored in this module. Mostly used to retrieve mane colors and remove manes from horses.

Hold utility functions related to the horse manes.

Require: require("HorseMod/attachments/ManeManager")

HorseMod.attachments.ManeManager.MANES_MOD_DATA: HorseMod.ModDataKind<HorseMod.ManesModData>
HorseMod.attachments.ManeManager.isManeSlot(slot: HorseMod.AttachmentSlot): boolean

Check if the given slot is a mane slot.

HorseMod.attachments.ManeManager.getManeDefinition(breedName: string): HorseMod.ManeDefinition

Retrieve the mane definition for a specific horse breed.

HorseMod.attachments.ManeManager.generateManeConfig(horse: IsoAnimal): (
    maneColors: table<HorseMod.AttachmentSlot, HorseMod.ManeColor>
)

Generate a mane configuration and mane colors tables for a specific breed. The mane color needs to be the same for all mane slots.

HorseMod.attachments.ManeManager.removeManes(horse: IsoAnimal): nil

Remove manes from the horse.

HorseMod.attachments.ManeManager.getManeColor(horse: IsoAnimal): HorseMod.ManeColor

Select a random mane color for a specific horse breed based on possible mane colors.

HorseMod.attachments.ManeManager.setupMane(
    horse: IsoAnimal,
    mane: InventoryItem,
    slot: HorseMod.AttachmentSlot
): InventoryItem

Retrieve and set the mane color.