aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-02-28 23:39:33 +0100
committermetamuffin <metamuffin@disroot.org>2026-02-28 23:39:48 +0100
commit7e4c49d2dba42686c9476834d36c5b4a024e4b6a (patch)
tree265677f4f3b862f03c90d2e028eb4caae6fceb8d
parent73de2847f2651c361afb6dedb034be2b9242b62d (diff)
downloadhurrycurry-7e4c49d2dba42686c9476834d36c5b4a024e4b6a.tar
hurrycurry-7e4c49d2dba42686c9476834d36c5b4a024e4b6a.tar.bz2
hurrycurry-7e4c49d2dba42686c9476834d36c5b4a024e4b6a.tar.zst
improve interact log
-rw-r--r--server/game-core/src/interaction.rs12
1 files 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() {