|
|
|
@@ -60,9 +60,6 @@ |
|
|
|
<button v-if="subject.perspective === POV.Third" @click.stop="subject.perspective = POV.Second">Second-person</button> |
|
|
|
<button v-if="subject.perspective === POV.First" @click.stop="subject.perspective = POV.Third">Third-person</button> |
|
|
|
<button v-if="subject.perspective === POV.Second" @click.stop="subject.perspective = POV.First">First-person</button> |
|
|
|
<select @change="subject.ai = ais[$event.target.selectedIndex]" class="ai-picker"> |
|
|
|
<option v-for="(ai, index) in ais" :key="'ai-' + index">{{ ai.name }}</option> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@@ -71,7 +68,6 @@ |
|
|
|
import { Component, Prop, Vue, Watch, Emit } from 'vue-property-decorator' |
|
|
|
import { Creature } from '@/game/creature' |
|
|
|
import { POV } from '@/game/language' |
|
|
|
import { NoAI, RandomAI, VoreAI, AI } from '@/game/ai' |
|
|
|
import { Stats, Stat, StatIcons, StatDescs, Vigor, VigorIcons, VigorDescs, VoreStatDescs, VoreStatIcons, VisibleStatus } from '@/game/combat' |
|
|
|
import ContainerView from './ContainerView.vue' |
|
|
|
import tippy, { delegate, createSingleton } from 'tippy.js' |
|
|
|
@@ -83,8 +79,7 @@ import 'tippy.js/dist/tippy.css' |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
POV: POV, |
|
|
|
ais: [new NoAI(), new RandomAI(), new VoreAI()] |
|
|
|
POV: POV |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@@ -156,9 +151,6 @@ export default class Statblock extends Vue { |
|
|
|
createSingleton(tippyInstances, { delay: 500, touch: ["hold", 500] }) |
|
|
|
|
|
|
|
this.statusChanged([]) |
|
|
|
|
|
|
|
const picker = this.$el.querySelector(".ai-picker") as HTMLSelectElement |
|
|
|
picker.selectedIndex = this.$data.ais.findIndex((ai: AI) => ai.name === this.subject.ai.name) |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|