path tuning (in the wrong direction perhaps)
This commit is contained in:
parent
c4e745ba2e
commit
5b858f3d3b
3 changed files with 15 additions and 4 deletions
|
@ -33,7 +33,7 @@ impl Depots {
|
|||
// dump inventory
|
||||
for i in 1..=16 {
|
||||
turtle.execute(Select(i)).await;
|
||||
turtle.execute(DropFront(64)).await;
|
||||
turtle.execute(DropDown(64)).await;
|
||||
}
|
||||
|
||||
// refuel
|
||||
|
@ -53,6 +53,12 @@ impl Depots {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// lava bucket fix
|
||||
for i in 1..=16 {
|
||||
turtle.execute(Select(i)).await;
|
||||
turtle.execute(DropDown(64)).await;
|
||||
}
|
||||
|
||||
turtle.execute(Backward(1)).await;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ pub const TRANSPARENT: [&str; 3] = [
|
|||
];
|
||||
|
||||
/// Blocks that are fine to tunnel through
|
||||
const GARBAGE: [&str; 8] = [
|
||||
const GARBAGE: [&str; 11] = [
|
||||
"minecraft:stone",
|
||||
"minecraft:dirt",
|
||||
"minecraft:andesite",
|
||||
|
@ -88,10 +88,13 @@ const GARBAGE: [&str; 8] = [
|
|||
"minecraft:sandstone",
|
||||
"minecraft:deepslate",
|
||||
"twigs:rhyolite",
|
||||
"minecraft:spruce_leaves",
|
||||
"minecraft:oak_leaves",
|
||||
"traverse:fir_leaves",
|
||||
];
|
||||
|
||||
/// time taken to go through uncharted territory (in turtle. calls)
|
||||
const UNKNOWN: Option<u32> = Some(2);
|
||||
const UNKNOWN: Option<u32> = Some(1);
|
||||
|
||||
// time to go somewhere
|
||||
pub fn difficulty(name: &str) -> Option<u32> {
|
||||
|
@ -101,5 +104,5 @@ pub fn difficulty(name: &str) -> Option<u32> {
|
|||
if GARBAGE.contains(&name) {
|
||||
return Some(2);
|
||||
};
|
||||
None
|
||||
Some(140) // providing a value here means that tunneling through builds is possible (bad)
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use log::trace;
|
||||
use tokio;
|
||||
use blocks::Vec3;
|
||||
use crate::fell::TreeFarm;
|
||||
|
@ -197,6 +198,7 @@ pub(crate) async fn command(
|
|||
State(state): State<SharedControl>,
|
||||
Json(req): Json<turtle::TurtleUpdate>,
|
||||
) -> Json<turtle::TurtleCommand> {
|
||||
trace!("reply from turtle {id}: {req:?}");
|
||||
let mut state = &mut state.read().await;
|
||||
|
||||
if id as usize > state.turtles.len() {
|
||||
|
|
Loading…
Reference in a new issue