Removed trigger.summary
This commit is contained in:
@@ -58,12 +58,12 @@ export function applyTrigger(trigger, prop, actionContext) {
|
||||
// Fire the trigger
|
||||
const content = {
|
||||
name: trigger.name || 'Trigger',
|
||||
value: trigger.summary,
|
||||
value: trigger.description,
|
||||
inline: false,
|
||||
}
|
||||
if (trigger.summary?.text){
|
||||
recalculateInlineCalculations(trigger.summary, actionContext);
|
||||
content.value = trigger.summary.value;
|
||||
if (trigger.description?.text){
|
||||
recalculateInlineCalculations(trigger.description, actionContext);
|
||||
content.value = trigger.description.value;
|
||||
}
|
||||
actionContext.addLog(content);
|
||||
|
||||
|
||||
@@ -44,10 +44,6 @@ let TriggerSchema = createPropertySchema({
|
||||
optional: true,
|
||||
max: STORAGE_LIMITS.name,
|
||||
},
|
||||
summary: {
|
||||
type: 'inlineCalculationFieldToCompute',
|
||||
optional: true,
|
||||
},
|
||||
description: {
|
||||
type: 'inlineCalculationFieldToCompute',
|
||||
optional: true,
|
||||
|
||||
@@ -111,15 +111,6 @@
|
||||
$emit('change', {path: ['condition', ...path], value, ack})"
|
||||
/>
|
||||
|
||||
<inline-computation-field
|
||||
label="Summary"
|
||||
hint="This will appear in the feature card in the character sheet"
|
||||
:model="model.summary"
|
||||
:error-messages="errors.summary"
|
||||
@change="({path, value, ack}) =>
|
||||
$emit('change', {path: ['summary', ...path], value, ack})"
|
||||
/>
|
||||
|
||||
<inline-computation-field
|
||||
label="Description"
|
||||
hint="The rest of the description that doesn't fit in the summary goes here"
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
<template lang="html">
|
||||
<div class="trigger-viewer">
|
||||
<v-row dense>
|
||||
<property-field
|
||||
name="Timing"
|
||||
:value="timingText"
|
||||
/>
|
||||
<property-field
|
||||
name="Event"
|
||||
:value="eventText"
|
||||
/>
|
||||
<property-field
|
||||
name="Event Type"
|
||||
:value="actionPropertyText"
|
||||
/>
|
||||
<property-field
|
||||
v-if="(model.targetTags && model.targetTags.length) || (model.extraTags && model.extraTags.length)"
|
||||
name="Tags Required"
|
||||
@@ -23,10 +31,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</property-field>
|
||||
<property-description
|
||||
name="Summary"
|
||||
:model="model.summary"
|
||||
/>
|
||||
<property-description
|
||||
name="Description"
|
||||
:model="model.description"
|
||||
@@ -36,39 +40,34 @@
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import propertyViewerMixin from '/imports/ui/properties/viewers/shared/propertyViewerMixin.js'
|
||||
import { getPropertyName } from '/imports/constants/PROPERTIES.js';
|
||||
import FillSlotButton from '/imports/ui/creature/buildTree/FillSlotButton.vue';
|
||||
import propertyViewerMixin from '/imports/ui/properties/viewers/shared/propertyViewerMixin.js'
|
||||
import { getPropertyName } from '/imports/constants/PROPERTIES.js';
|
||||
import { timingOptions, eventOptions, actionPropertyTypeOptions } from '/imports/api/properties/Triggers.js';
|
||||
|
||||
const eventText = {
|
||||
doActionProperty: 'Do action property',
|
||||
receiveActionProperty: 'Receiving action property',
|
||||
flipToggle: 'Toggle changed',
|
||||
adjustProperty: 'Attribute adjusted',
|
||||
anyRest: 'Short or long rest',
|
||||
longRest: 'Long rest',
|
||||
shortRest: 'Short rest',
|
||||
export default {
|
||||
mixins: [propertyViewerMixin],
|
||||
inject: {
|
||||
context: {
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
slotTypeName(){
|
||||
if (!this.model.slotType) return;
|
||||
return getPropertyName(this.model.slotType);
|
||||
},
|
||||
timingText(){
|
||||
if (!this.model.timing) return;
|
||||
return timingOptions[this.model.timing];
|
||||
},
|
||||
actionPropertyText(){
|
||||
if (!this.model.actionPropertyType) return;
|
||||
return actionPropertyTypeOptions[this.model.actionPropertyType];
|
||||
},
|
||||
eventText(){
|
||||
if (!this.model.event) return;
|
||||
return eventOptions[this.model.event];
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FillSlotButton,
|
||||
},
|
||||
mixins: [propertyViewerMixin],
|
||||
inject: {
|
||||
context: {
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
slotTypeName(){
|
||||
if (!this.model.slotType) return;
|
||||
return getPropertyName(this.model.slotType);
|
||||
},
|
||||
eventText(){
|
||||
if (!this.model.event) return;
|
||||
return eventText[this.model.event]
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user