You've already forked obsidian-visualiser
Change shared files naming. Rework tree structure and item management rendering.
This commit is contained in:
18
app/types/character.d.ts
vendored
18
app/types/character.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import type { MAIN_STATS, ABILITIES, LEVELS, TRAINING_LEVELS, SPELL_TYPES, CATEGORIES, SPELL_ELEMENTS, ALIGNMENTS, RESISTANCES, DAMAGE_TYPES, WEAPON_TYPES, PropertySum, ITEM_BUFFER_KEYS } from "#shared/character.util";
|
||||
import type { MAIN_STATS, ABILITIES, LEVELS, TRAINING_LEVELS, SPELL_TYPES, CATEGORIES, SPELL_ELEMENTS, ALIGNMENTS, RESISTANCES, DAMAGE_TYPES, WEAPON_TYPES, PropertySum, ITEM_BUFFER_KEYS } from "#shared/character";
|
||||
import type { Localized } from "../types/general";
|
||||
|
||||
export type MainStat = typeof MAIN_STATS[number];
|
||||
@@ -57,11 +57,19 @@ export type CharacterVariables = {
|
||||
|
||||
money: number;
|
||||
};
|
||||
export enum TreeFlag {
|
||||
AUTOMATIC = 1 << 0,
|
||||
REPEATING = 1 << 1,
|
||||
};
|
||||
export type TreeLeaf = {
|
||||
id: FeatureID;
|
||||
to?: FeatureID | Array<FeatureID> | Record<string, FeatureID>;
|
||||
flags?: number; //Flags from TreeFlag
|
||||
};
|
||||
export type TreeStructure = {
|
||||
name: string;
|
||||
nodes: FeatureID[];
|
||||
|
||||
paths: Record<number, number | number[]>;
|
||||
starts: FeatureID;
|
||||
nodes: Record<FeatureID, TreeLeaf>;
|
||||
};
|
||||
type CommonState = {
|
||||
capacity?: number;
|
||||
@@ -212,7 +220,7 @@ export type FeatureTree = {
|
||||
id: FeatureID;
|
||||
category: "tree";
|
||||
tree: string;
|
||||
option?: number;
|
||||
option?: string;
|
||||
};
|
||||
export type FeatureChoice = {
|
||||
id: FeatureID;
|
||||
|
||||
Reference in New Issue
Block a user