-
+
-
-
-
-
- {{#each features}}
-
-
-
{{name}}
-
-
-
-
- {{/each}}
-
-
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/features/features.js b/rpg-docs/client/views/character/features/features.js
index 0f61c4cb..03d56f9f 100644
--- a/rpg-docs/client/views/character/features/features.js
+++ b/rpg-docs/client/views/character/features/features.js
@@ -11,16 +11,16 @@ Template.features.events({
GlobalUI.showDialog({
heading: "New Feature",
template: "featureDialog",
- data: {featureId: featureId},
+ data: {featureId: featureId, charId: this._id},
fullOnMobile: true
})
},
"tap .featureCard": function(event){
var featureId = this._id;
- GlobalUI.showDialog({
+ GlobalUI.setDialog({
heading: this.name,
template: "featureDialog",
- data: {featureId: featureId},
+ data: {featureId: featureId, charId: Template.parentData()._id},
fullOnMobile: true
})
}
diff --git a/rpg-docs/client/views/character/features/featuresDialog.css b/rpg-docs/client/views/character/features/featuresDialog.css
index d8a4fda9..0765c384 100644
--- a/rpg-docs/client/views/character/features/featuresDialog.css
+++ b/rpg-docs/client/views/character/features/featuresDialog.css
@@ -1,5 +1,5 @@
body /deep/ .featureDialogWidth {
- width: 600px;
+ width: 560px;
}
body /deep/ #statGroupDropDown {
@@ -20,4 +20,13 @@ body /deep/ #damageMultiplierDropDown {
body /deep/ #proficiencyDropDown {
width: 120px;
+}
+
+html /deep/ paper-input {
+ margin-bottom: 1px;
+}
+
+html /deep/ .featureEffect {
+ display: flex;
+ align-items: flex-end;
}
\ No newline at end of file
diff --git a/rpg-docs/client/views/layout/imports.html b/rpg-docs/client/views/layout/imports.html
index 4ff1ca7b..a78c84e2 100644
--- a/rpg-docs/client/views/layout/imports.html
+++ b/rpg-docs/client/views/layout/imports.html
@@ -6,10 +6,13 @@
+
+
+
@@ -18,6 +21,7 @@
+
diff --git a/rpg-docs/client/views/layout/layout.html b/rpg-docs/client/views/layout/layout.html
index 540cb8cc..051c6b19 100644
--- a/rpg-docs/client/views/layout/layout.html
+++ b/rpg-docs/client/views/layout/layout.html
@@ -14,8 +14,8 @@
diff --git a/rpg-docs/lib/functions/characterUtility.js b/rpg-docs/lib/functions/characterUtility.js
index 093c38f3..28455731 100644
--- a/rpg-docs/lib/functions/characterUtility.js
+++ b/rpg-docs/lib/functions/characterUtility.js
@@ -3,5 +3,5 @@ getMod = function(score){
}
signedString = function(number){
- return number > 0? "+" + number : "" + number;
+ return number >= 0? "+" + number : "" + number;
}
\ No newline at end of file
diff --git a/rpg-docs/lib/methods/actionUtils.js b/rpg-docs/lib/methods/actionUtils.js
deleted file mode 100644
index fa8002a3..00000000
--- a/rpg-docs/lib/methods/actionUtils.js
+++ /dev/null
@@ -1,22 +0,0 @@
-Meteor.methods({
- updateAction: function (charId, oldAction, newAction) {
- var selector = {_id: charId, "actions._id": oldAction._id};
- var setter = {"actions.$": newAction};
- Characters.update(
- selector,
- { $set: setter }
- );
- }
-});
-
-pullAction = function(id, action){
- var pullObject = {};
- pullObject["actions"] = {_id: action._id};
- Characters.update(id, {$pull: pullObject });
-};
-
-pushAction = function(id, action){
- var pushObject = {};
- pushObject["actions"] = action;
- Characters.update(id, {$push: pushObject});
-};
diff --git a/rpg-docs/lib/methods/attackUtils.js b/rpg-docs/lib/methods/attackUtils.js
deleted file mode 100644
index e9f7d1f0..00000000
--- a/rpg-docs/lib/methods/attackUtils.js
+++ /dev/null
@@ -1,22 +0,0 @@
-Meteor.methods({
- updateAttack: function (charId, oldAttack, newAttack) {
- var selector = {_id: charId, "attacks._id": oldAttack._id};
- var setter = {"attacks.$": newAttack};
- Characters.update(
- selector,
- { $set: setter }
- );
- }
-});
-
-pullAttack = function(id, attack){
- var pullObject = {};
- pullObject["attacks"] = {_id: attack._id};
- Characters.update(id, {$pull: pullObject });
-};
-
-pushAttack = function(id, attack){
- var pushObject = {};
- pushObject["attacks"] = attack;
- Characters.update(id, {$push: pushObject});
-};
diff --git a/rpg-docs/lib/methods/effectUtils.js b/rpg-docs/lib/methods/effectUtils.js
deleted file mode 100644
index cdabd81c..00000000
--- a/rpg-docs/lib/methods/effectUtils.js
+++ /dev/null
@@ -1,41 +0,0 @@
-Meteor.methods({
- updateEffect: function (charId, attributeName, effectId, newEffect) {
- var selector = {_id: charId};
- selector[attributeName + ".effects._id"] = effectId;
- var setter = {};
- setter[attributeName + ".effects.$"] = newEffect
- Characters.update(
- selector,
- { $set: setter }
- )
- },
- updateFeatureEffect: function (featureId, newEffect) {
- var selector = {_id: featureId};
- selector["effects._id"] = newEffect._id;
- var setter = {};
- setter["effects.$"] = newEffect
- Features.update(
- selector,
- { $set: setter }
- )
- }
-});
-
-//pull a single effect by stat and id
-pullEffect = function(id, effect){
- if(effect.stat){
- var pullObject = {};
- pullObject[effect.stat + ".effects"] = {_id: effect._id};
- Characters.update(id, {$pull: pullObject });
- }
-},
-
-pushEffect = function(id, effect){
- if(effect.stat){
- var pushObject = {};
- pushObject[effect.stat + ".effects"] = effect;
- Characters.update(id, {$push: pushObject});
- }
-}
-
-
diff --git a/rpg-docs/lib/methods/featureUtils.js b/rpg-docs/lib/methods/featureUtils.js
deleted file mode 100644
index d6a4a98a..00000000
--- a/rpg-docs/lib/methods/featureUtils.js
+++ /dev/null
@@ -1,30 +0,0 @@
-addFeatureEffects = function(charId, newFeature){
- _.each(newFeature.effects, function(effect){
- if(newFeature.name) effect.name = newFeature.name;
- pushEffect(charId, effect);
- });
- _.each(newFeature.actions, function(action){
- pushAction(charId, action);
- });
- _.each(newFeature.attacks, function(attack){
- pushAttack(charId, attack);
- });
- _.each(newFeature.spells, function(spell){
- pushSpell(charId, spell);
- });
-}
-
-removeFeatureEffects = function(charId, oldFeature){
- _.each(oldFeature.effects, function(effect){
- pullEffect(charId, effect);
- });
- _.each(oldFeature.actions, function(action){
- pullAction(charId, action);
- });
- _.each(oldFeature.attacks, function(attack){
- pullAttack(charId, attack);
- });
- _.each(oldFeature.spells, function(spell){
- pullSpell(charId, spell);
- });
-};
\ No newline at end of file
diff --git a/rpg-docs/lib/methods/spellUtils.js b/rpg-docs/lib/methods/spellUtils.js
deleted file mode 100644
index 54d73f8d..00000000
--- a/rpg-docs/lib/methods/spellUtils.js
+++ /dev/null
@@ -1,22 +0,0 @@
-Meteor.methods({
- updateSpell: function (charId, oldSpell, newSpell) {
- var selector = {_id: charId, "spells._id": oldSpell._id};
- var setter = {"spells.$": newSpell};
- Characters.update(
- selector,
- { $set: setter }
- );
- }
-});
-
-pullSpell = function(id, spell){
- var pullObject = {};
- pullObject["spells"] = {_id: spell._id};
- Characters.update(id, {$pull: pullObject });
-};
-
-pushSpell = function(id, spell){
- var pushObject = {};
- pushObject["spells"] = spell;
- Characters.update(id, {$push: pushObject});
-};
diff --git a/rpg-docs/nohup.out b/rpg-docs/nohup.out
new file mode 100644
index 00000000..7e1185b8
--- /dev/null
+++ b/rpg-docs/nohup.out
@@ -0,0 +1,8 @@
+[[[[[ ~/workspace/rpg-docs ]]]]]
+
+=> Started proxy.
+=> Started MongoDB.
+Vulcanize: Adding all imports...
+=> Started your app.
+
+=> App running at: http://localhost:3000/
diff --git a/rpg-docs/server/publications/singleCharacter.js b/rpg-docs/server/publications/singleCharacter.js
index 92548212..250b9723 100644
--- a/rpg-docs/server/publications/singleCharacter.js
+++ b/rpg-docs/server/publications/singleCharacter.js
@@ -13,4 +13,8 @@ Meteor.publish("characterItems", function(characterId, userId){
Meteor.publish("characterFeatures", function(characterId, userId){
return Features.find({charId: characterId});
-});
\ No newline at end of file
+});
+
+Meteor.publish("characterEffects", function(characterId, userId){
+ return Effects.find({charId: characterId});
+});