diff --git a/hwe/func_template.php b/hwe/func_template.php
index 53c92195..b1fc4397 100644
--- a/hwe/func_template.php
+++ b/hwe/func_template.php
@@ -250,3 +250,38 @@ function getInvitationList(array $nationList)
'nationList' => $nationList
]);
}
+
+
+function getAutorunInfo($autorunOption){
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
+ $auto_info = [];
+ foreach($autorunOption['options'] as $auto_option => $value){
+ assert($value);
+ switch($auto_option){
+ case 'develop': $auto_info['내정'] = '내정'; break;
+ case 'warp': $auto_info['순간이동'] = '순간이동'; break;
+ case 'recruit': $auto_info['징병'] = $auto_info['징병']??'징병'; break;
+ case 'recruit_high': $auto_info['징병'] = '모병'; break;
+ case 'train': $auto_info['훈사'] = '훈련/사기진작'; break;
+ case 'battle': $auto_info['출병'] = '출병'; break;
+ case 'chief': $auto_info['사령턴'] = '사령턴'; break;
+ }
+ }
+ $limit = Util::toInt($autorunOption['limit_minutes']);
+ if($limit >= 43200){
+ $auto_info['제한'] = '항상 유효';
+ }
+ else if($limit % 60 == 0){
+ $auto_info['제한'] = ($limit/60).'시간 유효';
+ }
+ else{
+ $auto_info['제한'] = ($limit).'분 유효';
+ }
+ $auto_info = join(', ', array_values($auto_info));
+ return $templates->render('tooltip', [
+ 'text'=>'자율행동',
+ 'info'=>$auto_info,
+ 'style'=>'text-decoration:underline',
+ 'copyable_info'=>true
+ ]);
+}
\ No newline at end of file
diff --git a/hwe/func_tournament.php b/hwe/func_tournament.php
index 51345b8d..0c1c1f8f 100644
--- a/hwe/func_tournament.php
+++ b/hwe/func_tournament.php
@@ -156,17 +156,17 @@ function getTournamentTime() {
function getTournament(int $tnmt) {
return [
- "경기 없음",
- "참가 모집중",
- "예선 진행중",
- "본선 추첨중",
- "본선 진행중",
- "16강 배정중",
- "베팅 진행중",
- "16강 진행중",
- "8강 진행중",
- "4강 진행중",
- "결승 진행중",
+ "경기 없음",
+ "참가 모집중",
+ "예선 진행중",
+ "본선 추첨중",
+ "본선 진행중",
+ "16강 배정중",
+ "베팅 진행중",
+ "16강 진행중",
+ "8강 진행중",
+ "4강 진행중",
+ "결승 진행중",
][$tnmt]??"TOURNAMENT_TYPE_ERR_{$tnmt}";
}
diff --git a/hwe/index.php b/hwe/index.php
index 45b73e0d..a83f67b9 100644
--- a/hwe/index.php
+++ b/hwe/index.php
@@ -65,24 +65,20 @@ if ($nationID) {
$nationStor->cacheAll();
}
-$valid = 0;
if ($gameStor->extended_general == 0) {
$extend = "표준";
} else {
$extend = "확장";
- $valid = 1;
}
if ($gameStor->fiction == 0) {
$fiction = "사실";
} else {
$fiction = "가상";
- $valid = 1;
}
if ($gameStor->npcmode == 0) {
$npcmode = "불가능";
} else if ($gameStor->npcmode == 1) {
$npcmode = "가능";
- $valid = 1;
} else {
$npcmode = "선택 생성";
}
@@ -95,6 +91,22 @@ $auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction');
$myNationStatic = getNationStaticInfo($generalObj->getNationID());
$nationColorType = substr($myNationStatic['color'] ?? '#000000', 1);
+
+$autorunUser = ($gameStor->autorun_user) ?? [];
+$otherTextInfo = [];
+
+if ($gameStor->join_mode == 'onlyRandom') {
+ $otherTextInfo[] = '랜덤 임관 전용';
+}
+if ($autorunUser['limit_minutes'] ?? false) {
+ $otherTextInfo[] = getAutorunInfo($autorunUser);
+}
+
+if (!$otherTextInfo) {
+ $otherTextInfo = '표준';
+} else {
+ $otherTextInfo = join(', ', $otherTextInfo);
+}
?>
@@ -145,83 +157,80 @@ $nationColorType = substr($myNationStatic['color'] ?? '#000000', 1);
= allButton($gameStor->npcmode == 1) ?>
-
+
삼국지 모의전투 HiDCHe = $serverName . $serverCnt ?>기 (= $scenario ?>)
-
-
-
- >= $scenario ?>
-
-
- >NPC수 : = $extend ?>
-
-
- >NPC상성 : = $fiction ?>
-
-
- >NPC선택 : = $npcmode ?>
-
+
+
+ = $scenario ?>
+
+
+ NPC수 : = $extend ?>
+
+
+ NPC상성 : = $fiction ?>
+
+
+ NPC선택 : = $npcmode ?>
+
+
+ 기타 설정: = $otherTextInfo ?>
-
-
-
= info(2) ?>
-
전체 접속자 수 : = $gameStor->online_user_cnt ?> 명
-
턴당 갱신횟수 : = $gameStor->conlimit ?>회
-
-
-
-
= !$plock ? ("동작 시각: " . substr($gameStor->turntime, 5, 14) . "") : ("동작 시각: " . substr($gameStor->turntime, 5, 14) . "") ?>
-
tournament == 0) : ?>
-
현재 토너먼트 경기 없음
+
= info(2) ?>
+
전체 접속자 수 : = $gameStor->online_user_cnt ?> 명
+
턴당 갱신횟수 : = $gameStor->conlimit ?>회
+
= info(3) ?>
+
+
= !$plock ? ("동작 시각: " . substr($gameStor->turntime, 5, 14) . "") : ("동작 시각: " . substr($gameStor->turntime, 5, 14) . "") ?>
+
+
tournament == 0) : ?>
+ 현재 토너먼트 경기 없음
-
-
+
0) : ?>
-
+ = $auctionCount ?>건 거래 진행중
- 진행중 거래 없음
+ 진행중 거래 없음
-
+
vote ?: [''];
$vote_title = Tag2Code($gameStor->vote_title ?? '-');
?>
- 진행중 설문 없음
+ 진행중 설문 없음
-
-
-
접속중인 국가: = $gameStor->online_nation ?>
+
+
접속중인 국가: = $gameStor->online_nation ?>
-
-
운영자 메세지 : = $gameStor->msg ?>
+
+
운영자 메세지 : = $gameStor->msg ?>
-
-
-
【 국가방침 】
-
= nationMsg($generalObj) ?>
+
+
+
【 국가방침 】
+
= nationMsg($generalObj) ?>
-
-
+
+
【 접속자 】= onlinegen($generalObj) ?>
@@ -248,7 +257,7 @@ $nationColorType = substr($myNationStatic['color'] ?? '#000000', 1);
= getMapHtml($mapTheme) ?>
= cityInfo($generalObj) ?>
-
+
@@ -270,19 +279,17 @@ $nationColorType = substr($myNationStatic['color'] ?? '#000000', 1);
= formatHistoryToHTML(getGlobalHistoryLogRecent(15)) ?>
-
-
= allButton($gameStor->npcmode == 1) ?>
+
@@ -349,6 +356,10 @@ $nationColorType = substr($myNationStatic['color'] ?? '#000000', 1);
개인
외교
+
+
+
+
diff --git a/hwe/j_server_basic_info.php b/hwe/j_server_basic_info.php
index 334d8f67..db088fdf 100644
--- a/hwe/j_server_basic_info.php
+++ b/hwe/j_server_basic_info.php
@@ -2,42 +2,7 @@
namespace sammo;
include "lib.php";
-
-$templates = new \League\Plates\Engine(__DIR__.'/templates');
-
-function getAutorunInfo($autorunOption){
- global $templates;
- $auto_info = [];
- foreach($autorunOption['options'] as $auto_option => $value){
- assert($value);
- switch($auto_option){
- case 'develop': $auto_info['내정'] = '내정'; break;
- case 'warp': $auto_info['순간이동'] = '순간이동'; break;
- case 'recruit': $auto_info['징병'] = $auto_info['징병']??'징병'; break;
- case 'recruit_high': $auto_info['징병'] = '모병'; break;
- case 'train': $auto_info['훈사'] = '훈련/사기진작'; break;
- case 'battle': $auto_info['출병'] = '출병'; break;
- case 'chief': $auto_info['사령턴'] = '사령턴'; break;
- }
- }
- $limit = Util::toInt($autorunOption['limit_minutes']);
- if($limit >= 43200){
- $auto_info['제한'] = '항상 유효';
- }
- else if($limit % 60 == 0){
- $auto_info['제한'] = ($limit/60).'시간 유효';
- }
- else{
- $auto_info['제한'] = ($limit).'분 유효';
- }
- $auto_info = join(', ', array_values($auto_info));
- return $templates->render('tooltip', [
- 'text'=>'자율행동',
- 'info'=>$auto_info,
- 'style'=>'text-decoration:underline',
- 'copyable_info'=>true
- ]);
-}
+include "func_template.php";
$session = Session::requireLogin([
'game'=>null,
diff --git a/hwe/scss/main.scss b/hwe/scss/main.scss
index bf2b05ae..8ca19401 100644
--- a/hwe/scss/main.scss
+++ b/hwe/scss/main.scss
@@ -153,6 +153,11 @@ body {
}
}
+#nation-msg-box{
+ position: relative;
+ overflow: hidden;
+}
+
@include media-breakpoint-down(md) {
.buttonPlate {
display: grid;
@@ -176,6 +181,11 @@ body {
display: block;
}
+ #nation-msg {
+ transform-origin: 0px 0px;
+ width: 1000px;
+ transform: scale(0.5);
+ }
#mapZone {
grid-column: 1 / 2;
@@ -369,28 +379,8 @@ body {
position: relative;
}
-#msg_input {
- color: white;
- background-color: black;
- font-size: 12px;
- margin: 0 2px;
- height: 20px;
- border: solid 1px gray;
-}
-
-#msg_submit {
- position: absolute;
- right: 0;
- margin-right: 2px;
-}
-
#mailbox_list {
- float: left;
- color: white;
- background-color: black;
- font-size: 12px;
- width: 160px;
- height: 20px;
+ font-weight: bold;
}
.board_header {
@@ -441,6 +431,20 @@ body {
font-size: 8px;
}
+
+@include media-breakpoint-down(md) {
+ #mailbox_list-col{
+ order: 1;
+ }
+ #msg_submit-col {
+ order: 2;
+ }
+ #msg_input-col{
+ order: 3;
+ }
+}
+
+
/*
.public_message .msg_target{
box-shadow: 2px 2px darkslategrey;
@@ -508,17 +512,26 @@ body {
opacity: 0.7;
}
- .btn.active{
+ .btn.active {
opacity: 1.0;
}
- .btn:active{
+ .btn:active {
opacity: 0.7;
}
}
}
-.s-border-tb{
+
+.s-border-t {
+ border-top: gray solid 1px;
+}
+
+.s-border-b {
+ border-bottom: gray solid 1px;
+}
+
+.s-border-tb {
border-top: gray solid 1px;
border-bottom: gray solid 1px;
}
\ No newline at end of file
diff --git a/hwe/ts/main.ts b/hwe/ts/main.ts
index d5eb4f1d..54f8a00b 100644
--- a/hwe/ts/main.ts
+++ b/hwe/ts/main.ts
@@ -11,9 +11,11 @@ import { exportWindow } from './util/exportWindow';
exportWindow($, '$');
import '../scss/main.scss';
+import { unwrap } from './util/unwrap';
+import { number } from 'vue-types';
$(function ($) {
- $('#refreshPage').click(function () {
+ $('.refreshPage').click(function () {
document.location.reload();
return false;
});
@@ -44,6 +46,10 @@ $(function ($) {
button: HTMLAnchorElement,
}[] = [];
+ let nationMsgBox!: HTMLElement;
+ let nationMsg!: HTMLElement;
+ let nationMsgHeight : number|undefined = undefined;
+
function init() {
const buttons = document.querySelectorAll
('#float-tabs a.btn');
if (!buttons) {
@@ -62,6 +68,9 @@ $(function ($) {
}
objects.push({ target, button });
}
+
+ nationMsgBox = unwrap(document.getElementById('nation-msg-box'));
+ nationMsg = unwrap(document.getElementById('nation-msg'));
}
function onScroll() {
if (!finInit && !init()) return;
@@ -93,6 +102,19 @@ $(function ($) {
button.classList.add('active');
}
+
+ if(nationMsgBox.offsetWidth < nationMsg.offsetWidth){
+ if(nationMsgHeight === undefined){
+ nationMsgHeight = nationMsgBox.offsetHeight;
+ nationMsgBox.style.height = `${nationMsgHeight / 2}px`;
+ }
+ }
+ else{
+ if(nationMsgBox.style.height){
+ nationMsgHeight = undefined;
+ nationMsgBox.style.height = '';
+ }
+ }
}
function ready(fn: () => unknown) {
if (document.readyState != 'loading') {