커맨드 유효성을 2개에서 3개구성으로 변경
This commit is contained in:
+6
-10
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user