Attachments
Utility functions related to attachments are stored in this module. Mostly used to retrieve attachment items and definitions.
Holds utility functions related to the attachment system of horses.
Require: require("HorseMod/attachments/Attachments")
-
HorseMod.attachments.Attachments.ATTACHMENTS_MOD_DATA:
HorseMod.ModDataKind<HorseMod.AttachmentsModData>
-
HorseMod.attachments.Attachments.isAttachment(fullType:
string, _slot?:HorseMod.AttachmentSlot):boolean Checks if the given item full type is an attachment, and optionally if it has a slot (_slot).
-
HorseMod.attachments.Attachments.isSlot(slot:
HorseMod.AttachmentSlot):boolean Checks if the given slot is a valid attachment slot.
-
HorseMod.attachments.Attachments.getSlots(fullType:
string):HorseMod.AttachmentSlot[] Retrieve the attachment slot of a given item fullType.
-
HorseMod.attachments.Attachments.getMainSlot(fullType:
string):HorseMod.AttachmentSlot
-
HorseMod.attachments.Attachments.getManeDefinition(breedName:
string):HorseMod.ManeDefinition Retrieve the mane definition for a specific horse breed.
-
HorseMod.attachments.Attachments.getAttachmentDefinition(fullType:
string, slot:HorseMod.AttachmentSlot):HorseMod.AttachmentDefinition? Retrieves the attachments associated to the given item full type.
-
HorseMod.attachments.Attachments.get(animal:
IsoAnimal, slot:HorseMod.AttachmentSlot): (attachment?:string) Gets the equipped attachment in a specific slot.
- Returns:
attachment? (
string) – Full type of the equipped attachment item. Nil if there is no attachment in that slot.
-
HorseMod.attachments.Attachments.getAll(animal:
IsoAnimal): (
attachments: {item:string, slot:HorseMod.AttachmentSlot}[]
) Gets all currently equipped attachments.
- Returns:
attachments ({item:
string, slot:HorseMod.AttachmentSlot}[]) – Full type of equipped attachment items and the slot they are attached to.
-
HorseMod.attachments.Attachments.predicateHorseAccessory(item):
boolean
-
HorseMod.attachments.Attachments.getAvailableGear(player:
IsoPlayer):ArrayList<InventoryItem> Retrieve every available attachments in the player inventory.
-
HorseMod.attachments.Attachments.getAttachedAndDef(animal:
IsoAnimal, slot:HorseMod.AttachmentSlot):string?,HorseMod.AttachmentDefinition?
-
HorseMod.attachments.Attachments.getReins(animal:
IsoAnimal):string?,HorseMod.AttachmentDefinition? Retrieve the reins attachment item and its definition from the horse.
-
HorseMod.attachments.Attachments.getSaddle(animal:
IsoAnimal):string?,HorseMod.AttachmentDefinition? Retrieve the reins attachment item and its definition from the horse.
-
HorseMod.attachments.Attachments.getHorseContainerData(worldItem:
IsoWorldInventoryObject):HorseMod.ContainerInformation? Retrieve possible container information from the world item mod data. If it isn’t a horse container, then nil should be returned.