fix: penalty 오타
This commit is contained in:
@@ -83,7 +83,7 @@ class che_건국 extends Command\GeneralCommand
|
|||||||
$this->minConditionConstraints = [
|
$this->minConditionConstraints = [
|
||||||
ConstraintHelper::BeOpeningPart($relYear + 1),
|
ConstraintHelper::BeOpeningPart($relYear + 1),
|
||||||
ConstraintHelper::ReqNationValue('level', '국가규모', '==', 0, '정식 국가가 아니어야합니다.'),
|
ConstraintHelper::ReqNationValue('level', '국가규모', '==', 0, '정식 국가가 아니어야합니다.'),
|
||||||
ConstraintHelper::NoPanelty(PenaltyKey::NoFoundNation),
|
ConstraintHelper::NoPenalty(PenaltyKey::NoFoundNation),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ class che_건국 extends Command\GeneralCommand
|
|||||||
ConstraintHelper::CheckNationNameDuplicate($nationName),
|
ConstraintHelper::CheckNationNameDuplicate($nationName),
|
||||||
ConstraintHelper::AllowJoinAction(),
|
ConstraintHelper::AllowJoinAction(),
|
||||||
ConstraintHelper::ConstructableCity(),
|
ConstraintHelper::ConstructableCity(),
|
||||||
ConstraintHelper::NoPanelty(PenaltyKey::NoFoundNation),
|
ConstraintHelper::NoPenalty(PenaltyKey::NoFoundNation),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class che_임관 extends Command\GeneralCommand
|
|||||||
ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다'),
|
ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다'),
|
||||||
ConstraintHelper::BeNeutral(),
|
ConstraintHelper::BeNeutral(),
|
||||||
ConstraintHelper::AllowJoinAction(),
|
ConstraintHelper::AllowJoinAction(),
|
||||||
ConstraintHelper::NoPanelty(PenaltyKey::NoChosenAssignment),
|
ConstraintHelper::NoPenalty(PenaltyKey::NoChosenAssignment),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ class che_임관 extends Command\GeneralCommand
|
|||||||
ConstraintHelper::ExistsDestNation(),
|
ConstraintHelper::ExistsDestNation(),
|
||||||
ConstraintHelper::AllowJoinDestNation($relYear),
|
ConstraintHelper::AllowJoinDestNation($relYear),
|
||||||
ConstraintHelper::AllowJoinAction(),
|
ConstraintHelper::AllowJoinAction(),
|
||||||
ConstraintHelper::NoPanelty(PenaltyKey::NoChosenAssignment),
|
ConstraintHelper::NoPenalty(PenaltyKey::NoChosenAssignment),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ class ConstraintHelper{
|
|||||||
return [__FUNCTION__];
|
return [__FUNCTION__];
|
||||||
}
|
}
|
||||||
|
|
||||||
static function NoPanelty(PenaltyKey $penaltyKey):array{
|
static function NoPenalty(PenaltyKey $penaltyKey):array{
|
||||||
return [__FUNCTION__, $penaltyKey];
|
return [__FUNCTION__, $penaltyKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace sammo\Constraint;
|
|||||||
use sammo\Enums\PenaltyKey;
|
use sammo\Enums\PenaltyKey;
|
||||||
use sammo\Json;
|
use sammo\Json;
|
||||||
|
|
||||||
class NoPanelty extends Constraint{
|
class NoPenalty extends Constraint{
|
||||||
const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_ARG|Constraint::REQ_BACKED_ENUM_ARG;
|
const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_ARG|Constraint::REQ_BACKED_ENUM_ARG;
|
||||||
|
|
||||||
public function checkInputValues(bool $throwExeception=true):bool{
|
public function checkInputValues(bool $throwExeception=true):bool{
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo\Enums;
|
namespace sammo\Enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Penalty Key
|
* Penalty Key
|
||||||
* general의 penalty 항목
|
* general의 penalty 항목
|
||||||
*/
|
*/
|
||||||
enum PenaltyKey: string{
|
enum PenaltyKey: string
|
||||||
|
{
|
||||||
case SendPrivateMsgDelay = 'sendPrivateMsgDelay';
|
case SendPrivateMsgDelay = 'sendPrivateMsgDelay';
|
||||||
case NoSendPrivateMsg = 'noSendPrivateMsg';
|
case NoSendPrivateMsg = 'noSendPrivateMsg';
|
||||||
case NoSendPublicMsg = 'noSendPublicMsg';
|
case NoSendPublicMsg = 'noSendPublicMsg';
|
||||||
@@ -17,4 +19,22 @@ enum PenaltyKey: string{
|
|||||||
case NoChiefChange = 'noChiefChange';
|
case NoChiefChange = 'noChiefChange';
|
||||||
case NoFoundNation = 'noFoundNation';
|
case NoFoundNation = 'noFoundNation';
|
||||||
case NoChosenAssignment = 'noChosenAssignment';
|
case NoChosenAssignment = 'noChosenAssignment';
|
||||||
}
|
|
||||||
|
public function getHelptext(): string
|
||||||
|
{
|
||||||
|
return match ($this) {
|
||||||
|
PenaltyKey::SendPrivateMsgDelay => '개인 메세지 보내기 제한 시간',
|
||||||
|
PenaltyKey::NoSendPrivateMsg => '개인 메세지 보내기 금지',
|
||||||
|
PenaltyKey::NoSendPublicMsg => '공개 메세지 보내기 금지',
|
||||||
|
PenaltyKey::NoTopSecret => '최고기밀 메세지 보내기 금지',
|
||||||
|
PenaltyKey::NoChief => '수뇌 금지',
|
||||||
|
PenaltyKey::NoAmbassador => '외교권자 금지',
|
||||||
|
PenaltyKey::NoBanGeneral => '장수 추방 금지',
|
||||||
|
PenaltyKey::NoChiefTurnInput => '수뇌 턴 입력 금지',
|
||||||
|
PenaltyKey::NoChiefChange => '수뇌 임명/해임 금지',
|
||||||
|
PenaltyKey::NoFoundNation => '건국 금지',
|
||||||
|
PenaltyKey::NoChosenAssignment => '지정 임관 금지',
|
||||||
|
default => "페널티({$this->value})",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user