From 78d95048d587a0b191fe91da7f50395ec1916d00 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 19 Dec 2021 22:50:15 +0900 Subject: [PATCH] =?UTF-8?q?feat(WIP):=20processing=20=EA=B1=B4=EA=B5=AD,?= =?UTF-8?q?=20=EB=8B=A4=EB=A5=B8=20=EB=A9=94=EB=89=B4=20UI=20=ED=86=B5?= =?UTF-8?q?=EC=9D=BC=20-=20lazy=20loading=EC=9D=80=20=EC=9D=98=EB=AF=B8?= =?UTF-8?q?=EA=B0=80=20=EC=97=86=EC=9C=BC=EB=AF=80=EB=A1=9C=20=EB=A1=A4?= =?UTF-8?q?=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/General/che_건국.php | 98 ++++---------------- hwe/ts/processing/AmountSelect.vue | 106 +++++++++++----------- hwe/ts/processing/ColorSelect.vue | 1 - hwe/ts/processing/General/che_건국.vue | 103 +++++++++++++++++++++ hwe/ts/processing/General/che_이동.vue | 5 +- hwe/ts/processing/General/index.ts | 10 +- hwe/ts/processing/Nation/che_국기변경.vue | 6 +- hwe/ts/processing/Nation/che_국호변경.vue | 6 +- hwe/ts/processing/Nation/che_급습.vue | 5 +- hwe/ts/processing/Nation/che_몰수.vue | 29 ++++-- hwe/ts/processing/Nation/che_발령.vue | 8 +- hwe/ts/processing/Nation/index.ts | 14 +-- hwe/ts/processing/processingRes.ts | 11 ++- hwe/ts/v_processing.ts | 4 +- 14 files changed, 235 insertions(+), 171 deletions(-) create mode 100644 hwe/ts/processing/General/che_건국.vue diff --git a/hwe/sammo/Command/General/che_건국.php b/hwe/sammo/Command/General/che_건국.php index ab673828..2dd98482 100644 --- a/hwe/sammo/Command/General/che_건국.php +++ b/hwe/sammo/Command/General/che_건국.php @@ -169,7 +169,7 @@ class che_건국 extends Command\GeneralCommand $general->addExperience($exp); $general->addDedication($ded); - $aux = Json::decode($this->nation['aux'])??[]; + $aux = Json::decode($this->nation['aux']) ?? []; $aux['can_국기변경'] = 1; $db->update('city', [ @@ -197,87 +197,25 @@ class che_건국 extends Command\GeneralCommand return true; } - public function getJSPlugins(): array + public function exportJSVars(): array { + $nationTypes = []; + foreach (GameConst::$availableNationType as $nationType) { + $nationClass = buildNationTypeClass($nationType); + $nationTypes[$nationType] = [ + 'type' => $nationType, + 'name' => $nationClass->getName(), + 'pros' => $nationClass::$pros, + 'cons' => $nationClass::$cons + ]; + } return [ - 'colorSelect' + 'procRes' => [ + 'available건국' => count(getAllNationStaticInfo()) < $this->env['maxnation'], + 'nationTypes' => $nationTypes, + 'colors' => GetNationColors(), + + ] ]; } - - public function getForm(): string - { - - if (count(getAllNationStaticInfo()) >= $this->env['maxnation']) { - return '더 이상 건국은 불가능합니다.'; - } - - - //NOTE: 새로운 방법이 생기기 전까진 아무색이나 선택 가능하도록 하자. - /* - foreach(GetNationColors() as $color){ - $colorUsed[$color] = 0; - } - - foreach(getAllNationStaticInfo() as $nation){ - if($nation['level'] <= 0){ - continue; - } - $colorUsed[$nation['color']]++; - } - - $colorUsedCnt = 0; - foreach($colorUsed as $color=>$used){ - if($used){ - continue; - } - $colorUsedCnt += 1; - } - - //색깔이 다 쓰였으면 그냥 모두 허용 - if($colorUsedCnt === count($colorUsed)){ - foreach(array_keys($colorUsed) as $color){ - $colorUsed[$color] = 0; - } - } - */ - - - ob_start(); -?> - 현재 도시에서 나라를 세웁니다. 중, 소도시에서만 가능합니다.
- - getName(), $nationClass::$pros, $nationClass::$cons]; - ?> - - - :
- -
- 국명 : - 색상 : - 성향 : - - -
-
- -1만 + -1만 + -1천 + -1백 + + +
+ {{ guide.toLocaleString() }} +
- -1천 - -1백 - - -
- {{ guide.toLocaleString() }} -
-
- +1백 - +1천 - +1만 -
+ + +1백 + +1천 + +1만