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 @@
-
+
{{#if attacks.count}}
diff --git a/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.js b/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.js
index 66208283..aea44d6a 100644
--- a/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.js
+++ b/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.js
@@ -1,6 +1,6 @@
Template.attackEditList.helpers({
attacks: function(){
- var cursor = Attacks.find({"parent.id": this.parentId, type: this.type, charId: this.charId});
+ var cursor = Attacks.find({"parent.id": this.parentId, charId: this.charId});
return cursor;
}
});
@@ -12,8 +12,7 @@ Template.attackEditList.events({
parent: {
id: this.parentId,
collection: this.parentCollection
- },
- type: this.type,
+ }
});
},
});
diff --git a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html
index b2ab66db..658b0cae 100644
--- a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html
+++ b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html
@@ -1,4 +1,4 @@
-
+
{{#if effects.count}}
diff --git a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js
index a3e9ad39..1d7a5efa 100644
--- a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js
+++ b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js
@@ -1,6 +1,6 @@
Template.effectsEditList.helpers({
effects: function(){
- var cursor = Effects.find({"parent.id": this.parentId, "parent.collection": this.parentCollection, type: this.type});
+ var cursor = Effects.find({"parent.id": this.parentId, "parent.collection": this.parentCollection});
return cursor;
}
});
@@ -18,7 +18,6 @@ Template.effectsEditList.events({
collection: this.parentCollection
},
operation: "add",
- type: this.type,
enabled: this.enabled
});
},
diff --git a/rpg-docs/client/views/character/features/featureDialog/featureDialog.html b/rpg-docs/client/views/character/features/featureDialog/featureDialog.html
index a5a76035..661d7cb0 100644
--- a/rpg-docs/client/views/character/features/featureDialog/featureDialog.html
+++ b/rpg-docs/client/views/character/features/featureDialog/featureDialog.html
@@ -81,5 +81,5 @@
- {{> effectsEditList parentId=_id parentCollection="Features" charId=charId type="feature" name=name enabled=enabled}}
+ {{> effectsEditList parentId=_id parentCollection="Features" charId=charId name=name enabled=enabled}}
diff --git a/rpg-docs/client/views/character/inventory/itemDialog/itemDialog.html b/rpg-docs/client/views/character/inventory/itemDialog/itemDialog.html
index bfb45e22..2e8508ac 100644
--- a/rpg-docs/client/views/character/inventory/itemDialog/itemDialog.html
+++ b/rpg-docs/client/views/character/inventory/itemDialog/itemDialog.html
@@ -80,9 +80,9 @@
- {{> effectsEditList parentId=_id parentCollection="Items" charId=charId type="equipment" enabled=equipped name=name}}
+ {{> effectsEditList parentId=_id parentCollection="Items" charId=charId enabled=equipped name=name}}
- {{> attackEditList parentId=_id parentCollection="Items" charId=charId type="equipment" enabled=equipped name=name}}
+ {{> attackEditList parentId=_id parentCollection="Items" charId=charId enabled=equipped name=name}}
diff --git a/rpg-docs/client/views/character/journal/classDialog/classDialog.html b/rpg-docs/client/views/character/journal/classDialog/classDialog.html
index 307ee1b1..be7bfc46 100644
--- a/rpg-docs/client/views/character/journal/classDialog/classDialog.html
+++ b/rpg-docs/client/views/character/journal/classDialog/classDialog.html
@@ -6,7 +6,7 @@
- {{> effectsEditList parentId=_id parentCollection="Classes" charId=charId type="class"}}
+ {{> effectsEditList parentId=_id parentCollection="Classes" charId=charId}}
{{/baseDialog}}
{{/with}}
\ 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 @@
{{#baseDialog title="Race" class=colorClass hideColor="true" hideDelete="true"}}
- {{> effectsEditList parentId=charId parentCollection="Characters" charId=charId type="racial"}}
+ {{> effectsEditList parentId=charId parentCollection="Characters" charId=charId}}
{{/baseDialog}}
\ 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"
}
};
};