Files
DiceCloud/dataSources/srd/srdimport.js
2017-05-05 11:11:56 +02:00

18 lines
420 B
JavaScript

// Only do if the library doesn't exist yet
id = Libraries.insert({
_id: "SRDLibraryGA3XWsd",
owner: Meteor.userId(),
name: "SRD Library",
});
_.each(items, (item) => {
item.settings = {category: }; // "adventuringGear", "armor", "weapons", "tools"
item.library = "SRDLibraryGA3XWsd"
LibraryItems.insert(item)
});
_.each(spells, (spell) => {
spell.library = "SRDLibraryGA3XWsd"
LibrarySpells.insert(spell)
});