GameConst에 mapName과 unitSet추가

This commit is contained in:
2018-07-12 01:59:32 +09:00
parent fb72d02912
commit 02f2209e8f
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -9,6 +9,10 @@ class GameConstBase
public static $banner = "KOEI의 이미지를 사용, 응용하였습니다 / 제작 : HideD(hided62@gmail.com)";
/** @var string 코드 아래에 붙는 설명 코드 */
public static $helper = "도움 주신 분들";
/** @var string mapName 사용중인 지도명 */
public static $mapName = 'che';
/** @var string unitSet 사용중인 유닛셋 */
public static $unitSet = 'che';
/** @var int 내정시 최하 민심 설정*/
public static $develrate = 50;
/** @var int 능력치 상승 경험치*/
+4 -1
View File
@@ -358,12 +358,13 @@ class Scenario{
public function buildConf(){
$path = __dir__.'/../d_setting';
Util::generatePHPClassFile($path.'/GameConst.php', $this->gameConf, 'GameConstBase', 'sammo');
$mapPath = __dir__.'/../scenario/map';
$unitPath = __dir__.'/../scenario/unit';
$mapName = $this->gameConf['mapName']??'che';
$unitSet = $this->gameConf['unitSet']??'che';
$this->gameConf['mapName'] = $mapName;
$this->gameConf['unitSet'] = $unitSet;
if(!file_exists("$mapPath/$mapName.php")){
throw new \RuntimeException('맵 파일이 올바르게 지정되지 않음! : '.$mapName);
@@ -372,6 +373,8 @@ class Scenario{
throw new \RuntimeException('유닛 파일이 올바르게 지정되지 않음! : '.$unitSet);
}
Util::generatePHPClassFile($path.'/GameConst.php', $this->gameConf, 'GameConstBase', 'sammo');
copy("$mapPath/$mapName.php", $path.'/CityConst.php');
copy("$unitPath/$unitSet.php", $path.'/GameUnitConst.php');
}