From 7e4c49d2dba42686c9476834d36c5b4a024e4b6a Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 28 Feb 2026 23:39:33 +0100 Subject: improve interact log --- server/game-core/src/interaction.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/game-core/src/interaction.rs b/server/game-core/src/interaction.rs index 88eff676..e80fd8d6 100644 --- a/server/game-core/src/interaction.rs +++ b/server/game-core/src/interaction.rs @@ -206,14 +206,14 @@ impl Game { let on_tile = this_slot.as_ref().map(|i| i.kind); let in_hand = other_slot.as_ref().map(|i| i.kind); let ok = inputs[0] == on_tile && inputs[1] == in_hand; - let ok_rev = inputs[1] == on_tile && inputs[0] == in_hand; - if ok || ok_rev { - info!("instant {ri} reversed={ok_rev}"); - let ok_rev = ok_rev as usize; + let ok_flip = inputs[1] == on_tile && inputs[0] == in_hand; + if ok || ok_flip { + info!("instant {ri} flip={ok_flip}"); + let flip = ok_flip as usize; let this_had_item = this_slot.is_some(); let other_had_item = other_slot.is_some(); - *other_slot = outputs[1 - ok_rev].map(|kind| Item { kind, active: None }); - *this_slot = outputs[ok_rev].map(|kind| Item { kind, active: None }); + *other_slot = outputs[1 - flip].map(|kind| Item { kind, active: None }); + *this_slot = outputs[flip].map(|kind| Item { kind, active: None }); self.item_locations_index.remove(&this_loc); self.item_locations_index.remove(&other_loc); if this_slot.is_some() { -- cgit v1.3