@@ -24,9 +27,7 @@
+
+
예산&정책
+
추가 설정
+
돌아가기
\ No newline at end of file
diff --git a/hwe/ts/build_exports.json b/hwe/ts/build_exports.json
index 40f22e03..c366027e 100644
--- a/hwe/ts/build_exports.json
+++ b/hwe/ts/build_exports.json
@@ -26,7 +26,7 @@
"v_NPCControl": "v_NPCControl.ts",
"v_join": "v_join.ts",
"v_main": "v_main.ts",
- "v_dipcenter": "v_dipcenter.ts",
+ "v_nationStratFinan": "v_nationStratFinan.ts",
"v_processing": "v_processing.ts"
}
}
\ No newline at end of file
diff --git a/hwe/ts/v_dipcenter.ts b/hwe/ts/v_dipcenter.ts
deleted file mode 100644
index 05bc9fee..00000000
--- a/hwe/ts/v_dipcenter.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { createApp } from 'vue'
-import PartialDipcenter from '@/PartialDipcenter.vue';
-import BootstrapVue3 from 'bootstrap-vue-3';
-import { htmlReady } from './util/htmlReady';
-//import { activateFlip } from './legacy/activateFlip';
-//import { activateFlip } from "@/legacy/activateFlip";
-import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
-//import { htmlReady } from './util/htmlReady';
-
-createApp(PartialDipcenter).use(BootstrapVue3).mount('#editorForm');
-setAxiosXMLHttpRequest();
-
-
-htmlReady(function(){
- //activateFlip();
-})
diff --git a/hwe/ts/v_nationStratFinan.ts b/hwe/ts/v_nationStratFinan.ts
new file mode 100644
index 00000000..7461b256
--- /dev/null
+++ b/hwe/ts/v_nationStratFinan.ts
@@ -0,0 +1,10 @@
+import { createApp } from 'vue'
+import PageNationStratFinan from '@/PageNationStratFinan.vue';
+import BootstrapVue3 from 'bootstrap-vue-3';
+import { auto500px } from './util/auto500px';
+
+
+
+
+auto500px();
+createApp(PageNationStratFinan).use(BootstrapVue3).mount('#container');
\ No newline at end of file
diff --git a/hwe/v_nationStratFinan.php b/hwe/v_nationStratFinan.php
new file mode 100644
index 00000000..7e0589c0
--- /dev/null
+++ b/hwe/v_nationStratFinan.php
@@ -0,0 +1,163 @@
+setReadOnly();
+$userID = Session::getUserID();
+
+$db = DB::db();
+$gameStor = KVStorage::getStorage($db, 'game_env');
+
+increaseRefresh("내무부", 1);
+
+$me = $db->queryFirstRow('SELECT no, nation, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
+
+$con = checkLimit($me['con']);
+if ($con >= 2) {
+ printLimitMsg($me['turntime']);
+ exit();
+}
+
+$permission = checkSecretPermission($me);
+if ($permission < 0) {
+ echo '국가에 소속되어있지 않습니다.';
+ die();
+} else if ($permission < 1) {
+ echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
+ die();
+}
+
+
+$nationID = $me['nation'];
+$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
+
+$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
+
+[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
+$nationStor->cacheValues(['notice', 'scout_msg', 'available_war_setting_cnt']);
+
+$cityCntList = Util::convertPairArrayToDict($db->queryAllLists('SELECT nation, count(city) FROM city GROUP BY nation'));
+$dipStateList = Util::convertArrayToDict($db->query('SELECT you,state,term FROM diplomacy WHERE me = %i', $nationID), 'you');
+
+$nationsList = getAllNationStaticInfo();
+
+$cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID);
+$dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID);
+
+
+foreach ($nationsList as &$nationItem) {
+
+ $staticNationID = $nationItem['nation'];
+ //속령수
+ $nationItem['cityCnt'] = $cityCntList[$staticNationID] ?? 0;
+ if ($staticNationID !== $nationID) {
+ $diplomacyItem = $dipStateList[$staticNationID];
+
+ $nationItem['diplomacy'] = [
+ 'state' => $diplomacyItem['state'],
+ 'term' => $diplomacyItem['term'],
+ ];
+ } else {
+ $nationItem['diplomacy'] = [
+ 'state' => 7,
+ 'term' => null,
+ ];
+ }
+}
+
+
+
+// 수입 연산
+$goldIncome = getGoldIncome(
+ $nation['nation'],
+ $nation['level'],
+ $nation['rate'],
+ $nation['capital'],
+ $nation['type'],
+ $cityList
+);
+$warIncome = getWarGoldIncome($nation['type'], $cityList);
+
+$riceIncome = getRiceIncome(
+ $nation['nation'],
+ $nation['level'],
+ $nation['rate'],
+ $nation['capital'],
+ $nation['type'],
+ $cityList
+);
+$wallIncome = getWallIncome(
+ $nation['nation'],
+ $nation['level'],
+ $nation['rate'],
+ $nation['capital'],
+ $nation['type'],
+ $cityList
+);
+
+$incomes = [
+ 'gold' => [
+ 'city' => $goldIncome,
+ 'war' => $warIncome,
+ ],
+ 'rice' => [
+ 'city' => $riceIncome,
+ 'wall' => $wallIncome,
+ ],
+];
+
+$outcome = getOutcome(100, $dedicationList);
+?>
+
+
+
+
+
+
+
+
= UniqueConst::$serverName ?>: 내무부
+ = WebUtil::printStaticValues([
+ 'staticValues' => [
+ 'editable' => ($me['officer_level'] >= 5 || $permission == 4),
+ 'nationMsg' => $nationStor->notice ?? '',
+ 'scoutMsg' => $nationStor->scout_msg ?? '',
+ 'nationID' => $nationID,
+ 'officerLevel' => $me['officer_level'],
+ 'year' => $year,
+ 'month' => $month,
+ 'nationsList' => $nationsList,
+
+ 'gold' => $nation['gold'],
+ 'rice' => $nation['rice'],
+ 'income' => $incomeList,
+ 'outcome' => $outcome,
+
+ 'policy' => [
+ 'rate' => $nation['rate'],
+ 'bill' => $nation['bill'],
+ 'secretLimit' => $nation['secretlimit'],
+ 'blockScout' => $nation['scout']!=0,
+ 'blockWar' => $nation['war']!=0,
+ ],
+ 'warSettingCnt' => [
+ 'remain' => $nationStor->getValue('available_war_setting_cnt'),
+ 'inc' => GameConst::$incAvailableWarSettingCnt,
+ 'max' => GameConst::$maxAvailableWarSettingCnt
+ ],
+ ]
+ ]) ?>
+ = WebUtil::printJS('../d_shared/common_path.js') ?>
+ = WebUtil::printCSS('../d_shared/common.css') ?>
+
+ = WebUtil::printDist('vue', 'v_nationStratFinan', true) ?>
+
+
+
+
+
+
+
\ No newline at end of file