Skip to content

Commit 07ad53c

Browse files
committed
Use all redstone sides to enable charger
This is a workaround for <MightyPirates/OpenComputers#3475>.
1 parent fdc7f0e commit 07ad53c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

hole-filler/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use core::pin::Pin;
3434
use core::time::Duration;
3535
use minicbor::decode::Decoder;
3636
use oc_wasm_futures::sleep;
37-
use oc_wasm_opencomputers::common::{Dimension, Point, RelativeSide, Rgb};
37+
use oc_wasm_opencomputers::common::{Dimension, Point, Rgb};
3838
use oc_wasm_opencomputers::error::Error;
3939
use oc_wasm_opencomputers::{gpu, keyboard, redstone, robot, screen};
4040
use oc_wasm_safe::{component, computer};
@@ -574,11 +574,15 @@ impl Application {
574574
// If we are low on energy, recharge.
575575
if energy_percent() < 95 {
576576
let mut rs_locked = self.redstone.lock(&mut self.invoker, &mut self.buffer);
577-
rs_locked.set_side_output(RelativeSide::Front, 15).await?;
577+
rs_locked
578+
.set_output(&[Some(15), Some(15), Some(15), Some(15), Some(15), Some(15)])
579+
.await?;
578580
while energy_percent() < 95 {
579581
sleep::for_uptime(Duration::from_secs(10)).await;
580582
}
581-
rs_locked.set_side_output(RelativeSide::Front, 0).await?;
583+
rs_locked
584+
.set_output(&[Some(0), Some(0), Some(0), Some(0), Some(0), Some(0)])
585+
.await?;
582586
}
583587

584588
// Calculate how many layers we can fill on a single trip.

0 commit comments

Comments
 (0)