From 23d21460666ce4821476ee8bf2956f18491d4c94 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 28 Oct 2026 11:38:23 +0300 Subject: [PATCH] Villagers: report a failed random_sequences write The merchant's random sequences (the salts that keep its offers stable) were written with the result dropped, so a failed write rerolled every trade on the next load with nothing in the log. Log it like the other save paths. Co-Authored-By: Hermes Agent (Nous Research) --- crates/horizon-client/src/game/trading.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/game/trading.rs b/crates/horizon-client/src/game/trading.rs index 0f8723737..159e0e2e7 100644 --- a/crates/horizon-client/src/game/trading.rs +++ b/crates/horizon-client/src/game/trading.rs @@ -137,7 +137,9 @@ impl Game<'_> { horizon_world::nbt::Tag::Int(horizon_world::DATA_VERSION), ), ]); - let _ = horizon_client::save::write_dat(&self.random_sequences_path(), tag); + if let Err(e) = horizon_client::save::write_dat(&self.random_sequences_path(), tag) { + log::warn!("the villager random sequences were not written: {e}"); + } } /// `AbstractVillager.addOffersFromTradeSet` with the world's random /// sequence of the set, at the merchant's position.