mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 22:35:42 +00:00
Preserve safe passage destination (#8468)
This commit is contained in:
+9
-1
@@ -53,6 +53,8 @@ namespace eagle {
|
||||
public TMP_Text goldLabel;
|
||||
public TMP_Text foodLabel;
|
||||
|
||||
private ProvinceId _safePassageDestinationProvinceId;
|
||||
|
||||
private AttackDecisionAvailableCommand AttackDecisionCommand =>
|
||||
_availableCommand.AttackDecisionCommand;
|
||||
|
||||
@@ -67,7 +69,12 @@ namespace eagle {
|
||||
if (withdrawToggle.isOn)
|
||||
return new AttackDecisionType { Withdraw = new WithdrawDecision() };
|
||||
if (safePassageToggle.isOn)
|
||||
return new AttackDecisionType { SafePassage = new SafePassageDecision() };
|
||||
return new AttackDecisionType {
|
||||
SafePassage =
|
||||
new SafePassageDecision {
|
||||
ToProvinceId = _safePassageDestinationProvinceId
|
||||
}
|
||||
};
|
||||
|
||||
throw new Exception("No decision selected");
|
||||
}
|
||||
@@ -141,6 +148,7 @@ namespace eagle {
|
||||
break;
|
||||
case AttackDecisionType.SealedValueOneofCase.SafePassage:
|
||||
enableSafePassage = true;
|
||||
_safePassageDestinationProvinceId = ad.SafePassage.ToProvinceId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user