mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 03:23:17 -04:00
Modding: Resolved #12299 - Allow removing free policies
This commit is contained in:
parent
0d19bf55e5
commit
1159c29f85
@ -258,9 +258,8 @@ class PolicyManager : IsPartOfGameInfoSerialization {
|
||||
if (!adoptedPolicies.remove(policy.name))
|
||||
throw IllegalStateException("Attempt to remove non-adopted Policy ${policy.name}")
|
||||
|
||||
if (!assumeWasFree) {
|
||||
if (--numberOfAdoptedPolicies < 0)
|
||||
throw IllegalStateException("Attempt to remove Policy ${policy.name} but civ only has free policies left")
|
||||
if (!assumeWasFree && numberOfAdoptedPolicies > 0) {
|
||||
numberOfAdoptedPolicies -= 1
|
||||
}
|
||||
|
||||
removePolicyFromTransients(policy)
|
||||
|
Loading…
x
Reference in New Issue
Block a user