refac: KVStorage의 내부구조를 Ds\Map으로 변경
This commit is contained in:
@@ -41,7 +41,7 @@ function processSpring() {
|
||||
|
||||
function processGoldIncome() {
|
||||
$db = DB::db();
|
||||
$gameStor = new KVStorage($db, 'game_env');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||
$adminLog = [];
|
||||
|
||||
@@ -52,7 +52,7 @@ class ResetTurnTime extends \sammo\BaseAPI
|
||||
return '충분한 유산 포인트를 가지고 있지 않습니다.';
|
||||
}
|
||||
|
||||
$gameStor = new KVStorage($db, 'game_env');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
[$turnTerm, $serverTurnTime] = $gameStor->getValuesAsArray(['turnterm', 'turntime']);
|
||||
|
||||
$currTurnTime = new DateTimeImmutable($general->getTurnTime());
|
||||
|
||||
@@ -47,7 +47,7 @@ class SetBlockScout extends \sammo\BaseAPI
|
||||
return "권한이 부족합니다.";
|
||||
}
|
||||
|
||||
$gameStor = new KVStorage($db, 'game_env');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$blockChangeScout = $gameStor->getValue('block_change_scout')??false;
|
||||
if ($blockChangeScout){
|
||||
return "임관 설정을 바꿀 수 없도록 설정되어 있습니다.";
|
||||
|
||||
@@ -15,7 +15,7 @@ class BlockScoutAction extends \sammo\Event\Action{
|
||||
'scout'=>1
|
||||
], true);
|
||||
if($this->blockChangeScout !== null){
|
||||
$gameStor = new KVStorage($db, 'game_env');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$gameStor->setValue('block_change_scout', $this->blockChangeScout);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class UnblockScoutAction extends \sammo\Event\Action{
|
||||
]);
|
||||
|
||||
if($this->blockChangeScout !== null){
|
||||
$gameStor = new KVStorage($db, 'game_env');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$gameStor->setValue('block_change_scout', $this->blockChangeScout);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user