core: getJSFiles -> getJSPlugins

- 각각 js를 불러오기보다.. 초기화 함수를 직접 호출
- lazy loading은 어차피 나중에 새로 만들거니까 안 함.
This commit is contained in:
2021-08-30 01:14:20 +09:00
parent 68b00733e3
commit 7590c0241a
30 changed files with 94 additions and 85 deletions
+12 -12
View File
@@ -32,7 +32,7 @@ abstract class BaseCommand{
protected $env = null;
/** @var \sammo\General */
protected $destGeneralObj = null;
protected $destGeneralObj = null;
protected ?array $destCity = null;
protected ?array $destNation = null;
@@ -70,7 +70,7 @@ abstract class BaseCommand{
$this->env = $env;
$this->arg = $arg;
$this->init();
if ($this->argTest()) {
$this->isArgValid = true;
@@ -92,7 +92,7 @@ abstract class BaseCommand{
$this->reasonNotMinConditionMet = null;
$this->reasonNoPermissionToReserve = null;
}
protected function setCity(){
$this->resetTestCache();
$db = DB::db();
@@ -126,7 +126,7 @@ abstract class BaseCommand{
$this->nation = $this->generalObj->getStaticNation();
return;
}
$defaultValues = [
'nation'=>0,
'name'=>'재야',
@@ -137,7 +137,7 @@ abstract class BaseCommand{
'gold'=>0,
'rice'=>2000,
'tech'=>0,
'gennum'=>1
'gennum'=>1
];
if($this->nation && $this->nation['nation'] === $nationID){
@@ -211,7 +211,7 @@ abstract class BaseCommand{
'gold'=>0,
'rice'=>2000,
'tech'=>0,
'gennum'=>1
'gennum'=>1
];
$db = DB::db();
@@ -229,7 +229,7 @@ abstract class BaseCommand{
}
}
abstract protected function argTest():bool;
public function getArg():?array{
return $this->arg;
}
@@ -239,7 +239,7 @@ abstract class BaseCommand{
}
public function getNationID(){
return $this->generalObj->getNationID();
return $this->generalObj->getNationID();
}
public function getOfficerLevel(){
@@ -264,7 +264,7 @@ abstract class BaseCommand{
//null : can't calculate
return 0;
}
static public function getName():string {
return static::$actionName;
}
@@ -363,7 +363,7 @@ abstract class BaseCommand{
$this->cachedMinConditionMet = true;
return $this->reasonNotMinConditionMet;
}
public function testFullConditionMet():?string{
@@ -401,7 +401,7 @@ abstract class BaseCommand{
$this->cachedFullConditionMet = true;
return $this->reasonNotFullConditionMet;
}
public function getTermString():string{
@@ -475,7 +475,7 @@ abstract class BaseCommand{
abstract public function run():bool;
public function getJSFiles():array {
public function getJSPlugins():array {
return [];
}
public function getCSSFiles():array {
+2 -2
View File
@@ -166,10 +166,10 @@ class che_강행 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
+1 -1
View File
@@ -196,7 +196,7 @@ class che_건국 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/colorSelect.js'
+2 -2
View File
@@ -174,10 +174,10 @@ class che_이동 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
+1 -1
View File
@@ -231,7 +231,7 @@ class che_징병 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/recruitCrewForm.js'
+2 -2
View File
@@ -222,10 +222,10 @@ class che_첩보 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
+2 -2
View File
@@ -236,10 +236,10 @@ class che_출병 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
+2 -2
View File
@@ -332,10 +332,10 @@ class che_화계 extends Command\GeneralCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
@@ -151,7 +151,7 @@ class che_국기변경 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/colorSelect.js'
@@ -157,7 +157,7 @@ class che_국호변경 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/colorSelect.js'
+2 -2
View File
@@ -196,10 +196,10 @@ class che_급습 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
@@ -246,10 +246,10 @@ class che_물자원조 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
+2 -2
View File
@@ -157,10 +157,10 @@ class che_발령 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
@@ -159,10 +159,10 @@ class che_백성동원 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
@@ -223,10 +223,10 @@ class che_불가침제의 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
@@ -170,10 +170,10 @@ class che_불가침파기제의 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
@@ -192,10 +192,10 @@ class che_선전포고 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
+2 -2
View File
@@ -182,10 +182,10 @@ class che_수몰 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
@@ -199,10 +199,10 @@ class che_이호경식 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
@@ -168,10 +168,10 @@ class che_종전제의 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
+2 -2
View File
@@ -229,10 +229,10 @@ class che_천도 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
+2 -2
View File
@@ -195,10 +195,10 @@ class che_초토화 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}
@@ -218,10 +218,10 @@ class che_피장파장 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectNationByMap.js'
'defaultSelectNationByMap'
];
}
+2 -2
View File
@@ -205,10 +205,10 @@ class che_허보 extends Command\NationCommand
return true;
}
public function getJSFiles(): array
public function getJSPlugins(): array
{
return [
'dist_js/defaultSelectCityByMap.js'
'defaultSelectCityByMap'
];
}