Skip to content
AngryBeaver edited this page Aug 4, 2023 · 8 revisions

ComponentData

interface ComponentData {
    id: string
    uuid: string;
    type: string;
    name: string;
    img: string;
    quantity: number;
    itemType?: string;      //if it is of type item there is an itemType
    jsonData?: string;      //optional storage of the original object
    [key: string]: unknown; //this is system dependent information! do not rely on it. It is only needed for internal behavior e.g. isSame.

}

Component

interface Component extends ComponentData{
    isSame: (component:ComponentData)=>boolean
    getEntity: ()=>Promise<any>
}

Currencies

interface Currencies {
    [id: string]: number
}

SkillConfig

interface SkillConfig {
    id: string,
    label: string,
    uuid?: string //system dependent if this is an item
}

AbilityConfig

interface AbilityConfig {
    id: string,
    label: string,
    uuid?: string //system dependent if this is an item
}

CurrencyConfig

interface CurrencyConfig {
    id: string,
    label: string,
    factor: number, //factor how often the lowest currency fits into this currency
    uuid?: string, //system dependent if currency is an item instead of an attribute
    component?: Component //will get automatically attached when an uuid is given
}

SelectData

interface SelectData {
    choices:{
        [id:string]:{     //id of your choice
            text:string,  //text of your choice
            img?:string   //optional image of your choice
        }
    },
    selected?: string,    //id of preselection
    name?: string         //name of input for usage within form
    size?:string          //height of the selection default 20px size:l=30px
    disabled?:string      //simulates disabled
}

ItemChange

interface ItemChange {
    create: any[]
    update: any[],
    merge: string[],
    delete: ComponentData[]
}

TokenMovementInstance

interface TokenMovementInstance {
    move:(x:number,y:number)=>void
}

Clone this wiki locally