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.
}
interface Component extends ComponentData{
isSame: (component:ComponentData)=>boolean
getEntity: ()=>Promise<any>
}
interface Currencies {
[id: string]: number
}
interface SkillConfig {
id: string,
label: string,
uuid?: string //system dependent if this is an item
}
interface AbilityConfig {
id: string,
label: string,
uuid?: string //system dependent if this is an item
}
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
}
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
}
interface ItemChange {
create: any[]
update: any[],
merge: string[],
delete: ComponentData[]
}
interface TokenMovementInstance {
move:(x:number,y:number)=>void
}