Merge branch 'develop' into feature-tabletop
This commit is contained in:
@@ -77,7 +77,8 @@ const duplicateProperty = new ValidatedMethod({
|
||||
});
|
||||
|
||||
// Give the docs new IDs without breaking internal references
|
||||
renewDocIds({ docArray: nodes });
|
||||
const allNodes = [property, ...nodes];
|
||||
renewDocIds({ docArray: allNodes });
|
||||
|
||||
// Order the root node
|
||||
property.order += 0.5;
|
||||
@@ -86,7 +87,7 @@ const duplicateProperty = new ValidatedMethod({
|
||||
property.dirty = true;
|
||||
|
||||
// Insert the properties
|
||||
CreatureProperties.batchInsert([property, ...nodes]);
|
||||
CreatureProperties.batchInsert(allNodes);
|
||||
|
||||
// Tree structure changed by inserts, reorder the tree
|
||||
reorderDocs({
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
import { reorderDocs } from '/imports/api/parenting/order.js';
|
||||
import { setDocToLastOrder } from '/imports/api/parenting/order.js';
|
||||
import fetchDocByRef from '/imports/api/parenting/fetchDocByRef.js';
|
||||
import { union } from 'lodash';
|
||||
|
||||
const insertPropertyFromLibraryNode = new ValidatedMethod({
|
||||
name: 'creatureProperties.insertPropertyFromLibraryNode',
|
||||
@@ -178,6 +179,7 @@ function reifyNodeReferences(nodes, visitedRefs = new Set(), depth = 0) {
|
||||
try {
|
||||
referencedNode = fetchDocByRef(node.ref);
|
||||
referencedNode.order = node.order;
|
||||
referencedNode.tags = union(node.tags, referencedNode.tags);
|
||||
// We are definitely replacing this node, so add it to the list
|
||||
visitedRefs.add(node._id);
|
||||
} catch (e) {
|
||||
|
||||
@@ -21,7 +21,7 @@ const updateCreatureProperty = new ValidatedMethod({
|
||||
},
|
||||
mixins: [RateLimiterMixin],
|
||||
rateLimit: {
|
||||
numRequests: 5,
|
||||
numRequests: 12,
|
||||
timeInterval: 5000,
|
||||
},
|
||||
run({ _id, path, value }) {
|
||||
|
||||
Reference in New Issue
Block a user