diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-10-14 14:49:22 +0200 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-10-14 14:49:25 +0200 |
| commit | 82d6d7589345ad3ac0885b4a428f63d372d8946e (patch) | |
| tree | 9a56704d9004cf0943e04eb74ef85e99bf61a186 | |
| parent | d057e0a8566e16a0b1f49ae517bcfbd3dc446a04 (diff) | |
| download | hurrycurry-82d6d7589345ad3ac0885b4a428f63d372d8946e.tar hurrycurry-82d6d7589345ad3ac0885b4a428f63d372d8946e.tar.bz2 hurrycurry-82d6d7589345ad3ac0885b4a428f63d372d8946e.tar.zst | |
Fix conveyor put items on non-interactable tiles
| -rw-r--r-- | data/maps/auto_sushi.yaml | 12 | ||||
| -rw-r--r-- | server/src/interaction.rs | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/data/maps/auto_sushi.yaml b/data/maps/auto_sushi.yaml index b42c257e..0e65f3b8 100644 --- a/data/maps/auto_sushi.yaml +++ b/data/maps/auto_sushi.yaml @@ -41,12 +41,12 @@ tiles: "f": counter -i=foodprocessor "p": counter -i=plate "P": counter -i=pot - ">": conveyor - "<": conveyor - "^": conveyor - "v": conveyor - "‹": counter-window - "›": counter-window + ">": conveyor --conveyor=1,0 + "<": conveyor --conveyor=-1,0 + "^": conveyor --conveyor=0,-1 + "v": conveyor --conveyor=0,1 + "‹": counter-window --conveyor=-1,0 + "›": counter-window --conveyor=1,0 "0": wall-window "s": sink -x "o": oven diff --git a/server/src/interaction.rs b/server/src/interaction.rs index 38c1d7fb..7d7376cb 100644 --- a/server/src/interaction.rs +++ b/server/src/interaction.rs @@ -35,7 +35,6 @@ pub fn interact( automated: bool, packet_out: &mut VecDeque<PacketC>, ) { - let _ = automated; //? what was this used for?? if other.is_none() && let Some(item) = this && let Some(active) = &mut item.active @@ -167,13 +166,14 @@ pub fn interact( } } - let can_place = tile.is_none_or(|tile| { - other.as_ref().is_some_and(|other| { - data.tile_placeable_items - .get(&tile) - .is_none_or(|pl| pl.contains(&other.kind)) - }) - }); + let can_place = automated + || tile.is_none_or(|tile| { + other.as_ref().is_some_and(|other| { + data.tile_placeable_items + .get(&tile) + .is_none_or(|pl| pl.contains(&other.kind)) + }) + }); if can_place && this.is_none() |