Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d05874ed13 | ||
|
|
df2521e69c | ||
|
|
3c6a685fe8 | ||
|
|
a77e560284 | ||
|
|
4cec83918f |
60
README.md
60
README.md
@@ -1,58 +1,4 @@
|
|||||||
TODO
|
RPG Docs
|
||||||
====
|
========
|
||||||
|
|
||||||
* Get Polymer installed using bower.
|
This is the repo for [DiceCloud](dicecloud.com). The currently deployed version should always be the head of the master branch.
|
||||||
* Install Vulcanize package listed below
|
|
||||||
* Copy the differential polymer demo to get polymer implemented nicely
|
|
||||||
* Update Meteor
|
|
||||||
* Install and use LESS
|
|
||||||
|
|
||||||
Packages used
|
|
||||||
=============
|
|
||||||
|
|
||||||
* meteor-platform
|
|
||||||
* Base Meteor.
|
|
||||||
* [Docs](http://docs.meteor.com/#/full/)
|
|
||||||
* autopublish
|
|
||||||
* Publishes everything to the client.
|
|
||||||
* Must be removed before release
|
|
||||||
* insecure
|
|
||||||
* Allows the client the freedom to modify any colleciton.
|
|
||||||
* Must be removed before release
|
|
||||||
* iron:router
|
|
||||||
* Enables pagination and URL's to direct to specific templates.
|
|
||||||
* [Tutorial](http://www.manuel-schoebel.com/blog/iron-router-tutorial)
|
|
||||||
* accounts-password
|
|
||||||
* Lets users create accounts with a simple password
|
|
||||||
* accounts-ui
|
|
||||||
* Adds simple UI for logging in
|
|
||||||
* random
|
|
||||||
* Somewhat decent cryptographically strong psuedo random number generation.
|
|
||||||
* [readme](https://atmospherejs.com/meteor/random)
|
|
||||||
* dburles:collection-helpers
|
|
||||||
* Adds template-style helpers to collections. [github page](https://github.com/dburles/meteor-collection-helpers)
|
|
||||||
* reactive-var
|
|
||||||
* Friendly reactive variables
|
|
||||||
* [Meteor Docs](http://docs.meteor.com/#/full/reactivevar_pkg)
|
|
||||||
* cw4gn3r:jquery-event-drag
|
|
||||||
* Adds jquery drag events
|
|
||||||
* underscore
|
|
||||||
* Handy javascript utilities
|
|
||||||
* [Docs](http://underscorejs.org/)
|
|
||||||
* aldeed:collection2
|
|
||||||
* Extends collections with Schemas
|
|
||||||
* [(gitHub page)](https://github.com/aldeed/meteor-collection2)
|
|
||||||
* uses [SimpleSchema](https://github.com/aldeed/meteor-simple-schema)
|
|
||||||
* aldeed:autoform
|
|
||||||
* Automatically generates bootstrap forms for collection2 Schemas.
|
|
||||||
* [github](https://github.com/aldeed/meteor-autoform)
|
|
||||||
* differential:vulcanize
|
|
||||||
* Bakes all the polymer imports into one file
|
|
||||||
* [github](https://github.com/Differential/meteor-vulcanize)
|
|
||||||
|
|
||||||
************
|
|
||||||
|
|
||||||
Resources
|
|
||||||
=========
|
|
||||||
|
|
||||||
[differential's polymer demo](https://github.com/Differential/polymer-demo)
|
|
||||||
|
|||||||
@@ -69,5 +69,17 @@ Attacks.attachSchema(Schemas.Attack);
|
|||||||
Attacks.attachBehaviour("softRemovable");
|
Attacks.attachBehaviour("softRemovable");
|
||||||
makeChild(Attacks, ["name", "enabled"]); //children of lots of things
|
makeChild(Attacks, ["name", "enabled"]); //children of lots of things
|
||||||
|
|
||||||
|
Attacks.after.insert(function (userId, attack) {
|
||||||
|
//Check to see if this attack's parent is a spell, if so, mirror prepared state to enabled
|
||||||
|
if (attack.parent.collection === "Spells") {
|
||||||
|
var parentSpell = Spells.findOne(attack.parent.id);
|
||||||
|
if (parentSpell.prepared === "unprepared") {
|
||||||
|
Attacks.update(attack._id, {$set: {enabled: false}});
|
||||||
|
} else if (parentSpell.prepared === "prepared" || "always") {
|
||||||
|
Attacks.update(attack._id, {$set: {enabled: true}});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Attacks.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
Attacks.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||||
Attacks.deny(CHARACTER_SUBSCHEMA_DENY);
|
Attacks.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||||
|
|||||||
@@ -64,5 +64,21 @@ Spells.attachBehaviour("softRemovable");
|
|||||||
makeChild(Spells); //children of spell lists
|
makeChild(Spells); //children of spell lists
|
||||||
makeParent(Spells, ["name", "enabled"]); //parents of attacks
|
makeParent(Spells, ["name", "enabled"]); //parents of attacks
|
||||||
|
|
||||||
|
Spells.after.update(function (userId, spell, fieldNames) {
|
||||||
|
//Update prepared state of spell and child attacks to be enabled or not
|
||||||
|
if (_.contains(fieldNames, "prepared")) {
|
||||||
|
var childAttacks = Attacks.find({"parent.id": spell._id}).fetch();
|
||||||
|
if (spell.prepared === "unprepared") {
|
||||||
|
_.each(childAttacks, function(attack){
|
||||||
|
Attacks.update(attack._id, {$set: {enabled: false}});
|
||||||
|
});
|
||||||
|
} else if (spell.prepared === "prepared" || "always") {
|
||||||
|
_.each(childAttacks, function(attack){
|
||||||
|
Attacks.update(attack._id, {$set: {enabled: true}});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Spells.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
Spells.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||||
Spells.deny(CHARACTER_SUBSCHEMA_DENY);
|
Spells.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||||
|
|||||||
@@ -268,3 +268,10 @@ ChangeLogs.insert({
|
|||||||
"Changed how columns are presented to fix a display issue introduced in Chrome 44",
|
"Changed how columns are presented to fix a display issue introduced in Chrome 44",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.7.2",
|
||||||
|
changes: [
|
||||||
|
"Fixed spell attacks appearing on features page when the spell is not prepared",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user