Began adding creature templates to libraries

This commit is contained in:
ThaumRystra
2024-06-05 15:10:22 +02:00
parent 6070c499cc
commit 99c14099dc
18 changed files with 774 additions and 26 deletions

View File

@@ -0,0 +1,53 @@
<template lang="html">
<div class="creature-template-form">
<v-row dense>
<v-col
cols="12"
md="6"
>
<text-field
label="Picture URL"
hint="A link to a high resolution image"
:value="model.picture"
:error-messages="errors.picture"
@change="change('picture', ...arguments)"
/>
</v-col>
<v-col
cols="12"
md="6"
>
<text-field
label="Avatar picture URL"
hint="A link to a smaller, square image to use as an avatar"
:value="model.avatarPicture"
:error-messages="errors.avatarPicture"
@change="change('avatarPicture', ...arguments)"
/>
</v-col>
</v-row>
<inline-computation-field
label="Description"
hint="A brief description of the creature shown when the creature is added to a tabletop"
:model="model.description"
:error-messages="errors['description.text']"
@change="({path, value, ack}) =>
$emit('change', {path: ['description', ...path], value, ack})"
/>
<form-sections
v-if="$slots.default"
type="creatureTemplate"
>
<slot />
</form-sections>
</div>
</template>
<script lang="js">
import propertyFormMixin from '/imports/client/ui/properties/forms/shared/propertyFormMixin';
export default {
mixins: [propertyFormMixin],
}
</script>

View File

@@ -8,6 +8,7 @@ import ClassForm from '/imports/client/ui/properties/forms/ClassForm.vue';
import ClassLevelForm from '/imports/client/ui/properties/forms/ClassLevelForm.vue';
import ConstantForm from '/imports/client/ui/properties/forms/ConstantForm.vue';
import ContainerForm from '/imports/client/ui/properties/forms/ContainerForm.vue';
import CreatureTemplateForm from '/imports/client/ui/properties/forms/CreatureTemplateForm.vue';
import DamageForm from '/imports/client/ui/properties/forms/DamageForm.vue';
import DamageMultiplierForm from '/imports/client/ui/properties/forms/DamageMultiplierForm.vue';
import EffectForm from '/imports/client/ui/properties/forms/EffectForm.vue';
@@ -38,6 +39,7 @@ export default {
container: ContainerForm,
class: ClassForm,
classLevel: ClassLevelForm,
creature: CreatureTemplateForm,
damage: DamageForm,
damageMultiplier: DamageMultiplierForm,
effect: EffectForm,