feat: 턴 시간 변경을 직관적인 동작으로 재 설계
- '다다음턴' 부터 시간을 00:00 ~ 59:59까지 랜덤하게
This commit is contained in:
@@ -216,6 +216,16 @@ class TurnExecutionHelper
|
||||
}
|
||||
|
||||
$turntime = addTurn($general->getTurnTime(), $gameStor->turnterm);
|
||||
|
||||
$nextTurnTimeBase = $general->getAuxVar('nextTurnTimeBase');
|
||||
if($nextTurnTimeBase !== null){
|
||||
$turntime = cutTurn($turntime, $gameStor->turnterm);
|
||||
$turntimeObj = new \DateTimeImmutable($turntime);
|
||||
$turntimeObj = $turntimeObj->add(TimeUtil::secondsToDateInterval($nextTurnTimeBase));
|
||||
$turntime = TimeUtil::format($turntimeObj, true);
|
||||
$general->setAuxVar('nextTurnTimeBase', null);
|
||||
}
|
||||
|
||||
$general->setVar('turntime', $turntime);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user