Skip to content

Commit

Permalink
Implement some tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Damnae committed Dec 8, 2023
1 parent fa35cfd commit 460a7d7
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/gamecore/tasks/ByCheckModifierCallBackModifierValue.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<script setup lang="ts">
import { inject, } from 'vue';
import { GamecoreTask,
DynamicExpression,
} from '@/sources/gamecore';
import BlockLayout from '@/components/BlockLayout.vue';
import EvaluateExpression from '../EvaluateExpression.vue';
const props = defineProps<{node:GamecoreTask}>()
const node = props.node as unknown as
{
ModifierName:string
ValueType:string
CompareType?:string
CompareValue?:DynamicExpression
}
const createModifierRoute = inject<(key:string) => object>('createModifierRoute') as (key:string) => object
</script>

<template>
<BlockLayout :source="node">

Parameter modifier
<RouterLink v-if="node.ModifierName" :to="createModifierRoute(node.ModifierName)">
<em>{{ node.ModifierName }}</em>'s
</RouterLink>

<template v-if="node.ValueType">
<em>{{ node.ValueType }}</em> is
</template>
<template v-if="node.CompareType">
<em>{{ node.CompareType }}</em> to
</template>
<template v-if="node.CompareValue">
<em><EvaluateExpression :expression="node.CompareValue" /></em>
</template>

</BlockLayout>
</template>

<style scoped>
</style>
47 changes: 47 additions & 0 deletions src/gamecore/tasks/Remodifier.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<script setup lang="ts">
import { GamecoreTask, GamecoreTargetType, DynamicExpression, } from '@/sources/gamecore';
import BlockLayout from '@/components/BlockLayout.vue';
import EvaluateTargetType from '../EvaluateTargetType.vue';
import EvaluateExpression from '../EvaluateExpression.vue';
import AnyTask from '@/gamecore/AnyTask.vue';
const props = defineProps<{node:GamecoreTask}>()
const node = props.node as unknown as
{
TargetType:GamecoreTargetType
BehaviorFlagFilter:string[]
MaxNumber?:DynamicExpression
TaskList?:GamecoreTask[]
}
const tasks = node.TaskList;
</script>

<template>
<BlockLayout :source="node">
<span class="flow">
For
<template v-if="node.MaxNumber">
up to <EvaluateExpression :expression="node.MaxNumber" /> modifiers on
</template>
<template v-else>
all modifiers on
</template>
<EvaluateTargetType :target="node.TargetType" />
with <em>{{ node.BehaviorFlagFilter.join(', ') }}</em>
</span>
<template #content>
<div class="subblock">
<template v-if="tasks && tasks.length > 0">
<span class="flow">Do</span>
<template v-for="n in tasks">
<AnyTask :node="n" />
</template>
</template>
</div>
</template>
</BlockLayout>
</template>

<style scoped>
</style>

0 comments on commit 460a7d7

Please sign in to comment.