커맨드 유효성을 2개에서 3개구성으로 변경

This commit is contained in:
2020-05-04 19:51:11 +09:00
parent f25f5008f1
commit 77248ad4d8
100 changed files with 4124 additions and 3420 deletions
+6 -10
View File
@@ -328,11 +328,11 @@ function setGeneralCommand(int $generalID, array $rawTurnList, string $command,
];
}
if(!$commandObj->isReservable()){
if(!$commandObj->hasPermissionToReserve()){
return [
'result'=>false,
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testReservable(),
'test'=>'isReservable',
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testPermissionToReserve(),
'test'=>'hasPermissionToReserve',
'target'=>'command'
];
}
@@ -408,18 +408,14 @@ function setNationCommand(int $generalID, array $turnList, string $command, ?arr
];
}
if(!$commandObj->isReservable()){
if(!$commandObj->hasPermissionToReserve()){
return [
'result'=>false,
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testReservable(),
'test'=>'isReservable',
'reason'=>'예약 불가능한 커맨드 :'.$commandObj->testPermissionToReserve(),
'test'=>'hasPermissionToReserve',
'target'=>'command'
];
}
//TODO: Reservable은 '정말로 입력 불가'이고, '입력은 가능하지만 실행은 안될 것 같은' 군을 하나더 추가해야함
// Runnable은 Arg를 모두 받아서 처리해야 하는 것이고, Arg를 받지 않아도 안될 것 같지만 입력 자체는 가능할 것 같은 커맨드.
$brief = $commandObj->getBrief();
_setNationCommand($commandObj, $turnList);
return [