Began adding creature templates to libraries

This commit is contained in:
ThaumRystra
2024-06-05 15:10:22 +02:00
parent 6070c499cc
commit 99c14099dc
18 changed files with 774 additions and 26 deletions

View File

@@ -117,7 +117,7 @@ function insertPropertyFromNode(nodeId, root, parentId) {
return node;
}
function storeLibraryNodeReferences(nodes) {
export function storeLibraryNodeReferences(nodes) {
nodes.forEach(node => {
if (node.libraryNodeId) return;
node.libraryNodeId = node._id;
@@ -126,7 +126,7 @@ function storeLibraryNodeReferences(nodes) {
// Covert node references into actual nodes
// TODO: check permissions for each library a reference node references
function reifyNodeReferences(nodes, visitedRefs = new Set(), depth = 0) {
export function reifyNodeReferences(nodes, visitedRefs = new Set(), depth = 0) {
depth += 1;
// New nodes added this function
let newNodes = [];