Made proficiencies their own objects, added migration functionality
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<template name="proficiencyView">
|
||||
<div class="proficiencyView" layout horizontal center>
|
||||
<core-icon icon="{{profIcon}}"></core-icon>
|
||||
<div class="sideMargin">{{getName}}</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,45 @@
|
||||
var saves = {
|
||||
strengthSave: "Strength Save",
|
||||
dexteritySave: "Dexterity Save",
|
||||
constitutionSave: "Constitution Save",
|
||||
intelligenceSave: "Intelligence Save",
|
||||
wisdomSave: "Wisdom Save",
|
||||
charismaSave: "Charisma Save",
|
||||
};
|
||||
|
||||
var skills = {
|
||||
acrobatics: "Acrobatics",
|
||||
animalHandling: "Animal Handling",
|
||||
arcana: "Arcana",
|
||||
athletics: "Athletics",
|
||||
deception: "Deception",
|
||||
history: "History",
|
||||
insight: "Insight",
|
||||
intimidation: "Intimidation",
|
||||
investigation: "Investigation",
|
||||
medicine: "Medicine",
|
||||
nature: "Nature",
|
||||
perception: "Perception",
|
||||
performance: "Performance",
|
||||
persuasion: "Persuasion",
|
||||
religion: "Religion",
|
||||
sleightOfHand: "Sleight of Hand",
|
||||
stealth: "Stealth",
|
||||
survival: "Survival",
|
||||
initiative: "Initiative",
|
||||
};
|
||||
|
||||
Template.proficiencyView.helpers({
|
||||
profIcon: function(){
|
||||
var prof = this.value;
|
||||
if(prof > 0 && prof < 1) return "image:brightness-2";
|
||||
if(prof === 1) return "image:brightness-1";
|
||||
if(prof > 1) return "av:album";
|
||||
return "radio-button-off";
|
||||
},
|
||||
getName: function(){
|
||||
if(this.type === "skill") return skills[this.name];
|
||||
if(this.type === "save") return saves[this.name];
|
||||
return this.name;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user