summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-28 19:44:13 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-28 19:44:13 +0200
commit6acd44aff10c4431ed377a85880566b39549272f (patch)
treedb410ba80334b5fac2dfe8b160dc013409b47813 /rules.ts
parentc41f374eca04d1f2d645cae56590a8d362483d48 (diff)
downloadplantagenet-6acd44aff10c4431ed377a85880566b39549272f.tar.gz
more undo (drop provender/carts during haul/sail)
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.ts b/rules.ts
index 62e8cdc..cd287bc 100644
--- a/rules.ts
+++ b/rules.ts
@@ -1250,10 +1250,12 @@ function add_lord_assets(lord: Lord, n: Asset, x: number) {
}
function drop_prov(lord: Lord) {
+ push_undo()
add_lord_assets(lord, PROV, -1)
}
function drop_cart(lord: Lord) {
+ push_undo()
add_lord_assets(lord, CART, -1)
}
@@ -4203,6 +4205,7 @@ states.sail = {
prov: drop_prov,
cart: drop_cart,
locale(to) {
+ push_undo()
let from = get_lord_locale(game.command)
if (can_naval_blockade(from) || can_naval_blockade(to)) {
game.where = to