fix tiles being unable to get powered from multiple directions at once
This commit is contained in:
parent
e88f945e8f
commit
dd63851606
2 changed files with 5 additions and 4 deletions
|
@ -6,11 +6,11 @@ logic mostly like https://git.crispypin.cc/CrispyPin/marble
|
||||||
## todo
|
## todo
|
||||||
(more levels)
|
(more levels)
|
||||||
story/lore
|
story/lore
|
||||||
|
copy/cut/paste selections
|
||||||
timestamps in solutions and blueprints
|
timestamps in solutions and blueprints
|
||||||
multiple input/output sets
|
multiple input/output sets
|
||||||
undo/redo
|
undo/redo
|
||||||
make math tiles read digits
|
make math tiles read digits
|
||||||
fix bag tiles only counting power in one direction at once
|
|
||||||
tooltips
|
tooltips
|
||||||
lock tile types for early levels to make it less overwhelming
|
lock tile types for early levels to make it less overwhelming
|
||||||
make a gui alternative to pressing R to rotate between tile variants
|
make a gui alternative to pressing R to rotate between tile variants
|
||||||
|
|
|
@ -302,12 +302,13 @@ impl Machine {
|
||||||
if let PTile::Trigger = tile {
|
if let PTile::Trigger = tile {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if *state {
|
let was_powered = *state;
|
||||||
return;
|
|
||||||
}
|
|
||||||
*state = true;
|
*state = true;
|
||||||
match tile {
|
match tile {
|
||||||
PTile::Wire(wiretype) => {
|
PTile::Wire(wiretype) => {
|
||||||
|
if was_powered {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let dirs = wiretype.directions();
|
let dirs = wiretype.directions();
|
||||||
for d in dirs {
|
for d in dirs {
|
||||||
self.propagate_power(*d, d.step(pos));
|
self.propagate_power(*d, d.step(pos));
|
||||||
|
|
Loading…
Reference in a new issue