build(WIP): printDist를 모든 코드에 적용
- 현재 summernote 미작동
This commit is contained in:
+46
-33
@@ -11,10 +11,10 @@ namespace sammo;
|
||||
* TODO: side effect를 제거
|
||||
*/
|
||||
|
||||
/**
|
||||
* 관리자 권한이 필요함을 출력.
|
||||
* @return void
|
||||
*/
|
||||
/**
|
||||
* 관리자 권한이 필요함을 출력.
|
||||
* @return void
|
||||
*/
|
||||
function requireAdminPermissionHTML()
|
||||
{
|
||||
ob_start();
|
||||
@@ -28,8 +28,8 @@ function requireAdminPermissionHTML()
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=1024" />
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<?= WebUtil::printCSS('dist_css/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printDist('ts', 'common', true) ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -119,7 +119,7 @@ function displaySpecialDomesticInfo(?string $type): string
|
||||
]);
|
||||
}
|
||||
|
||||
function allButton(bool $seizeNPCMode, array $opts=[])
|
||||
function allButton(bool $seizeNPCMode, array $opts = [])
|
||||
{
|
||||
if ($seizeNPCMode) {
|
||||
$site = "a_npcList.php";
|
||||
@@ -143,7 +143,7 @@ function allButton(bool $seizeNPCMode, array $opts=[])
|
||||
}
|
||||
|
||||
|
||||
function commandButton(array $opts=[])
|
||||
function commandButton(array $opts = [])
|
||||
{
|
||||
$session = Session::getInstance();
|
||||
$userID = Session::getUserID();
|
||||
@@ -196,13 +196,13 @@ function formatDefenceTrain(int $value): string
|
||||
{
|
||||
if ($value === 999) {
|
||||
return "×";
|
||||
} else if ($value >= 90){
|
||||
} else if ($value >= 90) {
|
||||
return "☆";
|
||||
} else if ($value >= 80) {
|
||||
return "◎";
|
||||
} else if ($value >= 60) {
|
||||
return "○";
|
||||
} else{
|
||||
} else {
|
||||
return "△";
|
||||
}
|
||||
}
|
||||
@@ -253,36 +253,49 @@ function getInvitationList(array $nationList)
|
||||
}
|
||||
|
||||
|
||||
function getAutorunInfo($autorunOption){
|
||||
$templates = new \League\Plates\Engine(__DIR__.'/templates');
|
||||
function getAutorunInfo($autorunOption)
|
||||
{
|
||||
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
|
||||
$auto_info = [];
|
||||
foreach($autorunOption['options'] as $auto_option => $value){
|
||||
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;
|
||||
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){
|
||||
if ($limit >= 43200) {
|
||||
$auto_info['제한'] = '항상 유효';
|
||||
}
|
||||
else if($limit % 60 == 0){
|
||||
$auto_info['제한'] = ($limit/60).'시간 유효';
|
||||
}
|
||||
else{
|
||||
$auto_info['제한'] = ($limit).'분 유효';
|
||||
} 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
|
||||
'text' => '자율행동',
|
||||
'info' => $auto_info,
|
||||
'style' => 'text-decoration:underline',
|
||||
'copyable_info' => true
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user