diff --git a/hwe/b_npc_control.php b/hwe/b_npc_control.php
deleted file mode 100644
index 421cfb71..00000000
--- a/hwe/b_npc_control.php
+++ /dev/null
@@ -1,421 +0,0 @@
-setReadOnly();
-$userID = Session::getUserID();
-
-$db = DB::db();
-$gameStor = KVStorage::getStorage($db, 'game_env');
-$gameStor->cacheValues(['autorun_user', 'develcost']);
-
-increaseRefresh("NPC 정책", 1);
-
-
-$me = $db->queryFirstRow('SELECT no, npc, nation, city, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
-
-$nationID = $me['nation'];
-$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,tech,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
-
-$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();
-}
-
-
-$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
-$nationStor->cacheValues(['npc_nation_policy', 'npc_general_policy']);
-$gameStor->cacheAll();
-
-$general = new General($me, null, null, $nation, $gameStor->year, $gameStor->month, false);
-
-$rawServerPolicy = $gameStor->getValue('npc_nation_policy') ?? [];
-$rawNationPolicy = $nationStor->getValue('npc_nation_policy') ?? [];
-$rawServerGeneralPolicy = $gameStor->getValue('npc_general_policy') ?? [];
-$rawNationGeneralPolicy = $nationStor->getValue('npc_general_policy') ?? [];
-
-$defaultNationPolicy = ($rawServerPolicy['values'] ?? []) + AutorunNationPolicy::$defaultPolicy;
-$currentNationPolicy = ($rawNationPolicy['values'] ?? []) + $defaultNationPolicy;
-
-$defaultNationPriority = $rawServerPolicy['priority'] ?? (AutorunNationPolicy::$defaultPriority);
-$currentNationPriority = $rawNationPolicy['priority'] ?? $defaultNationPriority;
-
-$defaultGeneralActionPriority = $rawServerGeneralPolicy['priority'] ?? (AutorunGeneralPolicy::$default_priority);
-$currentGeneralActionPriority = $rawNationGeneralPolicy['priority'] ?? $defaultGeneralActionPriority;
-
-$autoPolicyVariable = [];
-if ($currentNationPolicy['reqHumanWarUrgentRice'] ?? 0) {
- $autoPolicyVariable['reqHumanWarUrgentRice'] = $currentNationPolicy['reqHumanWarUrgentRice'];
-}
-if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) {
- $autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold'];
-}
-$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
-$zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], null, null, $nation, $gameStor->getAll(true));
-
-
-?>
-
-
-
-
-
-
-
- = UniqueConst::$serverName ?>: 임시 NPC 정책
-
-
- =WebUtil::printJS('../d_shared/common_path.js')?>
- =WebUtil::printJS('dist_js/vendors.js')?>
- =WebUtil::printJS('dist_js/common.js')?>
- = WebUtil::printJS('../e_lib/jquery_toast/toast.js') ?>
- = WebUtil::printJS('../e_lib/Sortable.min.js') ?>
- = WebUtil::printJS('../e_lib/jquery-sortable.js') ?>
- = WebUtil::printJS('js/npc_control.js') ?>
-
- = WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
- = WebUtil::printCSS('../e_lib/font_awesome/css/all.min.css') ?>
- = WebUtil::printCSS('../e_lib/jquery_toast/toast.css') ?>
- = WebUtil::printCSS('../d_shared/common.css') ?>
- = WebUtil::printCSS('css/common.css') ?>
- = WebUtil::printCSS('css/npc_control.css') ?>
-
-
-
-
-
임시 NPC 정책
- = backButton() ?>
-
-
국가 정책
-
- 최근 설정: = $rawNationPolicy['valueSetter'] ?? '-없음-' ?> (= $rawNationPolicy['valueSetTime'] ?? '설정 기록 없음' ?>)
-
-
-
-
-
NPC 사령턴 우선순위
-
- 최근 설정: = $rawNationPolicy['prioritySetter'] ?? '-없음-' ?> (= $rawNationPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
-
-
예턴이 없거나, 지정되어 있더라도 실패할경우 아래 순위에 따라 사령턴을 시도합니다.
-
-
-
-
NPC 일반턴 우선순위
-
- 최근 설정: = $rawNationGeneralPolicy['prioritySetter'] ?? '-없음-' ?> (= $rawNationGeneralPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
-
-
순위가 높은 것부터 시도합니다. 아무것도 실행할 수 없으면 물자조달이나 인재탐색을 합니다.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hwe/css/npc_control.css b/hwe/css/npc_control.css
deleted file mode 100644
index d4a124b7..00000000
--- a/hwe/css/npc_control.css
+++ /dev/null
@@ -1,49 +0,0 @@
-.section_bar{
- text-align:center;
- border:0.5px solid #aaa;
- padding-right:0;
- padding-left:0;
-}
-
-.sub_bar{
- text-align:center;
- border:0.5px solid #aaa;
- margin-left:-5px;
- margin-right:-5px;
-}
-
-.reset_btn{
- width:15ch;
-}
-
-.submit_btn{
- margin-left:1em;
- width:15ch;
-}
-
-.control_bar{
- margin-top:8pt;
- text-align:right;
-}
-
-.col-form-label{
- text-align:right;
- padding-right:2ch;
-}
-
-.form_list{
- padding:8pt;
-}
-
-.half_section_left{
- padding-right:0;
- border-right:0.5px solid #aaa;
-}
-.half_section_right{
- padding-left:0;
-
-}
-
-.popover{
- max-width:100%;
-}
\ No newline at end of file
diff --git a/hwe/js/npc_control.js b/hwe/js/npc_control.js
deleted file mode 100644
index 0a2cebf6..00000000
--- a/hwe/js/npc_control.js
+++ /dev/null
@@ -1,289 +0,0 @@
-jQuery(function ($) {
-
- var itemFrame =
- ''
- + ' '
- + '{0}'
- + ''
- + ' '
- + ' ' +
- '
';
- var itemFrameDisabled =
- ''
- + '{0}' +
- '
';
-
-
- function initPriority(priorityKey, currentPriority, availablePriority) {
- var $disabledList = $('#{0}Disabled'.format(priorityKey));
- var $enabledList = $('#{0}'.format(priorityKey));
-
- $disabledList.empty();
- $enabledList.empty();
-
- var usedKey = {};
- var items = [];
- $.each(currentPriority, function (key, val) {
- var $item = $(itemFrame.format(val));
- usedKey[val] = true;
- $enabledList.append($item);
- items.push($item);
- })
-
- var $disabled = $(itemFrameDisabled.format('<비활성화 항목들>')).addClass('filtered');
- $disabledList.append($disabled);
-
- var lastInfoObj = null;
- var lastInfoData = null;
-
- var onChoose = function(evt){
- //$(evt.item).find('.help-message').popopver('disable');
- if(lastInfoObj){
- lastInfoObj.popover('hide');
- }
- }
-
- var onUnchoose = function(evt){
- var $item = $(evt.item);//.find('.help-message').popopver('enable');
- var $helpMessage = $item.find('.help-message');
- if(!$helpMessage.length){
- return;
- }
- if(lastInfoData != $item.data('value')){
- $helpMessage.popover('show')
- lastInfoData = $item.data('value');
- lastInfoObj = $helpMessage;
- }
- else{
- $helpMessage.popover('hide');
- lastInfoData = null;
- lastInfoObj = null;
- }
-
- }
-
- $.each(availablePriority, function (key, val) {
- if (val in usedKey) {
- return true;
- }
- var $item = $(itemFrame.format(val));
- $disabledList.append($item);
- items.push($item);
- })
-
- $disabledList.sortable({
- group: priorityKey,
- filter: '.filtered',
- onChoose,onChoose,
- onUnchoose:onUnchoose,
- animation: 150
- });
-
- $enabledList.sortable({
- group: priorityKey,
- filter: '.filtered',
- onChoose,onChoose,
- onUnchoose:onUnchoose,
- animation: 150
- });
-
- $.each(items, function(key, $item){
- var itemValue = $item.data('value');
- if(!(itemValue in btnHelpMessage)){
- return true;
- }
-
- var helpText = btnHelpMessage[itemValue];
- var $helpMessage = $item.find('.help-message');
- $helpMessage.popover({
- content:helpText,
- placement:'top',
- html:true,
- trigger:'hover'
- });
- $item.mouseleave(function(){
- $helpMessage.popover('hide');
- });
- });
- }
-
-
-
- function initNationPolicy() {
- $.each(currentNationPolicy, function (key, val) {
- var $obj = $('#{0}'.format(key));
-
- if (!$obj.length) {
- console.log('{0}가 없대!'.format(key));
- return true;
- }
-
- var type = $obj.data('type');
- if (!$obj.is('input')) {
- console.log('아니라고?');
- return true;
- }
-
- if (type == 'percent') {
- $obj.val(val * 100);
- }
- else if (type == 'json') {
- $obj.val(JSON.stringify(val));
- }
- else {
- $obj.val(val);
- }
- });
- }
-
-
- initPriority('generalPriority', currentGeneralActionPriority, availableGeneralActionPriorityItems);
- initPriority('nationPriority', currentNationPriority, availableNationPriorityItems);
- initNationPolicy();
-
-
- $('.reset_btn').click(function () {
- var $this = $(this);
-
- if (!confirm('서버 초기 설정으로 되돌릴까요?')) {
- return false;
- }
-
- var type = $this.parents('.control_bar').data('type');
- if (type === 'nationPolicy') {
- window.currentNationPolicy = window.defaultNationPolicy;
- initNationPolicy();
- }
- else if (type === 'generalPriority') {
- window.currentGeneralActionPriority = window.defaultGeneralActionPriority;
- initPriority('generalPriority', currentGeneralActionPriority, availableGeneralActionPriorityItems);
- }
- else if (type === 'nationPriority') {
- window.currentNationPriority = window.defaultNationPriority;
- initPriority('nationPriority', currentNationPriority, availableNationPriorityItems);
- }
-
- $.toast({
- title: '초기화 완료',
- content: '서버 초기값을 적용했습니다. 설정 버튼을 누르면 반영됩니다.',
- type: 'info',
- delay: 5000
- });
- return false;
- });
-
- $('.revert_btn').click(function () {
- var $this = $(this);
-
- if (!confirm('이전 설정으로 되돌릴까요?')) {
- return false;
- }
-
- var type = $this.parents('.control_bar').data('type');
- if (type === 'nationPolicy') {
- initNationPolicy();
- }
-
- if (type === 'generalPriority') {
- initPriority('generalPriority', currentGeneralActionPriority, availableGeneralActionPriorityItems);
- }
-
- if (type === 'nationPriority') {
- initPriority('nationPriority', currentNationPriority, availableNationPriorityItems);
- }
-
- $.toast({
- title: '되돌리기 완료',
- content: '이전 설정으로 되돌렸습니다.',
- type: 'info',
- delay: 5000
- });
- });
-
- var collectPriority = function (priorityKey) {
- var $list = $('#{0}'.format(priorityKey));
- var result = [];
- $list.find('.list-group-item').each(function () {
- var $item = $(this);
- result.push($item.data('value'));
- });
- return result;
- }
-
- var collectNationPolicy = function () {
- var src = window.currentNationPolicy;
- var result = {};
- $.each(src, function (key, val) {
- var $item = $('#{0}'.format(key));
- var val = $item.val();
- var dataType = $item.data('type');
- if (dataType === 'percent') {
- val /= 100;
- }
- else if (dataType === 'json') {
- val = JSON.parse(val);
- }
- else if (dataType === 'integer') {
- val = parseInt(val);
- }
- result[key] = val;
- });
- return result;
- }
- window.collectNationPolicy = collectNationPolicy;
-
- $('.submit_btn').click(function () {
- var $this = $(this);
- if (!confirm('저장할까요?')) {
- return false;
- }
-
- var type = $this.parents('.control_bar').data('type');
- var data;
- if (type === 'nationPolicy') {
- data = collectNationPolicy();
- }
- else if (type === 'nationPriority') {
- data = collectPriority(type);
- }
- else if (type === 'generalPriority') {
- data = collectPriority(type);
- }
- else {
- alert('올바르지 않은 type : {0}'.type);
- return false;
- }
- console.log(data);
-
- $.post({
- url: 'j_set_npc_control.php',
- dataType: 'json',
- data: {
- type: type,
- data: JSON.stringify(data)
- }
- }).then(function (data) {
- if (!data) {
- return quickReject('설정하지 못했습니다.');
- }
- if (!data.result) {
- return quickReject('설정하지 못했습니다. : ' + data.reason);
- }
- $.toast({
- title: '적용 완료',
- content: 'NPC 정책이 반영되었습니다.',
- type: 'success',
- delay: 5000
- });
- }, errUnknownToast)
- .fail(function (reason) {
- $.toast({
- title: '에러!',
- content: reason,
- type: 'danger',
- delay: 5000
- });
- });
- })
-
-});
\ No newline at end of file