Skip to content

Commit

Permalink
Add a warning when context is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Damnae committed Sep 1, 2023
1 parent f89f657 commit 31c236e
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/scripts/sources/ability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ const contextTypeToPaths =
],
Modifiers:
[
//'Config/ConfigGlobalModifier/GlobalModifier.json',
//'Config/ConfigGlobalModifier/GlobalModifier_System.json',
'Config/ConfigGlobalModifier/GlobalModifier_Common_Property.json',
'Config/ConfigGlobalModifier/GlobalModifier_Common_Specific.json',
'Config/ConfigGlobalModifier/GlobalModifier_Avatar.json',
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/sources/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export async function getAvatars(commitId:string) : Promise<AvatarConfig>

avatar.SearchKeywords = []
avatar.SearchKeywords.push(avatar.AvatarName.Text.toLowerCase())
avatar.SearchKeywords.push(avatar.DamageType.toLowerCase())
avatar.SearchKeywords.push(avatar.AvatarBaseType.toLowerCase())
}

const traceRanks = await retrieveJson('ExcelOutput/AvatarSkillTreeConfig.json', commitId, false) as AvatarSkillTreeConfig
Expand Down
1 change: 1 addition & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ button:focus-visible {
padding:.5rem;
margin:.5rem 0;
border-bottom: 1px solid #000;
position: relative;
}
nav.panel
{
Expand Down
9 changes: 8 additions & 1 deletion src/views/abilities/ProvideEmptyContext.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,16 @@
provide('createModifierRoute', (modifierId:string) : object => { return { name: props.modifierRouteName ?? 'modifier', params:{ commitId: props.commitId, modifierId: modifierId, } }})
</script>

<template>
<template>
<div class="nocontext minor">(Context is missing)</div>
<slot></slot>
</template>

<style scoped>
.nocontext
{
position:absolute;
top:.5rem;
left:.5rem;
}
</style>
31 changes: 31 additions & 0 deletions src/views/gamecore/blocks/ByCompareParamValue.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<script setup lang="ts">
import { GamecoreNode,
DynamicExpression,
} from '@/scripts/sources/gamecore';
import BlockLayout from '@/views/gamecore/BlockLayout.vue';
import EvaluateExpression from '../EvaluateExpression.vue';
const props = defineProps<{node:GamecoreNode}>()
const node = props.node as unknown as
{
CompareType:string
CompareValue:DynamicExpression
}
</script>

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

Parameter is
<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>
30 changes: 30 additions & 0 deletions src/views/gamecore/blocks/SetDynamicValueByVariateType.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script setup lang="ts">
import { GamecoreNode,
GamecoreTargetType,
} from '@/scripts/sources/gamecore';
import useHashStore from '@/scripts/hashstore';
import BlockLayout from '@/views/gamecore/BlockLayout.vue';
const props = defineProps<{node:GamecoreNode}>()
const node = props.node as unknown as
{
TargetType?:GamecoreTargetType
DynamicKey:string
VariateType?:string
}
if (node.DynamicKey)
useHashStore().register(node.DynamicKey, true)
</script>

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

Set <em>{{ node.DynamicKey }}</em>
to <em>{{ node.VariateType }}</em>

</BlockLayout>
</template>

<style scoped>
</style>
2 changes: 1 addition & 1 deletion src/views/gamecore/blocks/TriggerEffect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<template>
<BlockLayout :source="node" :cosmetic="true">

Create visual effect on <em>{{ evaluateTargetType(node.TargetType) }}</em>
Create visual effect at <em>{{ evaluateTargetType(node.TargetType) }}</em>

</BlockLayout>
</template>
Expand Down
23 changes: 23 additions & 0 deletions src/views/gamecore/blocks/TriggerEffectList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script setup lang="ts">
import { GamecoreNode,
GamecoreTargetType, evaluateTargetType,
} from '@/scripts/sources/gamecore';
import BlockLayout from '@/views/gamecore/BlockLayout.vue';
const props = defineProps<{node:GamecoreNode}>()
const node = props.node as unknown as
{
TargetType?:GamecoreTargetType
}
</script>

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

Create visual effects at <em>{{ evaluateTargetType(node.TargetType) }}</em>

</BlockLayout>
</template>

<style scoped>
</style>

0 comments on commit 31c236e

Please sign in to comment.