diff --git a/dataSources/srd/adventuringGear.json b/dataSources/srd/adventuringGear.json index c285430b..2cd6f96f 100644 --- a/dataSources/srd/adventuringGear.json +++ b/dataSources/srd/adventuringGear.json @@ -21,32 +21,40 @@ "weight": 1 }, { - "name": "Arrows (20)", - "plural": "Arrows (20)", + "libraryName": "Arrows (20)", + "name": "Arrow", + "plural": "Arrows", "description": "", - "value": 1, - "weight": 1 + "value": 0.05, + "weight": 0.05, + "quantity": 20 }, { - "name": "Blowgun needles (5)", - "plural": "Blowgun needles (5)", + "libraryName": "Blowgun needles (5)", + "name": "Blowgun needle", + "plural": "Blowgun needles", "description": "", - "value": 1, - "weight": 1 + "value": 0.2, + "weight": 0.2, + "quantity": 5 }, { - "name": "Crossbow bolts (20)", - "plural": "Crossbow bolts (20)", + "libraryName": "Crossbow bolts (20)", + "name": "Crossbow bolt", + "plural": "Crossbow bolts", "description": "", - "value": 1, - "weight": 1.5 + "value": 0.05, + "weight": 0.075, + "quantity": 20 }, { - "name": "Sling bullets (20)", - "plural": "Sling bullets (20)", + "libraryName": "Sling bullets (20)", + "name": "Sling bullet", + "plural": "Sling bullets", "description": "", - "value": 0.04, - "weight": 1.5 + "value": 0.002, + "weight": 0.075, + "quantity": 20 }, { "name": "Antitoxin (vial)", @@ -651,11 +659,13 @@ "weight": 3 }, { - "name": "Spikes, iron (10)", - "plural": "Spikes, iron (10)", + "libraryName": "Spikes, iron (10)", + "name": "Spike, iron", + "plural": "Spikes, iron", "description": "", - "value": 1, - "weight": 5 + "value": 0.1, + "weight": 0.5, + "quantity": 10 }, { "name": "Spyglass", diff --git a/rpg-docs/Model/Library/LibraryItems.js b/rpg-docs/Model/Library/LibraryItems.js index 7279ecc1..569e1df9 100644 --- a/rpg-docs/Model/Library/LibraryItems.js +++ b/rpg-docs/Model/Library/LibraryItems.js @@ -1,6 +1,7 @@ LibraryItems = new Mongo.Collection("libraryItems"); Schemas.LibraryItems = new SimpleSchema({ + libraryName:{type: String, optional: true, trim: false}, name: {type: String, defaultValue: "New Item", trim: false}, plural: {type: String, optional: true, trim: false}, description:{type: String, optional: true, trim: false}, diff --git a/rpg-docs/client/views/character/inventory/inventory.js b/rpg-docs/client/views/character/inventory/inventory.js index ac31e39f..4234ecff 100644 --- a/rpg-docs/client/views/character/inventory/inventory.js +++ b/rpg-docs/client/views/character/inventory/inventory.js @@ -156,7 +156,7 @@ Template.inventory.events({ return; } // Make the library item into a regular item - let item = _.omit(result, "library", "attacks", "effects"); + let item = _.omit(result, "libraryName", "library", "attacks", "effects"); delete item.settings.category; // Update the item to match library item Items.update(itemId, {$set: item}); diff --git a/rpg-docs/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.html b/rpg-docs/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.html index 3a8110c9..1dcb352e 100644 --- a/rpg-docs/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.html +++ b/rpg-docs/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.html @@ -61,15 +61,15 @@