fix: complete logical clock wall-time isolation
This commit is contained in:
@@ -193,7 +193,7 @@ class che_몰수 extends Command\NationCommand
|
||||
$src,
|
||||
$src,
|
||||
$text,
|
||||
new \DateTime(),
|
||||
Message::gameNow(),
|
||||
new \DateTime('9999-12-31'),
|
||||
[]
|
||||
);
|
||||
|
||||
@@ -198,8 +198,9 @@ class che_불가침제의 extends Command\NationCommand
|
||||
$destNation['color']
|
||||
);
|
||||
|
||||
$now = new \DateTime($date);
|
||||
$validUntil = new \DateTime($date);
|
||||
$clock = \sammo\GameClock::fromStorage(\sammo\KVStorage::getStorage($db, 'game_env'));
|
||||
$now = \DateTime::createFromImmutable($clock->tickToDateTime($general->getTurnTick()));
|
||||
$validUntil = clone $now;
|
||||
$validMinutes = max(30, $env['turnterm'] * 3);
|
||||
$validUntil->add(new \DateInterval("PT{$validMinutes}M"));
|
||||
|
||||
|
||||
@@ -147,8 +147,9 @@ class che_불가침파기제의 extends Command\NationCommand{
|
||||
$destNation['color']
|
||||
);
|
||||
|
||||
$now = new \DateTime($date);
|
||||
$validUntil = new \DateTime($date);
|
||||
$clock = \sammo\GameClock::fromStorage(\sammo\KVStorage::getStorage($db, 'game_env'));
|
||||
$now = \DateTime::createFromImmutable($clock->tickToDateTime($general->getTurnTick()));
|
||||
$validUntil = clone $now;
|
||||
$validMinutes = max(30, $env['turnterm']*3);
|
||||
$validUntil->add(new \DateInterval("PT{$validMinutes}M"));
|
||||
|
||||
@@ -217,4 +218,4 @@ class che_불가침파기제의 extends Command\NationCommand{
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,8 +145,9 @@ class che_종전제의 extends Command\NationCommand{
|
||||
$destNation['color']
|
||||
);
|
||||
|
||||
$now = new \DateTime($date);
|
||||
$validUntil = new \DateTime($date);
|
||||
$clock = \sammo\GameClock::fromStorage(\sammo\KVStorage::getStorage($db, 'game_env'));
|
||||
$now = \DateTime::createFromImmutable($clock->tickToDateTime($general->getTurnTick()));
|
||||
$validUntil = clone $now;
|
||||
$validMinutes = max(30, $env['turnterm']*3);
|
||||
$validUntil->add(new \DateInterval("PT{$validMinutes}M"));
|
||||
|
||||
@@ -203,4 +204,4 @@ class che_종전제의 extends Command\NationCommand{
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user