Fixed effects not being able to be added to stored buffs
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
<div slot="toolbar">Add {{propertyName}}</div>
|
||||
<component
|
||||
v-if="type"
|
||||
stored
|
||||
:is="type"
|
||||
class="creature-property-form"
|
||||
:model="model"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
class="mt-4"
|
||||
:model="buff"
|
||||
:parent-target="parentTarget"
|
||||
:stored="stored"
|
||||
:stored="true"
|
||||
@change="({path, value, ack}) => $emit('change', {path: [i, ...path], value, ack})"
|
||||
@push="({path, value, ack}) => $emit('push', {path: [i, ...path], value, ack})"
|
||||
@pull="({path, ack}) => $emit('pull', {path: [i, ...path], ack})"
|
||||
@@ -40,14 +40,13 @@
|
||||
|
||||
<script>
|
||||
import BuffForm from '/imports/ui/properties/forms/BuffForm.vue';
|
||||
import {StoredBuffSchema, AppliedBuffSchema} from '/imports/api/properties/Buffs.js';
|
||||
import { StoredBuffSchema } from '/imports/api/properties/Buffs.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
BuffForm,
|
||||
},
|
||||
props: {
|
||||
stored: Boolean,
|
||||
model: {
|
||||
type: Array,
|
||||
default: () => ([]),
|
||||
@@ -66,8 +65,7 @@
|
||||
},
|
||||
addBuff(){
|
||||
this.addBuffLoading = true;
|
||||
let schema = this.stored ? StoredBuffSchema : AppliedBuffSchema;
|
||||
this.$emit('push', {path: [], value: schema.clean({}), ack: this.acknowledgeAddBuff});
|
||||
this.$emit('push', {path: [], value: StoredBuffSchema.clean({}), ack: this.acknowledgeAddBuff});
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ActionForm from '/imports/ui/properties/forms/ActionForm.vue';
|
||||
import AttackForm from '/imports/ui/properties/forms/AttackForm.vue';
|
||||
import AttributeForm from '/imports/ui/properties/forms/AttributeForm.vue';
|
||||
import BuffForm from '/imports/ui/properties/forms/BuffForm.vue';
|
||||
import ContainerForm from '/imports/ui/properties/forms/ContainerForm.vue';
|
||||
import ClassLevelForm from '/imports/ui/properties/forms/ClassLevelForm.vue';
|
||||
import DamageMultiplierForm from '/imports/ui/properties/forms/DamageMultiplierForm.vue';
|
||||
@@ -21,6 +22,7 @@ export default {
|
||||
action: ActionForm,
|
||||
attack: AttackForm,
|
||||
attribute: AttributeForm,
|
||||
buff: BuffForm,
|
||||
container: ContainerForm,
|
||||
classLevel: ClassLevelForm,
|
||||
damageMultiplier: DamageMultiplierForm,
|
||||
|
||||
Reference in New Issue
Block a user