aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Editor/Quest/Task/TaskConfigurationRow.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Editor/Quest/Task/TaskConfigurationRow.vue')
-rw-r--r--src/components/Editor/Quest/Task/TaskConfigurationRow.vue10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/Editor/Quest/Task/TaskConfigurationRow.vue b/src/components/Editor/Quest/Task/TaskConfigurationRow.vue
index d77e450..f68ce97 100644
--- a/src/components/Editor/Quest/Task/TaskConfigurationRow.vue
+++ b/src/components/Editor/Quest/Task/TaskConfigurationRow.vue
@@ -2,7 +2,8 @@
import { useSessionStore } from '@/stores/session';
import { computed, ref, toRefs, watch } from 'vue';
import TrueFalseSwitch from '@/components/Control/TrueFalseSwitch.vue';
-import materials from '@/data/materials.json';
+import ItemStackPicker from '@/components/Control/ItemStackPicker.vue';
+import materials from '@/lib/materials';
const props = defineProps({
taskType: {
@@ -33,7 +34,9 @@ const currentValue = ref(props.initialValue ||
? false
: (props.type === 'material-list' || props.type === 'string-list'
? []
- : ''
+ : props.type === 'itemstack'
+ ? null
+ : ''
)));
if (props.initialValue !== currentValue.value) {
@@ -81,6 +84,9 @@ const addValue = (searchQuery: any) => {
<!-- Data type 'string-list' -->
<multiselect v-else-if="props.type === 'string-list'" v-model="currentValue" :options="[]" @tag="addValue"
:multiple="true" :taggable="true" :searchable="true" placeholder="Enter string" />
+
+ <!-- Data type 'itemstack' -->
+ <ItemStackPicker v-else-if="props.type === 'itemstack'" :value="currentValue" @update="updateValue" />
<div v-if="showDescription || error" id="task-configuration-row-info">
<p v-if="error" class="error">A value is required.</p>