From f951f313d2c747663af21f5060581e00f725b6a2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 22 Dec 2021 00:24:51 +0900 Subject: [PATCH] =?UTF-8?q?feat(WIP):=20processing=20=EA=B3=84=EB=9E=B5=20?= =?UTF-8?q?=EC=84=B8=EB=B6=80=20-=20=EA=B8=B0=ED=83=80=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=9E=94=EC=97=AC=20=EC=BD=94=EB=93=9C=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/General/che_징병.php | 7 ----- hwe/sammo/Command/General/che_첩보.php | 27 ++++------------- hwe/sammo/Command/General/che_화계.php | 29 ++++--------------- hwe/sammo/Command/Nation/che_선전포고.php | 7 ----- .../General/{che_이동.vue => CityProcess.vue} | 12 ++++++++ hwe/ts/processing/General/index.ts | 16 ++++++---- 6 files changed, 35 insertions(+), 63 deletions(-) rename hwe/ts/processing/General/{che_이동.vue => CityProcess.vue} (84%) diff --git a/hwe/sammo/Command/General/che_징병.php b/hwe/sammo/Command/General/che_징병.php index 011e657e..5fc86816 100644 --- a/hwe/sammo/Command/General/che_징병.php +++ b/hwe/sammo/Command/General/che_징병.php @@ -333,13 +333,6 @@ class che_징병 extends Command\GeneralCommand ]; } - public function getJSPlugins(): array - { - return [ - 'recruitCrewForm' - ]; - } - public function getForm(): string { $db = DB::db(); diff --git a/hwe/sammo/Command/General/che_첩보.php b/hwe/sammo/Command/General/che_첩보.php index f1615be2..5a5f73f3 100644 --- a/hwe/sammo/Command/General/che_첩보.php +++ b/hwe/sammo/Command/General/che_첩보.php @@ -225,29 +225,14 @@ class che_첩보 extends Command\GeneralCommand return true; } - public function getJSPlugins(): array + public function exportJSVars(): array { return [ - 'defaultSelectCityByMap' + 'mapTheme' => \sammo\getMapTheme(), + 'procRes' => [ + 'cities' => \sammo\JSOptionsForCities(), + 'distanceList' => \sammo\JSCitiesBasedOnDistance($this->generalObj->getCityID(), 3), + ], ]; } - - public function getForm(): string - { - $currentCityID = $this->generalObj->getCityID(); - ob_start(); -?> -
- 선택된 도시에 첩보를 실행합니다.
- 인접도시일 경우 많은 정보를 얻을 수 있습니다.
- 목록을 선택하거나 도시를 클릭하세요.
-
-
-
- - \sammo\getMapTheme(), + 'procRes' => [ + 'cities' => \sammo\JSOptionsForCities(), + 'distanceList' => \sammo\JSCitiesBasedOnDistance($this->generalObj->getCityID(), 3), + ], ]; } - - public function getForm(): string - { - $currentCityID = $this->generalObj->getCityID(); - $commandName = $this->getName(); - $josaUl = JosaUtil::pick($commandName, '을'); - - ob_start(); -?> -
- 선택된 도시에 실행합니다.
- 목록을 선택하거나 도시를 클릭하세요.
-
-
-
- - 목록을 선택하거나 도시를 클릭하세요.
+
+ 선택된 도시에 첩보를 실행합니다.
+ 인접도시일 경우 많은 정보를 얻을 수 있습니다.
+ 목록을 선택하거나 도시를 클릭하세요.
+
+
+ 선택된 도시에 {{ commandName }}{{JosaPick(commandName, '을')}} + 실행합니다.
+ 목록을 선택하거나 도시를 클릭하세요.
+
도시: @@ -54,6 +64,7 @@ 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; @@ -108,6 +119,7 @@ export default defineComponent({ selectedCityObj: ref(undefined as MapCityParsed | undefined), distanceList: procRes.distanceList, commandName, + JosaPick, selected, submit, }; diff --git a/hwe/ts/processing/General/index.ts b/hwe/ts/processing/General/index.ts index 70d4d7a6..d1e4a7b0 100644 --- a/hwe/ts/processing/General/index.ts +++ b/hwe/ts/processing/General/index.ts @@ -3,11 +3,13 @@ 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 "./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 CityProcess } from "./CityProcess.vue"; + + //TODO: 자주 쓰는 녀석들은 Slot으로 변경 export const commandMap: Record = { @@ -15,23 +17,27 @@ export const commandMap: Record = { che_군량매매, che_건국, che_등용, + che_모병: che_징병, + che_선동: CityProcess, che_선양, che_이동: CityProcess, che_임관, - che_출병: CityProcess, che_장수대상임관, che_징병, - che_모병: che_징병, + che_첩보: CityProcess, + che_출병: CityProcess, + che_탈취: CityProcess, + che_파괴: CityProcess, + che_화계: CityProcess, } /* - 항목들 -장수+ - 장수대상임관 장수/금쌀/분량 - 증여(포상 이식) 금쌀/분량 - 헌납(군량매매 또는 포상 수정) 도시 - 첩보, 계략(화계 등) -고유 양식 - 숙련전환, 장비매매, 징병 +고유 양식 - 숙련전환, 장비매매