install.php에 1차적으로 ChangeCity를 물림

This commit is contained in:
2018-03-28 17:20:35 +09:00
parent c1976b5b7a
commit 9b139e54f4
7 changed files with 16 additions and 9 deletions
+7
View File
@@ -9,6 +9,9 @@ class Scenario{
private $data;
private $initialEvents;
private $events;
public function __construct(int $scenarioIdx){
$scenarioPath = self::SCENARIO_PATH."/scenario_{$scenarioIdx}.json";
@@ -16,6 +19,10 @@ class Scenario{
$this->scenarioPath = $scenarioPath;
$this->data = Json::decode(file_get_contents($scenarioPath));
$this->initialEvents = array_map(function($rawEvent){
return new \sammo\Event\EventHandler($rawEvent[0], array_slice($rawEvent, 1));
}, Util::array_get($this->data['initialEvents'], []));
}
public function getScenarioIdx(){