aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {