Cantrips now display as "<school> cantrip" rather than "Level 0 <school>"

Also fixed spacing if "(ritual)" tag was not present
This commit is contained in:
Jacob
2017-07-30 21:20:27 +01:00
parent 8f8714d3e5
commit 0eea6f2386
2 changed files with 8 additions and 1 deletions

View File

@@ -12,7 +12,7 @@
<template name="spellDetails">
<div class="paper-font-body2">
Level {{level}} {{school}} {{#if ritual}}ritual{{/if}}, {{preparedString}}
{{schoolAndLevel}}{{#if ritual}} (ritual){{/if}}, {{preparedString}}
</div>
<div style="margin: 16px 0 16px 0;">
{{#if castingTime}}

View File

@@ -29,6 +29,13 @@ Template.spellDialog.events({
});
Template.spellDetails.helpers({
schoolAndLevel: function(){
if (this.level == 0) {
return this.school + " cantrip";
} else {
return "Level " + this.level + " " + this.school;
}
},
getComponents: function(){
var components = "";
if (this.components.concentration) components += "C";