Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Latest commit

 

History

History
752 lines (531 loc) · 26.1 KB

api.md

File metadata and controls

752 lines (531 loc) · 26.1 KB

Modules

about

AboutApp module

combat-carousel

CombatCarousel module

config-form

CombatCarouselConfig module

config

Config module

hooks

Hooks module

overrides

Overrides module

settings

Settings module

templates

Templates module

util

Util module

init

about

AboutApp module

about~AboutApp ⇐ FormApplication

About this module FormApp

Kind: inner class of about
Extends: FormApplication

aboutApp.getData()

Supplies data to the template

Kind: instance method of AboutApp

aboutApp.fetchPatrons()

Fetches a list of Patrons to display on the About page

Kind: instance method of AboutApp

AboutApp.defaultOptions

Call app default options

Kind: static property of AboutApp

combat-carousel

CombatCarousel module

combat-carousel~CombatCarousel ⇐ Application

Main app class

Kind: inner class of combat-carousel
Extends: Application

combatCarousel._render()

Render worker

Kind: instance method of CombatCarousel

Param Type Description
...args Array Any arguments passed

combatCarousel.getData()

Get data required for template

Kind: instance method of CombatCarousel

combatCarousel.activateListeners(html)

Activate listeners on the DOM element

Kind: instance method of CombatCarousel

Param Type Description
html Object the app element

combatCarousel._onModuleIconClick(event, html)

Module Icon click handler

Kind: instance method of CombatCarousel
Todo

  • #6 #5 add visual indicator of collapse state on icon
Param
event
html

combatCarousel._onModuleIconContext(event, html)

Module Icon context click handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onRollInitiative(event)

Roll Initiative handler

Kind: instance method of CombatCarousel

Param Type
event *

combatCarousel._onEditInitiative(event, html)

Edit Initiative handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onInitiativeChange(event, html)

Change Initiative handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onInitiativeFocusOut(event, html)

Focus Out Initiative handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onHoverCard(event)

Card Hover handler

Kind: instance method of CombatCarousel

Param Type
event *

combatCarousel._onHoverOutCard(event, html)

Card Hover-out handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onCardDoubleClick(event, html)

Card double click handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onContextMenuCard(event, html)

Handle card right-click

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onCombatantControl(event, html)

Combatant Control handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onCombatControlClick(event, html)

Combat Control click handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onHoverSplide(event, html)

Hover splide handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onHoverOutSplide(event, html)

Hover Out splide handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onClickEncounterIcon(event, html)

Context Encounter Icon handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel._onEncounterIconContext(event, html)

Context Encounter Icon handler

Kind: instance method of CombatCarousel

Param
event
html

combatCarousel.safeRender()

Safe render for multiple embedded entity updates

Kind: instance method of CombatCarousel

combatCarousel.toggleVisibility()

Toggles visibility of the carousel

Kind: instance method of CombatCarousel

combatCarousel.expand()

Expand the Combat Carousel

Kind: instance method of CombatCarousel

combatCarousel.collapse()

Collapse the Combat Carousel

Kind: instance method of CombatCarousel

combatCarousel.getCombatState(combat)

Gets the state of a combat instance

Kind: instance method of CombatCarousel

Param
combat

combatCarousel.getToggleIconState()

Gets the current combat state of the toggle icon

Kind: instance method of CombatCarousel

combatCarousel.setToggleIcon(combatState)

Sets the Combat Carousel icon based on the app and combat state

Kind: instance method of CombatCarousel

Param Type Default
combatState String

combatCarousel.activateCombatantSlide(combatant)

Activates the given combatant's slide

Kind: instance method of CombatCarousel

Param Default
combatant

combatCarousel.getCombatantSlideIndex(combatant)

Get the matching slide for the provided combatant

Kind: instance method of CombatCarousel

Param
combatant

CombatCarousel.defaultOptions

Call app default options

Kind: static property of CombatCarousel

CombatCarousel.prepareTurnData(turn) ⇒ Object

Takes a standard combat turn and prepare data for Combat Carousel rendering

Kind: static method of CombatCarousel
Returns: Object - preparedData data ready for template

Param Type Description
turn Turn | Object the combat turn object

CombatCarousel.getOverlayProperties(token, overlaySettings)

Get the data for the Combat Carousel property overlay for a given token

Kind: static method of CombatCarousel

Param
token
overlaySettings

config-form

CombatCarouselConfig module

config-form~CombatCarouselConfig ⇐ FormApplication

A form-app for setting the icons and properties to use in the Combat Carousel Overlay

Kind: inner class of config-form
Extends: FormApplication

new CombatCarouselConfig(...args)

Class instance constructor

Param
...args

combatCarouselConfig.getData()

Gets data for the template

Kind: instance method of CombatCarouselConfig

combatCarouselConfig._updateObject(event, formData)

Update handler following form submission

Kind: instance method of CombatCarouselConfig

Param Type Description
event Event form submit event
formData Object

combatCarouselConfig.activateListeners(html)

Attach listeners

Kind: instance method of CombatCarouselConfig

Param
html

combatCarouselConfig._onImgPathChange(event, html)

Img Path Change handler

Kind: instance method of CombatCarouselConfig

Param
event
html

CombatCarouselConfig.defaultOptions

Get the default options for the class

Kind: static property of CombatCarouselConfig

config

Config module

config.NAME

Module Name

Kind: static constant of config

config.TITLE

Module title

Kind: static constant of config

config.CAROUSEL_ICONS

Module Icon Paths

Kind: static constant of config

config.SETTING_KEYS

Settings Keys

Kind: static constant of config

config.DEFAULT_CONFIG

Default Config

Kind: static constant of config

hooks

Hooks module

module.exports() ⏏

Registers hooks needed throughout the module

Kind: Exported function

overrides

Overrides module

module.exports() ⏏

Wrapper to call overrides

Kind: Exported function

module.exports~sceneNavExpandOverride()

Override sceneNavExpand to move Hook call into promise

Kind: inner method of module.exports

module.exports~sceneNavCollapseOverride()

Override sceneNavCollapse to move Hook call into promise

Kind: inner method of module.exports

settings

Settings module

module.exports() ⏏

Wrapper to call settings registration

Kind: Exported function

templates

Templates module

templates.preloadHandlebarsTemplates ⇒ Promise

Define a set of template paths to pre-load Pre-loaded templates are compiled and cached for fast access when rendering Taken from dnd5e system (see link)

Kind: static constant of templates
Link: https://gitlab.com/foundrynet/dnd5e/-/blob/master/module/templates.js

util

Util module

util.getKeyByValue(object, value)

Retrieves a key using the given value

Kind: static method of util

Param Type Description
object Object - the object that contains the key/value
value *

util.getTokenFromCombatantId(combatantId)

Helper to get Token instance based on Combatant Id

Kind: static method of util

Param Type
combatantId *

util.calculateTurns(combat)

For a given Combat instance, calculate the new turn order and return it

Kind: static method of util

Param Type Description
combat Combat a given Combat instance (default: active combat)

util.setupTurn(combatant)

Enriches combatant data to prepare for use in the CombatTracker

Kind: static method of util

Param
combatant

init