diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index d2f7ddb9..31dcfd29 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -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 능력치 상승 경험치*/ diff --git a/hwe/sammo/Scenario.php b/hwe/sammo/Scenario.php index ee5397b7..7add711a 100644 --- a/hwe/sammo/Scenario.php +++ b/hwe/sammo/Scenario.php @@ -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'); }