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만