refac(WIP): 파일 위치 변경
This commit is contained in:
@@ -1,128 +0,0 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" />
|
||||
<div class="bg0">
|
||||
<MapLegacyTemplate
|
||||
:isDetailMap="false"
|
||||
:clickableAll="true"
|
||||
:neutralView="true"
|
||||
:useCachedMap="true"
|
||||
:mapTheme="mapTheme"
|
||||
v-model="selectedCityObj"
|
||||
/>
|
||||
|
||||
<div v-if="commandName == '강행'">
|
||||
선택된 도시로 강행합니다.<br />
|
||||
최대 3칸내 도시로만 강행이 가능합니다.<br />
|
||||
목록을 선택하거나 도시를 클릭하세요.<br />
|
||||
</div>
|
||||
<div v-else-if="commandName == '이동'">
|
||||
선택된 도시로 이동합니다.<br />
|
||||
인접 도시로만 이동이 가능합니다.<br />
|
||||
목록을 선택하거나 도시를 클릭하세요.<br />
|
||||
</div>
|
||||
<div v-else-if="commandName == '출병'">
|
||||
선택된 도시를 향해 침공을 합니다.<br />
|
||||
침공 경로에 적군의 도시가 있다면 전투를 벌입니다.<br />
|
||||
목록을 선택하거나 도시를 클릭하세요.<br />
|
||||
</div>
|
||||
<div v-else-if="commandName == '첩보'">
|
||||
선택된 도시에 첩보를 실행합니다.<br />
|
||||
인접도시일 경우 많은 정보를 얻을 수 있습니다.<br />
|
||||
목록을 선택하거나 도시를 클릭하세요.<br />
|
||||
</div>
|
||||
<div v-else-if="commandName in { 화계: 1, 탈취: 1, 파괴: 1, 선동: 1 }">
|
||||
선택된 도시에 {{ commandName }}{{JosaPick(commandName, '을')}}
|
||||
실행합니다.<br />
|
||||
목록을 선택하거나 도시를 클릭하세요.<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4 col-md-2">
|
||||
도시:
|
||||
<CitySelect :cities="citiesMap" v-model="selectedCityID" />
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button @click="submit">{{ commandName }}</b-button>
|
||||
</div>
|
||||
</div>
|
||||
<CityBasedOnDistance
|
||||
:citiesMap="citiesMap"
|
||||
:distanceList="distanceList"
|
||||
@selected="selected"
|
||||
/>
|
||||
</div>
|
||||
<BottomBar :title="commandName" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import MapLegacyTemplate, {
|
||||
MapCityParsed,
|
||||
} from "@/components/MapLegacyTemplate.vue";
|
||||
import CitySelect from "@/processing/CitySelect.vue";
|
||||
import CityBasedOnDistance from "@/processing/CitiesBasedOnDistance.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
import TopBackBar from "@/components/TopBackBar.vue";
|
||||
import BottomBar from "@/components/BottomBar.vue";
|
||||
import { pick as JosaPick } from "@util/JosaUtil";
|
||||
declare const mapTheme: string;
|
||||
declare const currentCity: number;
|
||||
declare const commandName: string;
|
||||
declare const procRes: {
|
||||
distanceList: Record<number, number[]>;
|
||||
cities: [number, string][];
|
||||
};
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MapLegacyTemplate,
|
||||
CitySelect,
|
||||
CityBasedOnDistance,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
watch: {
|
||||
selectedCityObj(city: MapCityParsed) {
|
||||
this.selectedCityID = city.id;
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
const citiesMap = new Map<
|
||||
number,
|
||||
{
|
||||
name: string;
|
||||
info?: string;
|
||||
}
|
||||
>();
|
||||
for (const [id, name] of procRes.cities) {
|
||||
citiesMap.set(id, { name });
|
||||
}
|
||||
|
||||
const selectedCityID = ref(currentCity);
|
||||
|
||||
function selected(cityID: number) {
|
||||
selectedCityID.value = cityID;
|
||||
}
|
||||
|
||||
async function submit(e: Event) {
|
||||
const event = new CustomEvent<Args>("customSubmit", {
|
||||
detail: {
|
||||
destCityID: selectedCityID.value,
|
||||
},
|
||||
});
|
||||
unwrap(e.target).dispatchEvent(event);
|
||||
}
|
||||
|
||||
return {
|
||||
mapTheme: ref(mapTheme),
|
||||
citiesMap: ref(citiesMap),
|
||||
selectedCityID,
|
||||
selectedCityObj: ref(undefined as MapCityParsed | undefined),
|
||||
distanceList: procRes.distanceList,
|
||||
commandName,
|
||||
JosaPick,
|
||||
selected,
|
||||
submit,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -38,7 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import ColorSelect from "@/processing/ColorSelect.vue";
|
||||
import ColorSelect from "@/processing/SelectColor.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
<b-button :pressed="!buyRice" @click="buyRice=false">팜</b-button>
|
||||
</b-button-group>
|
||||
</div>
|
||||
<div class="col-10 col-md-4">
|
||||
<div class="col-6 col-md-4">
|
||||
금액 :
|
||||
<AmountSelect
|
||||
<SelectAmount
|
||||
:amountGuide="amountGuide"
|
||||
v-model="amount"
|
||||
:maxAmount="maxAmount"
|
||||
@@ -30,7 +30,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import AmountSelect from "@/processing/AmountSelect.vue";
|
||||
import SelectAmount from "@/processing/SelectAmount.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -46,7 +46,7 @@ declare const procRes: {
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
AmountSelect,
|
||||
SelectAmount,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
장수 :
|
||||
<GeneralSelect
|
||||
<SelectGeneral
|
||||
:generals="generalList"
|
||||
:groupByNation="nationList"
|
||||
:textHelper="textHelpGeneral"
|
||||
@@ -25,7 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import GeneralSelect from "@/processing/GeneralSelect.vue";
|
||||
import SelectGeneral from "@/processing/SelectGeneral.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -50,7 +50,7 @@ declare const procRes: {
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
GeneralSelect,
|
||||
SelectGeneral,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
장수 :
|
||||
<GeneralSelect
|
||||
<SelectGeneral
|
||||
:generals="generalList"
|
||||
:textHelper="textHelpGeneral"
|
||||
v-model="selectedGeneralID"
|
||||
@@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import GeneralSelect from "@/processing/GeneralSelect.vue";
|
||||
import SelectGeneral from "@/processing/SelectGeneral.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -50,7 +50,7 @@ declare const procRes: {
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
GeneralSelect,
|
||||
SelectGeneral,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="row">
|
||||
<div class="col-6 col-md-3">
|
||||
국가 :
|
||||
<NationSelect :nations="nationList" v-model="selectedNationID" />
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button @click="submit">{{ commandName }}</b-button>
|
||||
@@ -47,7 +47,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import NationSelect from "@/processing/NationSelect.vue";
|
||||
import SelectNation from "@/processing/SelectNation.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -63,7 +63,7 @@ declare const procRes: {
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
NationSelect,
|
||||
SelectNation,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
장수 :
|
||||
<GeneralSelect
|
||||
<SelectGeneral
|
||||
:generals="generalList"
|
||||
:groupByNation="nationList"
|
||||
:textHelper="textHelpGeneral"
|
||||
@@ -51,7 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import GeneralSelect from "@/processing/GeneralSelect.vue";
|
||||
import SelectGeneral from "@/processing/SelectGeneral.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -77,7 +77,7 @@ declare const procRes: {
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
GeneralSelect,
|
||||
SelectGeneral,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
|
||||
@@ -7,35 +7,34 @@ import { default as che_임관 } from "./che_임관.vue";
|
||||
import { default as che_장수대상임관 } from "./che_장수대상임관.vue";
|
||||
import { default as che_징병 } from "./che_징병.vue";
|
||||
|
||||
import { default as CityProcess } from "./CityProcess.vue";
|
||||
import { default as ProcessCity } from "../ProcessCity.vue";
|
||||
|
||||
|
||||
//TODO: 자주 쓰는 녀석들은 Slot으로 변경
|
||||
|
||||
export const commandMap: Record<string, typeof CityProcess> = {
|
||||
che_강행: CityProcess,
|
||||
export const commandMap: Record<string, typeof ProcessCity> = {
|
||||
che_강행: ProcessCity,
|
||||
che_군량매매,
|
||||
che_건국,
|
||||
che_등용,
|
||||
che_모병: che_징병,
|
||||
che_선동: CityProcess,
|
||||
che_선동: ProcessCity,
|
||||
che_선양,
|
||||
che_이동: CityProcess,
|
||||
che_이동: ProcessCity,
|
||||
che_임관,
|
||||
che_장수대상임관,
|
||||
che_징병,
|
||||
che_첩보: CityProcess,
|
||||
che_출병: CityProcess,
|
||||
che_탈취: CityProcess,
|
||||
che_파괴: CityProcess,
|
||||
che_화계: CityProcess,
|
||||
che_첩보: ProcessCity,
|
||||
che_출병: ProcessCity,
|
||||
che_탈취: ProcessCity,
|
||||
che_파괴: ProcessCity,
|
||||
che_화계: ProcessCity,
|
||||
}
|
||||
|
||||
/*
|
||||
- 항목들
|
||||
장수/금쌀/분량 - 증여(포상 이식)
|
||||
금쌀/분량 - 헌납(군량매매 또는 포상 수정)
|
||||
도시 - 첩보, 계략(화계 등)
|
||||
|
||||
고유 양식 - 숙련전환, 장비매매
|
||||
|
||||
|
||||
Reference in New Issue
Block a user