Skip to content

Commit

Permalink
#62 - fix: race size wasn't always present
Browse files Browse the repository at this point in the history
  • Loading branch information
geoidesic committed Jul 14, 2024
1 parent b69aa6b commit bd6e612
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
.flexrow
.flex.left
span.label {improvement.label}
.flex.right
.flex0.right
+if("Number(improvement.value) > 0")
span +
span.value {improvement.value}
Expand Down
18 changes: 15 additions & 3 deletions src/components/molecules/dnd5e/Advancements/Size.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<script>
import { getContext, onDestroy, onMount, tick } from "svelte";
import { log } from "../../../../helpers/Utility";
export let advancement = null;
$: sizes = advancement.configuration.sizes;
onMount(async () => {
console.log('advancement'+advancement.type, advancement)
log.d('advancement'+advancement.type, advancement)
log.d('Sizes', sizes);
});
</script>
Expand All @@ -14,13 +17,22 @@
.advancement.mt-sm(data-type="{advancement.type}")
+if("advancement.title === 'Size'")
.flexrow
.flex.left {advancement.configuration.hint}
+if("advancement.configuration.hint")
.flex.left {advancement.configuration.hint}
+if("sizes?.size > 0")
.flex0
+each("sizes as size")
.flex0.right.badge {game.system.config.actorSizes[size].label}


</template>

<style lang="sass">
@import "../../../../../styles/Mixins.scss"
.advancement
@include inset
.badge
@include badge
</style>
2 changes: 1 addition & 1 deletion src/components/molecules/dnd5e/Advancements/Trait.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
+each("choices as choice")
+if("!fromAll(choice.pool)")
.flexrow
.flex
h3.flex
span Choose&nbsp;
span &nbsp;{choice.count}&nbsp;
span of the following:
Expand Down

0 comments on commit bd6e612

Please sign in to comment.