refac(WIP): 파일 위치 변경
This commit is contained in:
@@ -18,7 +18,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";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-5">
|
||||
장수 :
|
||||
<GeneralSelect
|
||||
<SelectGeneral
|
||||
:cities="citiesMap"
|
||||
:generals="generalList"
|
||||
:troops="troops"
|
||||
@@ -26,9 +26,9 @@
|
||||
<b-button :pressed="!isGold" @click="isGold=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"
|
||||
@@ -44,8 +44,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import GeneralSelect from "@/processing/GeneralSelect.vue";
|
||||
import AmountSelect from "@/processing/AmountSelect.vue";
|
||||
import SelectGeneral from "@/processing/SelectGeneral.vue";
|
||||
import SelectAmount from "@/processing/SelectAmount.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -72,8 +72,8 @@ declare const procRes: {
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
GeneralSelect,
|
||||
AmountSelect,
|
||||
SelectGeneral,
|
||||
SelectAmount,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
|
||||
@@ -11,17 +11,38 @@
|
||||
/>
|
||||
<div>
|
||||
타국에게 원조합니다.<br />
|
||||
작위별로 금액 제한이 있습니다.<br />
|
||||
작위별로 금액 제한이 있습니다.<br /><br />
|
||||
<ul>
|
||||
<template v-for="({ text, amount }, level) in levelInfo" :key="level">
|
||||
<li>
|
||||
<span
|
||||
:style="{
|
||||
width: '4em',
|
||||
display: 'inline-block',
|
||||
...(level != currentNationLevel
|
||||
? {}
|
||||
: {
|
||||
textDecoration: 'underline',
|
||||
fontWeight: 'bold',
|
||||
}),
|
||||
}"
|
||||
>{{ text }}</span
|
||||
>: {{ amount.toLocaleString() }}
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
<br />
|
||||
원조할 국가를 목록에서 선택하세요.<br /><br />
|
||||
</div>
|
||||
<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-6 col-md-0"></div>
|
||||
<div class="col-10 col-md-5">
|
||||
<div class="col-8 col-md-4">
|
||||
금 :
|
||||
<AmountSelect
|
||||
<SelectAmount
|
||||
:amountGuide="amountGuide"
|
||||
v-model="goldAmount"
|
||||
:step="10"
|
||||
@@ -29,9 +50,9 @@
|
||||
:minAmount="minAmount"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-10 col-md-5">
|
||||
<div class="col-8 col-md-4">
|
||||
쌀 :
|
||||
<AmountSelect
|
||||
<SelectAmount
|
||||
:amountGuide="amountGuide"
|
||||
v-model="riceAmount"
|
||||
:step="10"
|
||||
@@ -51,8 +72,8 @@
|
||||
import MapLegacyTemplate, {
|
||||
MapCityParsed,
|
||||
} from "@/components/MapLegacyTemplate.vue";
|
||||
import NationSelect from "@/processing/NationSelect.vue";
|
||||
import AmountSelect from "@/processing/AmountSelect.vue";
|
||||
import SelectNation from "@/processing/SelectNation.vue";
|
||||
import SelectAmount from "@/processing/SelectAmount.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -65,7 +86,13 @@ declare const commandName: string;
|
||||
declare const procRes: {
|
||||
nationList: procNationList;
|
||||
currentNationLevel: number;
|
||||
nationLevelText: Record<number, string>;
|
||||
levelInfo: Record<
|
||||
number,
|
||||
{
|
||||
text: string;
|
||||
amount: number;
|
||||
}
|
||||
>;
|
||||
minAmount: number;
|
||||
maxAmount: number;
|
||||
amountGuide: number[];
|
||||
@@ -74,8 +101,8 @@ declare const procRes: {
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MapLegacyTemplate,
|
||||
NationSelect,
|
||||
AmountSelect,
|
||||
SelectNation,
|
||||
SelectAmount,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
@@ -117,7 +144,7 @@ export default defineComponent({
|
||||
selectedNationID,
|
||||
selectedCityObj,
|
||||
currentNationLevel: procRes.currentNationLevel,
|
||||
nationLevelText: procRes.nationLevelText,
|
||||
levelInfo: procRes.levelInfo,
|
||||
minAmount: ref(procRes.minAmount),
|
||||
maxAmount: ref(procRes.maxAmount),
|
||||
amountGuide: procRes.amountGuide,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
장수 :
|
||||
<GeneralSelect
|
||||
<SelectGeneral
|
||||
:cities="citiesMap"
|
||||
:generals="generalList"
|
||||
:troops="troops"
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
<div class="col-6 col-md-4">
|
||||
도시 :
|
||||
<CitySelect :cities="citiesMap" v-model="selectedCityID" />
|
||||
<SelectCity :cities="citiesMap" v-model="selectedCityID" />
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button variant="primary" @click="submit">{{ commandName }}</b-button>
|
||||
@@ -42,8 +42,8 @@
|
||||
import MapLegacyTemplate, {
|
||||
MapCityParsed,
|
||||
} from "@/components/MapLegacyTemplate.vue";
|
||||
import CitySelect from "@/processing/CitySelect.vue";
|
||||
import GeneralSelect from "@/processing/GeneralSelect.vue";
|
||||
import SelectCity from "@/processing/SelectCity.vue";
|
||||
import SelectGeneral from "@/processing/SelectGeneral.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
@@ -72,8 +72,8 @@ declare const procRes: {
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MapLegacyTemplate,
|
||||
CitySelect,
|
||||
GeneralSelect,
|
||||
SelectCity,
|
||||
SelectGeneral,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
|
||||
@@ -9,27 +9,27 @@
|
||||
:mapTheme="mapTheme"
|
||||
v-model="selectedCityObj"
|
||||
/>
|
||||
|
||||
<div v-if="(commandName == '선전포고')">
|
||||
타국에게 선전 포고합니다.<br />
|
||||
선전 포고할 국가를 목록에서 선택하세요.<br />
|
||||
고립되지 않은 아국 도시에서 인접한 국가에 선포 가능합니다.<br />
|
||||
초반제한 해제 2년전부터 선포가 가능합니다. ({{ startYear + 1 }}년
|
||||
1월부터 가능)<br />
|
||||
현재 선포가 불가능한 국가는 배경색이 <span style="color: red">붉은색</span>으로
|
||||
표시됩니다.<br />
|
||||
</div>
|
||||
<div v-if="(commandName == '급습')">
|
||||
선택된 국가에 급습을 발동합니다.<br />
|
||||
<div>
|
||||
선택된 국가에 피장파장을 발동합니다.<br />
|
||||
지정한 전략을 상대국이
|
||||
{{ delayCnt }}턴 동안 사용할 수 없게됩니다.<br />
|
||||
대신 아국은 지정한 전략을 {{ postReqTurn }}턴 동안 사용할 수 없습니다.<br />
|
||||
선포, 전쟁중인 상대국에만 가능합니다.<br />
|
||||
상대 국가를 목록에서 선택하세요.<br />
|
||||
배경색은 현재 급습 불가능 국가는
|
||||
현재 피장파장이 불가능한 국가는
|
||||
<span style="color: red">붉은색</span>으로 표시됩니다.<br />
|
||||
</div>
|
||||
<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">
|
||||
<label>전략 :</label>
|
||||
<b-form-select
|
||||
:options="commandTypesOption"
|
||||
v-model="selectedCommandID"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button @click="submit">{{ commandName }}</b-button>
|
||||
@@ -43,7 +43,7 @@
|
||||
import MapLegacyTemplate, {
|
||||
MapCityParsed,
|
||||
} from "@/components/MapLegacyTemplate.vue";
|
||||
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";
|
||||
@@ -55,13 +55,22 @@ declare const commandName: string;
|
||||
|
||||
declare const procRes: {
|
||||
nationList: procNationList;
|
||||
startYear: number,
|
||||
startYear: number;
|
||||
delayCnt: number;
|
||||
postReqTurn: number;
|
||||
availableCommandTypeList: Record<
|
||||
number,
|
||||
{
|
||||
name: string;
|
||||
remainTurn: number;
|
||||
}
|
||||
>;
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MapLegacyTemplate,
|
||||
NationSelect,
|
||||
SelectNation,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
@@ -80,7 +89,23 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const selectedNationID = ref(procRes.nationList[0].id);
|
||||
const selectedCityObj = ref();//mapping용
|
||||
const selectedCityObj = ref(); //mapping용
|
||||
|
||||
const commandTypesOption: { html: string; value: string }[] = [];
|
||||
for (const [commandTypeID, commandTypeInfo] of Object.entries(procRes.availableCommandTypeList)) {
|
||||
const notAvailable = commandTypeInfo.remainTurn > 0;
|
||||
const notAvailableText = notAvailable?' (불가)':'';
|
||||
const name = `${commandTypeInfo.name}${notAvailableText}`;
|
||||
const html = notAvailable?`<span style='color:red;'>${name}</span>`:name;
|
||||
commandTypesOption.push({
|
||||
html,
|
||||
value: commandTypeID,
|
||||
});
|
||||
}
|
||||
|
||||
const selectedCommandID = ref(
|
||||
Object.keys(procRes.availableCommandTypeList)[0]
|
||||
);
|
||||
|
||||
function selectedNation(nationID: number) {
|
||||
selectedNationID.value = nationID;
|
||||
@@ -90,13 +115,16 @@ export default defineComponent({
|
||||
const event = new CustomEvent<Args>("customSubmit", {
|
||||
detail: {
|
||||
destNationID: selectedNationID.value,
|
||||
commandType: selectedCommandID.value,
|
||||
},
|
||||
});
|
||||
unwrap(e.target).dispatchEvent(event);
|
||||
}
|
||||
|
||||
return {
|
||||
startYear: procRes.startYear,
|
||||
...procRes,
|
||||
selectedCommandID,
|
||||
commandTypesOption,
|
||||
mapTheme: ref(mapTheme),
|
||||
nationList: ref(nationList),
|
||||
selectedCityObj,
|
||||
@@ -1,27 +1,30 @@
|
||||
import { default as che_국기변경 } from "./che_국기변경.vue";
|
||||
import { default as che_국호변경 } from "./che_국호변경.vue";
|
||||
import { default as che_물자원조 } from "./che_물자원조.vue";
|
||||
import { default as che_피장파장 } from "./che_피장파장.vue";
|
||||
|
||||
import { default as NationProcess } from "./che_선전포고.vue";
|
||||
import { default as GeneralAmountProcess } from "./che_몰수.vue";
|
||||
import { default as GeneralCityProcess } from "./che_발령.vue";
|
||||
import { default as ProcessNation } from "../ProcessNation.vue";
|
||||
import { default as ProcessGeneralAmount } from "./che_몰수.vue";
|
||||
import { default as ProcessGeneralCity } from "./che_발령.vue";
|
||||
|
||||
export const commandMap: Record<string, typeof NationProcess> = {
|
||||
export const commandMap: Record<string, typeof ProcessNation> = {
|
||||
che_국기변경,
|
||||
che_국호변경,
|
||||
che_급습: NationProcess,
|
||||
che_몰수: GeneralAmountProcess,
|
||||
che_급습: ProcessNation,
|
||||
che_몰수: ProcessGeneralAmount,
|
||||
che_물자원조,
|
||||
che_선전포고: NationProcess,
|
||||
che_포상: GeneralAmountProcess,
|
||||
che_발령: GeneralCityProcess,
|
||||
che_발령: ProcessGeneralCity,
|
||||
che_불가침파기제의: ProcessNation,
|
||||
che_선전포고: ProcessNation,
|
||||
che_이호경식: ProcessNation,
|
||||
che_종전제의: ProcessNation,
|
||||
che_포상: ProcessGeneralAmount,
|
||||
che_피장파장,
|
||||
}
|
||||
|
||||
/*
|
||||
- 항목들
|
||||
국가/금쌀/분량 - 물자원조
|
||||
도시 - 백성동원, 수몰, 천도, 초토화,
|
||||
국가 - 불가침파기제의, 선전포고, 이호경식, 종전제의, 피장파장, 허보
|
||||
도시 - 백성동원, 수몰, 천도, 초토화, 허보
|
||||
고유 양식 - 불가침제의
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user