Removed stray console logging

closes Creatures summoned to tabletops from libraries are missing their properties #373
This commit is contained in:
ThaumRystra
2024-11-09 15:49:36 +02:00
parent 3949ea3448
commit a40cae1327
15 changed files with 6 additions and 30 deletions

View File

@@ -97,7 +97,7 @@ if (Meteor.isClient) {
} else if (Meteor.isServer) {
Meteor.startup(() => {
if (!Docs.findOne()) {
console.log('No docs found, filling documentation with defaults');
console.info('No docs found, filling documentation with defaults');
Assets.getText('docs/defaultDocs.json', (error, string) => {
const docs = JSON.parse(string)
docs.forEach(doc => Docs.insert(doc));

View File

@@ -35,7 +35,6 @@ export default function mutationToPropUpdates(mutation: Mutation) {
}
// Remove creature properties
if (mutation.removals) for (const removeOne of mutation.removals) {
console.log(removeOne);
bulkWriteOps.push({
deleteOne: {
filter: {

View File

@@ -729,7 +729,7 @@ export function calculateNestedSetOperations(docs: TreeDoc[]) {
const top = stack[stack.length - 1];
if (visitedNodes.has(top)) {
// We've arrived at this node again for some reason, this shouldn't happen
console.log('visited already, parent loop maybe?')
console.warn('visited already, parent loop maybe?')
stack.pop();
} else if (visitedChildren.has(top)) {
// We've arrived at this node after visiting the children,
@@ -793,7 +793,7 @@ export function applyNestedSetProperties<T extends TreeDoc>(docs: T[]): Forest<T
}
if (visitedNodes.has(top)) {
// We've arrived at this node again for some reason, this shouldn't happen
console.log('visited already, parent loop maybe?')
console.warn('visited already, parent loop maybe?')
stack.pop();
} else if (visitedChildren.has(top)) {
// We've arrived at this node after visiting the children,

View File

@@ -88,14 +88,11 @@ const addCreaturesFromLibraryToTabletop = new ValidatedMethod({
});
function insertSubProperties(node, creatureId: string) {
console.log({ node, })
let nodes = LibraryNodes.find({
...getFilter.descendants(node),
removed: { $ne: true },
}).fetch();
console.log('found nodes', nodes);
for (const node of nodes) {
node.root = {
id: creatureId,
@@ -116,7 +113,6 @@ function insertSubProperties(node, creatureId: string) {
});
// Insert the creature properties
console.log('final nodes', nodes);
// @ts-expect-error Batch insert not defined
if (nodes.length) CreatureProperties.batchInsert(nodes);
return node;