From df2880f3fafd3be2321ecfd0a26b3917f516ebfd Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 30 Jan 2023 22:27:29 +0100 Subject: Only log the final feed. --- rules.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rules.js b/rules.js index cab3922..7799040 100644 --- a/rules.js +++ b/rules.js @@ -667,7 +667,10 @@ function feed_lord_skip(lord) { function feed_lord(lord) { // reuse "moved" flag for hunger - set_lord_moved(lord, get_lord_moved(lord) - 1) + let n = get_lord_moved(lord) - 1 + set_lord_moved(lord, n) + if (n === 0) + log(`Fed L${lord}.`) } function get_lord_array_position(lord) { @@ -9918,13 +9921,11 @@ states.feed = { }, prov(lord) { push_undo() - log(`Fed L${lord}.`) add_lord_assets(lord, PROV, -1) feed_lord(lord) }, loot(lord) { push_undo() - log(`Fed L${lord}.`) add_lord_assets(lord, LOOT, -1) feed_lord(lord) }, @@ -9968,14 +9969,12 @@ states.feed_lord_shared = { }, prov(lord) { push_undo() - log(`Fed L${game.who}.`) add_lord_assets(lord, PROV, -1) feed_lord(game.who) resume_feed_lord_shared() }, loot(lord) { push_undo() - log(`Fed L${game.who}.`) add_lord_assets(lord, LOOT, -1) feed_lord(game.who) resume_feed_lord_shared() -- cgit v1.2.3