Compare commits

...

5 Commits

Author SHA1 Message Date
Stefan Zermatten
614284c73d Updated Meteor and some packages 2017-09-22 12:52:21 +02:00
Stefan Zermatten
6528fc8bab Improved vMix export
closes #138
2017-09-22 11:41:32 +02:00
Stefan Zermatten
020930b2e4 Checked if old hitpoint slider exists before resetting it
closes #135
2017-09-22 11:03:00 +02:00
Stefan Zermatten
dcd76e06e1 Merge branch 'fixbug-137-multiadd-spells-delete-themselves' 2017-09-22 10:43:04 +02:00
Stefan Zermatten
8a58002415 Fixed spells in the library using their library ID's in the spells collection
closes #137
2017-09-22 10:42:34 +02:00
7 changed files with 125 additions and 86 deletions

View File

@@ -13,3 +13,5 @@ notices-for-facebook-graph-api-2
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package

View File

@@ -4,7 +4,7 @@
# but you can also edit it by hand.
iron:router
accounts-password@1.3.3
accounts-password@1.4.0
accounts-ui@1.1.9
random@1.0.10
dburles:collection-helpers
@@ -18,35 +18,37 @@ dburles:mongo-collection-instances
percolate:migrations
ecwyne:mathjs
useraccounts:polymer
accounts-google@1.0.11
accounts-google@1.2.0
splendido:accounts-meld
email@1.1.18
email@1.2.3
meteorhacks:subs-manager
chuangbo:marked
reywood:iron-router-ga
meteor-base@1.0.4
meteor-base@1.1.0
mobile-experience@1.0.4
mongo@1.1.14
mongo@1.2.0
blaze-html-templates
session@1.1.7
jquery@1.11.10
tracker@1.1.1
logging@1.1.16
tracker@1.1.3
logging@1.1.17
reload@1.1.11
ejson@1.0.13
ejson@1.0.14
spacebars
check@1.2.4
check@1.2.5
useraccounts:iron-routing
wizonesolutions:canonical
standard-minifier-js@1.2.1
shell-server@0.2.1
standard-minifier-js@2.1.1
shell-server@0.2.4
seba:minifiers-autoprefixer
nikogosovd:multiple-uihooks
templates:array
ecmascript@0.6.1
ecmascript@0.8.2
es5-shim@4.6.15
differential:vulcanize
reactive-dict
reactive-dict@1.1.9
percolate:synced-cron
ongoworks:speakingurl
service-configuration
service-configuration@1.0.11
google-config-ui
dynamic-import

View File

@@ -1 +1 @@
METEOR@1.4.2.6
METEOR@1.5.2

View File

@@ -1,53 +1,57 @@
accounts-base@1.2.14
accounts-google@1.0.11
accounts-base@1.3.3
accounts-google@1.2.0
accounts-oauth@1.1.15
accounts-password@1.3.3
accounts-password@1.4.0
accounts-ui@1.1.9
accounts-ui-unstyled@1.1.13
accounts-ui-unstyled@1.2.1
aldeed:collection2@2.10.0
aldeed:collection2-core@1.2.0
aldeed:schema-deny@1.1.0
aldeed:schema-index@1.1.1
aldeed:simple-schema@1.5.3
allow-deny@1.0.5
allow-deny@1.0.9
autoupdate@1.3.12
babel-compiler@6.13.0
babel-compiler@6.20.0
babel-runtime@1.0.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.0
blaze-html-templates@1.1.0
blaze@2.3.2
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.0.11
boilerplate-generator@1.2.0
caching-compiler@1.1.9
caching-html-compiler@1.1.0
caching-html-compiler@1.1.2
callback-hook@1.0.10
check@1.2.4
check@1.2.5
chuangbo:marked@0.3.5_1
coffeescript@1.11.1_4
dburles:collection-helpers@1.1.0
dburles:mongo-collection-instances@0.3.5
ddp@1.2.5
ddp-client@1.3.2
ddp-common@1.2.8
ddp-rate-limiter@1.0.6
ddp-server@1.3.12
ddp@1.3.1
ddp-client@2.1.3
ddp-common@1.2.9
ddp-rate-limiter@1.0.7
ddp-server@2.0.2
deps@1.0.12
diff-sequence@1.0.7
differential:vulcanize@3.0.0
ecmascript@0.6.1
ecmascript-runtime@0.3.15
dynamic-import@0.1.3
ecmascript@0.8.2
ecmascript-runtime@0.4.1
ecmascript-runtime-client@0.4.3
ecmascript-runtime-server@0.4.1
ecwyne:mathjs@0.25.0
ejson@1.0.13
email@1.1.18
ejson@1.0.14
email@1.2.3
es5-shim@4.6.15
fastclick@1.0.13
geojson-utils@1.0.10
google@1.1.15
google-config-ui@1.0.0
google-oauth@1.2.4
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.2.10
http@1.2.12
id-map@1.0.9
iron:controller@1.0.12
iron:core@1.0.11
@@ -55,45 +59,46 @@ iron:dynamic-template@1.0.12
iron:layout@1.0.12
iron:location@1.0.11
iron:middleware-stack@1.1.0
iron:router@1.1.1
iron:url@1.0.11
iron:router@1.1.2
iron:url@1.1.0
jquery@1.11.10
lai:collection-extensions@0.2.1_1
launch-screen@1.1.0
launch-screen@1.1.1
less@2.7.9
livedata@1.0.18
localstorage@1.0.12
logging@1.1.16
localstorage@1.1.1
logging@1.1.17
matb33:collection-hooks@0.8.4
mdg:validation-error@0.5.1
meteor@1.6.0
meteor-base@1.0.4
meteor@1.7.2
meteor-base@1.1.0
meteorhacks:subs-manager@1.6.4
minifier-css@1.2.16
minifier-js@1.2.17
minimongo@1.0.19
minifier-js@2.1.3
minimongo@1.3.1
mobile-experience@1.0.4
mobile-status-bar@1.0.13
modules@0.7.7
modules-runtime@0.7.8
momentjs:moment@2.17.1
mongo@1.1.14
mobile-status-bar@1.0.14
modules@0.10.0
modules-runtime@0.8.0
momentjs:moment@2.18.1
mongo@1.2.2
mongo-dev-server@1.0.1
mongo-id@1.0.6
nikogosovd:multiple-uihooks@0.1.8
npm-bcrypt@0.9.2
npm-mongo@2.2.16_1
oauth@1.1.12
npm-bcrypt@0.9.3
npm-mongo@2.2.30
oauth@1.1.13
oauth2@1.1.11
observe-sequence@1.0.14
observe-sequence@1.0.16
ongoworks:speakingurl@9.0.0
ordered-dict@1.0.9
percolate:migrations@0.9.8
percolate:synced-cron@1.3.2
promise@0.8.8
promise@0.9.0
raix:eventemitter@0.1.3
random@1.0.10
rate-limit@1.0.6
reactive-dict@1.1.8
rate-limit@1.0.8
reactive-dict@1.1.9
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
@@ -103,27 +108,27 @@ seba:minifiers-autoprefixer@1.0.1
service-configuration@1.0.11
session@1.1.7
sha@1.0.9
shell-server@0.2.1
softwarerero:accounts-t9n@1.3.7
spacebars@1.0.13
spacebars-compiler@1.1.0
shell-server@0.2.4
softwarerero:accounts-t9n@1.3.11
spacebars@1.0.15
spacebars-compiler@1.1.3
splendido:accounts-emails-field@1.2.0
splendido:accounts-meld@1.3.1
srp@1.0.10
standard-minifier-js@1.2.2
standard-minifier-js@2.1.1
templates:array@1.0.3
templating@1.3.0
templating-compiler@1.3.0
templating-runtime@1.3.0
templating-tools@1.1.0
tracker@1.1.1
ui@1.0.12
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
tracker@1.1.3
ui@1.0.13
underscore@1.0.10
url@1.0.11
url@1.1.0
useraccounts:core@1.14.2
useraccounts:iron-routing@1.14.2
useraccounts:polymer@1.14.2
webapp@1.3.12
webapp@1.3.19
webapp-hashing@1.0.9
wizonesolutions:canonical@0.0.5
zimme:collection-behaviours@1.1.3

View File

@@ -267,9 +267,11 @@ Template.spells.events({
//loop through all returned spells
_.each(resultArray, (rawSpell, index) =>{
// Make the library spell into a regular spell
let spell = _.omit(rawSpell, "library", "attacks", "effects");
let spell = _.omit(rawSpell, "_id", "library", "attacks", "effects");
// Use the ID generated earlier for the first spell so we
// can animate to it
if (index == 0) {
spell._id = spellId; //only do this for the first spell added
spell._id = spellId;
}
spell.charId = charId;
spell.parent = {

View File

@@ -16,7 +16,8 @@ Template.healthCard.onRendered(function(){
const id = Template.currentData()._id;
if (oldId !== id){
this.find("#hitPointSlider").resetOldValue();
this.find("#temporaryHitPointSlider").resetOldValue();
var thpSlider = this.find("#temporaryHitPointSlider");
thpSlider && thpSlider.resetOldValue();
oldId = id;
}
});

View File

@@ -17,11 +17,18 @@ characterExport = function(charId){
return Characters.calculate.attributeValue(charId, attributeName);
};
var abilityMod = function(attributeName){
return Characters.calculate.abilityMod(charId, attributeName)
return signedString(
Characters.calculate.abilityMod(charId, attributeName)
);
};
var skillMod = function(skillName){
return Characters.calculate.skillMod(charId, skillName);
return signedString(
Characters.calculate.skillMod(charId, skillName)
);
};
var proficiency = function(skillName){
return Characters.calculate.proficiency(charId, skillName);
}
var damageMods = getDamageMods(charId);
var character = {
"Id": char._id,
@@ -45,7 +52,7 @@ characterExport = function(charId){
"Languages": getLanguages(charId),
"Description": char.description || "",
"Backstory": char.backstory || "",
"Personality": char.Personality || "" ,
"Personality": char.personality || "" ,
"Bonds": char.bonds || "",
"Ideals": char.ideals || "",
"Flaws": char.flaws || "",
@@ -69,12 +76,18 @@ characterExport = function(charId){
"DamageResistances": damageMods.resistances,
"DamageImmunities": damageMods.immunities,
"StrSave": skillMod("strengthSave"),
"DexSave": skillMod("dexteritySave"),
"ConSave": skillMod("constitutionSave"),
"IntSave": skillMod("intelligenceSave"),
"WisSave": skillMod("wisdomSave"),
"ChaSave": skillMod("charismaSave"),
"StrengthSave": skillMod("strengthSave"),
"StrengthSaveProficiency": proficiency("strengthSave"),
"DexteritySave": skillMod("dexteritySave"),
"DexteritySaveProficiency": proficiency("dexteritySave"),
"ConstitutionSave": skillMod("constitutionSave"),
"ConstitutionSaveProficiency": proficiency("constitutionSave"),
"intelligenceSave": skillMod("intelligenceSave"),
"intelligenceSaveProficiency": proficiency("intelligenceSave"),
"WisdomSave": skillMod("wisdomSave"),
"WisdomSaveProficiency": proficiency("wisdomSave"),
"CharismaSave": skillMod("charismaSave"),
"CharismaSaveProficiency": proficiency("charismaSave"),
"Level1SpellSlots": attributeValue("level1SpellSlots"),
"Level2SpellSlots": attributeValue("level2SpellSlots"),
@@ -89,6 +102,10 @@ characterExport = function(charId){
"Rages": attributeValue("rages"),
"RageDamage": attributeValue("rageDamage"),
"SorceryPoints": attributeValue("sorceryPoints"),
"DeathSavePasses": char.deathSave.pass,
"DeathSaveFails": char.deathSave.fail,
"DeathSaveStable": char.deathSave.stable,
};
_.extend(character, getSkills(charId));
_.extend(character, getAttacks(charId));
@@ -107,6 +124,7 @@ var getHitDiceString = function(charId){
(d10 ? `${d10}d10 + ` : "") +
(d12 ? `${d12}d12 + ` : "") +
con;
return string;
}
var getArmorString = function(charId){
@@ -181,8 +199,13 @@ var getSkills = function(charId){
];
var skills = {};
_.each(allSkills, skill => {
var value = Characters.calculate.skillMod(charId, skill.name);
skills[skill.name] = value;
var value = signedString(
Characters.calculate.skillMod(charId, skill.name)
);
var prof = Characters.calculate.proficiency(charId, skill.name);
var name = skill.name.charAt(0).toUpperCase() + skill.name.slice(1);
skills[name] = value;
skills[name + "Proficiency"] = prof;
});
return skills;
};
@@ -212,4 +235,8 @@ var getAttacks = function(charId){
`${a.details}`;
});
return attacks;
}
};
var signedString = function(number) {
return number >= 0 ? "+" + number : "" + number;
};