Skip to content

Commit

Permalink
Fix pf2e styles, and shift around init
Browse files Browse the repository at this point in the history
  • Loading branch information
cswendrowski committed May 8, 2021
1 parent 8762f77 commit d70874a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
21 changes: 17 additions & 4 deletions scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,24 @@ Hooks.once('ready', function() {
});
});

if (game.system.id == "archmage") {
window.dungeonMoon = {
pathfinder2E: new Pathfinder2E()
};
console.log("13th Age Init");
}
else if (game.system.id == "pf2e") {
window.dungeonMoon = {
pathfinder2E: new Pathfinder2E()
};
console.log("PF2E Init");
}
else if (game.system.id == "dnd5e") {
window.dungeonMoon = {
};
console.log("DnD5e Init");
}

window.dungeonMoon = {
thirteenthAge: new ThirteenthAge(),
pathfinder2E: new Pathfinder2E()
};
});

Hooks.on('renderCombatTracker', () => {
Expand Down
7 changes: 7 additions & 0 deletions scripts/pf2e.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

export default class Pathfinder2E {

constructor() {
this.monsterTraits = Object.values(CONFIG.PF2E.monsterTraits);
this.actorSizes = Object.values(CONFIG.PF2E.actorSizes);
this.rarityTraits = Object.values(CONFIG.PF2E.rarityTraits);
this.alignment = Object.values(CONFIG.PF2E.alignment);
}

histogramStep() { return 1; }

histogramLabelPrettify(level) { return level; }
Expand Down
2 changes: 1 addition & 1 deletion styles/module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $dark-maroon: #2B0603;
}

.actor-listing {
background: url(../../../systems/pf2e/assets/sheet/header.png) !important;
background: url(../../../systems/pf2e/assets/sheet/header.webp) !important;
}

.traits {
Expand Down
18 changes: 14 additions & 4 deletions vue/components/pf2e/pf2e-filters.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div>
<h4>Traits</h4>
<v-select multiple v-model="selectedTraits" :options="Object.values(CONFIG.PF2E.monsterTraits)" :reduce="x => x.toLowerCase()"></v-select>
<v-select multiple v-model="selectedTraits" :options="monsterTraits" :reduce="x => x.toLowerCase()"></v-select>
<h4>Size</h4>
<v-select multiple v-model="selectedSizes" :options="Object.values(CONFIG.PF2E.actorSizes)"></v-select>
<v-select multiple v-model="selectedSizes" :options="actorSizes"></v-select>
<h4>Rarity</h4>
<v-select multiple v-model="selectedRarities" :options="Object.values(CONFIG.PF2E.rarityTraits)" :reduce="x => x.toLowerCase()"></v-select>
<v-select multiple v-model="selectedRarities" :options="rarityTraits" :reduce="x => x.toLowerCase()"></v-select>
<h4>Alignment</h4>
<v-select multiple v-model="selectedAlignments" :options="Object.values(CONFIG.PF2E.alignment)"></v-select>
<v-select multiple v-model="selectedAlignments" :options="alignment"></v-select>
</div>
</template>
<script>
Expand All @@ -18,8 +18,18 @@ export default {
selectedTraits: [],
selectedRarities: [],
selectedSizes: [],
monsterTraits: [],
actorSizes: [],
rarityTraits: [],
alignment: []
}),
props: ['value'],
created() {
this.monsterTraits = window.dungeonMoon.pathfinder2E.monsterTraits;
this.actorSizes = window.dungeonMoon.pathfinder2E.actorSizes;
this.rarityTraits = window.dungeonMoon.pathfinder2E.rarityTraits;
this.alignment = window.dungeonMoon.pathfinder2E.alignment;
},
methods: {
dataBundle: function () {
return {
Expand Down

0 comments on commit d70874a

Please sign in to comment.