diff --git a/rpg-docs/Model/Character/Attacks.js b/rpg-docs/Model/Character/Attacks.js index a85b8316..fd4a9d84 100644 --- a/rpg-docs/Model/Character/Attacks.js +++ b/rpg-docs/Model/Character/Attacks.js @@ -42,12 +42,6 @@ Schemas.Attack = new SimpleSchema({ "poison", "psychic", "radiant", "thunder"], defaultValue: "slashing" }, - //indicates what the attack originated from - type: { - type: String, - defaultValue: "editable", - allowedValues: ["editable", "feature", "class", "buff", "equipment", "racial", "inate"] - }, //the id of the feature, buff or item that created this effect parent: { type: Schemas.Parent diff --git a/rpg-docs/Model/Character/Effects.js b/rpg-docs/Model/Character/Effects.js index 7a5c5620..87c23d37 100644 --- a/rpg-docs/Model/Character/Effects.js +++ b/rpg-docs/Model/Character/Effects.js @@ -29,12 +29,6 @@ Schemas.Effect = new SimpleSchema({ optional: true, trim: false }, - //indicates what the effect originated from - type: { - type: String, - defaultValue: "editable", - allowedValues: ["editable", "feature", "class", "buff", "equipment", "racial", "inate"] - }, //the thing that created this effect parent: { type: Schemas.Parent diff --git a/rpg-docs/Model/Character/Proficiencies.js b/rpg-docs/Model/Character/Proficiencies.js index addaa7a9..209b9bea 100644 --- a/rpg-docs/Model/Character/Proficiencies.js +++ b/rpg-docs/Model/Character/Proficiencies.js @@ -13,10 +13,6 @@ Schemas.Proficiency = new SimpleSchema({ type: Number, allowedValues: [0, 0.5, 1], }, - type: { - type: String, - allowedValues: ["skill", "save", "weapon", "armor", "tool", "language"] - } }); Proficiencies.attachSchema(Schemas.Proficiency); diff --git a/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html b/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html index 8ce4c03d..154c5cd6 100644 --- a/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html +++ b/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/rpg-docs/client/views/character/journal/raceDialog/raceDialog.html b/rpg-docs/client/views/character/journal/raceDialog/raceDialog.html index da7c1492..f92aa9fb 100644 --- a/rpg-docs/client/views/character/journal/raceDialog/raceDialog.html +++ b/rpg-docs/client/views/character/journal/raceDialog/raceDialog.html @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js b/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js index cbeaea6a..b762ef61 100644 --- a/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js +++ b/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js @@ -152,27 +152,14 @@ Template.skillDialog.helpers({ return Characters.findOne(this.charId, {fields:{_id: 1}}); }, sourceName: function(){ - var id = this.parent.id; - if(!id) return; - switch(this.type){ - case "feature": - return Features.findOne(id, {fields: {name: 1}}).name; - case "class": - return Classes.findOne(id, {fields: {name: 1}}).name; - case "buff": - return Buffs.findOne(id, {fields: {name: 1}}).name; - case "equipment": - return Items.findOne(id, {fields: {name: 1}}).name; - case "racial": - return Characters.findOne(this.charId, {fields: {race: 1}}).race; - case "inate": - return "Inate" - } + if (this.parent.collection === "Characters") return "inate"; + var parent = this.getParent(); + return parent && parent.name; }, operationName: function(){ if(this.operation === "proficiency") return null; if(stats[this.stat].group === "Weakness/Resistance") return null; - return operations[this.operation] && operations[this.operation].name || "No Operation" + return operations[this.operation] && operations[this.operation].name || "No Operation"; }, statValue: function(){ if(this.operation === "advantage" || diff --git a/rpg-docs/lib/constants/pointBuy.js b/rpg-docs/lib/functions/pointBuy.js similarity index 97% rename from rpg-docs/lib/constants/pointBuy.js rename to rpg-docs/lib/functions/pointBuy.js index b7157ef8..b4cc90cb 100644 --- a/rpg-docs/lib/constants/pointBuy.js +++ b/rpg-docs/lib/functions/pointBuy.js @@ -17,7 +17,6 @@ var getPointBuyEffect = function(stat, value, pointsUsed, charId){ name: pointsUsed + " Point Buy", operation: "base", value: value, - type: "inate", parent: {collection: "Characters", id: charId}, enabled: true, }, @@ -25,7 +24,6 @@ var getPointBuyEffect = function(stat, value, pointsUsed, charId){ charId: charId, stat: stat, operation: "base", - type: "inate" } }; };