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