feat: 자율턴 한계 표기

This commit is contained in:
2021-11-13 16:33:11 +09:00
parent cf0a74a9d3
commit bdf6d38f5d
4 changed files with 28 additions and 9 deletions
+5 -2
View File
@@ -21,9 +21,11 @@ foreach($rawTurn as [$turn_idx, $action, $arg, $brief]){
];
}
[$turnTerm, $year, $month, $lastExecute] = $gameStor->getValuesAsArray(['turnterm', 'year', 'month', 'turntime']);
$turnTime = $db->queryFirstField('SELECT turntime FROM general WHERE no=%i', $generalID);
[$turnTime, $rawGeneralAux] = $db->queryFirstList('SELECT turntime, aux FROM general WHERE no=%i', $generalID);
$generalAux = Json::decode($rawGeneralAux??'{}');
if(cutTurn($turnTime, $turnTerm) > cutTurn($lastExecute, $turnTerm)){
//이미 이번달에 실행된 턴이다.
@@ -42,5 +44,6 @@ Json::die([
'year'=>$year,
'month'=>$month,
'date'=>TimeUtil::now(true),
'turn'=>$commandList
'turn'=>$commandList,
'autorun_limit'=> $generalAux['autorun_limit']??null,
]);