feat(in-progress): 턴 조작기를 vue로 분리

This commit is contained in:
2021-11-27 15:40:31 +09:00
parent c493640dae
commit c7219eeb33
7 changed files with 354 additions and 62 deletions
+30
View File
@@ -461,6 +461,36 @@ function commandGroup($typename, $type = 0)
}
}
function getCommandTable(General $general){
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->turnOnCache();
$env = $gameStor->getAll();
$result = [];
foreach (GameConst::$availableGeneralCommand as $commandCategory => $commandList) {
$subList = [];
foreach ($commandList as $commandClassName) {
$commandObj = buildGeneralCommandClass($commandClassName, $general, $env);
if (!$commandObj->canDisplay()) {
continue;
}
$subList[Util::getClassNameFromObj($commandObj)] = [
'compansation'=>$commandObj->getCompensationStyle(),
'possible'=>$commandObj->hasMinConditionMet(),
'title'=>$commandObj->getCommandDetailTitle(),
];
}
$result[] = [
'category'=>$commandCategory,
'values'=>$subList
];
}
return $result;
}
function printCommandTable(General $generalObj)
{
$db = DB::db();