j_load_scenario.php 에서 볼 수 있는 요약 형태본 추가
- 소소한 버그 수정
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Value Converter
|
* Value Converter
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
require "lib.php";
|
require "lib.php";
|
||||||
|
require "func.php";
|
||||||
$session = Session::Instance()->setReadOnly();
|
$session = Session::Instance()->setReadOnly();
|
||||||
if($session->userGrade < 5){
|
if($session->userGrade < 5){
|
||||||
Json::die([
|
Json::die([
|
||||||
|
|||||||
@@ -238,7 +238,9 @@ class Scenario{
|
|||||||
'title'=>$this->getTitle(),
|
'title'=>$this->getTitle(),
|
||||||
'npc_cnt'=>count($this->getNPC()),
|
'npc_cnt'=>count($this->getNPC()),
|
||||||
'npcEx_cnt'=>count($this->getNPCex()),
|
'npcEx_cnt'=>count($this->getNPCex()),
|
||||||
'nation'=>$this->getNation()
|
'nation'=>array_map(function($nation){
|
||||||
|
return $nation->getBrief();
|
||||||
|
},$this->getNation())
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class NPC{
|
|||||||
string $name,
|
string $name,
|
||||||
int $pictureID,
|
int $pictureID,
|
||||||
int $nationID,
|
int $nationID,
|
||||||
string $locatedCity,
|
$locatedCity, //FIXME: 7.1로 올릴 때 ?string 으로 변경
|
||||||
int $leadership,
|
int $leadership,
|
||||||
int $power,
|
int $power,
|
||||||
int $intel,
|
int $intel,
|
||||||
|
|||||||
@@ -117,4 +117,21 @@ class Nation{
|
|||||||
}
|
}
|
||||||
$db->insert('diplomacy', $diplomacy);
|
$db->insert('diplomacy', $diplomacy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBrief(){
|
||||||
|
return [
|
||||||
|
'id'=>$this->id,
|
||||||
|
'name'=>$this->name,
|
||||||
|
'color'=>$this->color,
|
||||||
|
'gold'=>$this->gold,
|
||||||
|
'rice'=>$this->rice,
|
||||||
|
'infoText'=>$this->infoText,
|
||||||
|
'tech'=>$this->tech,
|
||||||
|
'type'=>$this->type,
|
||||||
|
'nationLevel'=>$this->nationLevel,
|
||||||
|
'cities'=>$this->cities,
|
||||||
|
'generals'=>count($this->generals),
|
||||||
|
'generalsEx'=>count($this->generalsEx)
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user