|
|
@ -513,12 +513,20 @@ class TestingResourceService
|
|
|
|
|
|
|
|
|
|
|
|
public function getResourceTypes($game)
|
|
|
|
public function getResourceTypes($game)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
$gameSetting = $this->repository->getGameSettingByGameId($game['id']);
|
|
|
|
|
|
|
|
if ($gameSetting['has_itf'] == 0) {
|
|
|
|
|
|
|
|
return [];
|
|
|
|
|
|
|
|
}
|
|
|
|
$gameResource = new GameResource($game);
|
|
|
|
$gameResource = new GameResource($game);
|
|
|
|
return $gameResource->getResourceTypes();
|
|
|
|
return $gameResource->getResourceTypes();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function getResources($game, $typeId = null)
|
|
|
|
public function getResources($game, $typeId = null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
$gameSetting = $this->repository->getGameSettingByGameId($game['id']);
|
|
|
|
|
|
|
|
if ($gameSetting['has_itf'] == 0) {
|
|
|
|
|
|
|
|
return [];
|
|
|
|
|
|
|
|
}
|
|
|
|
$gameResource = new GameResource($game);
|
|
|
|
$gameResource = new GameResource($game);
|
|
|
|
return $gameResource->getResources($typeId);
|
|
|
|
return $gameResource->getResources($typeId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|