import{_ as e,c as t,o as r,N as a}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Module: features/trees/tree","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/trees/tree.md","lastUpdated":null}'),o={name:"api/modules/features/trees/tree.md"},d=a('

Module: features/trees/tree

Components

Interfaces

Type Aliases

GenericTree

Ƭ GenericTree: Replace<Tree<TreeOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Tree object.

Defined in

profectus/src/features/trees/tree.ts:231


GenericTreeNode

Ƭ GenericTreeNode: Replace<TreeNode<TreeNodeOptions>, { canClick: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid TreeNode object.

Defined in

profectus/src/features/trees/tree.ts:91


ResetPropagation

Ƭ ResetPropagation: (tree: GenericTree, resettingNode: GenericTreeNode) => void

Type declaration

▸ (tree, resettingNode): void

A function that is used to propagate resets through a tree.

Parameters
NameType
treeGenericTree
resettingNodeGenericTreeNode
Returns

void

Defined in

profectus/src/features/trees/tree.ts:285


Tree

Ƭ Tree<T>: Replace<T & BaseTree, { branches: GetComputableType<T["branches"]> ; leftSideNodes: GetComputableType<T["leftSideNodes"]> ; nodes: GetComputableType<T["nodes"]> ; rightSideNodes: GetComputableType<T["rightSideNodes"]> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

An object that represents a feature that is a tree of nodes with branches between them. Contains support for reset mechanics that can propagate through the tree.

Type parameters

NameType
Textends TreeOptions

Defined in

profectus/src/features/trees/tree.ts:219


TreeNode

Ƭ TreeNode<T>: Replace<T & BaseTreeNode, { canClick: GetComputableTypeWithDefault<T["canClick"], true> ; classes: GetComputableType<T["classes"]> ; color: GetComputableType<T["color"]> ; display: GetComputableType<T["display"]> ; glowColor: GetComputableType<T["glowColor"]> ; mark: GetComputableType<T["mark"]> ; style: GetComputableType<T["style"]> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

An object that represents a node on a tree.

Type parameters

NameType
Textends TreeNodeOptions

Defined in

profectus/src/features/trees/tree.ts:76

Variables

TreeNodeType

Const TreeNodeType: typeof TreeNodeType

A symbol used to identify TreeNode features.

Defined in

profectus/src/features/trees/tree.ts:29


TreeType

Const TreeType: typeof TreeType

A symbol used to identify Tree features.

Defined in

profectus/src/features/trees/tree.ts:31

Functions

branchedResetPropagation

branchedResetPropagation(tree, resettingNode): void

Propagate resets down the branches of the tree.

Parameters

NameType
treeGenericTree
resettingNodeGenericTreeNode

Returns

void

Defined in

profectus/src/features/trees/tree.ts:314


createResourceTooltip

createResourceTooltip(resource, requiredResource?, requirement?): Ref<string>

Utility for creating a tooltip for a tree node that displays a resource-based unlock requirement, and after unlock shows the amount of another resource. It sounds oddly specific, but comes up a lot.

Parameters

NameTypeDefault value
resourceResource<DecimalSource>undefined
requiredResourcenull | Resource<DecimalSource>null
requirementComputable<DecimalSource>0

Returns

Ref<string>

Defined in

profectus/src/features/trees/tree.ts:353


createTree

createTree<T>(optionsFunc): Tree<T>

Lazily creates a tree with the given options.

Type parameters

NameType
Textends TreeOptions

Parameters

NameTypeDescription
optionsFuncOptionsFunc<T, BaseTree, GenericTree>Tree options.

Returns

Tree<T>

Defined in

profectus/src/features/trees/tree.ts:242


createTreeNode

createTreeNode<T>(optionsFunc?): TreeNode<T>

Lazily creates a tree node with the given options.

Type parameters

NameType
Textends TreeNodeOptions

Parameters

NameTypeDescription
optionsFunc?OptionsFunc<T, BaseTreeNode, GenericTreeNode>Tree Node options.

Returns

TreeNode<T>

Defined in

profectus/src/features/trees/tree.ts:103


defaultResetPropagation

defaultResetPropagation(tree, resettingNode): void

Propagate resets down the tree by resetting every node in a lower row.

Parameters

NameType
treeGenericTree
resettingNodeGenericTreeNode

Returns

void

Defined in

profectus/src/features/trees/tree.ts:290


invertedResetPropagation

invertedResetPropagation(tree, resettingNode): void

Propagate resets down the tree by resetting every node in a lower row.

Parameters

NameType
treeGenericTree
resettingNodeGenericTreeNode

Returns

void

Defined in

profectus/src/features/trees/tree.ts:302

',121),c=[d];function s(i,n,l,h,f,u){return r(),t("div",null,c)}const g=e(o,[["render",s]]);export{b as __pageData,g as default};