mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
removed some undesired redstone_changed signals
This commit is contained in:
parent
a6915ff2bb
commit
8171c6cc57
@ -43,7 +43,9 @@ trait BundledRedstoneAware extends RedstoneAware with IBundledEmitter with IBund
|
|||||||
|
|
||||||
def rednetInput(side: ForgeDirection, color: Int, value: Int) =
|
def rednetInput(side: ForgeDirection, color: Int, value: Int) =
|
||||||
if (_rednetInput(side.ordinal())(color) != value) {
|
if (_rednetInput(side.ordinal())(color) != value) {
|
||||||
onRedstoneInputChanged(side)
|
if (_rednetInput(side.ordinal())(color) != -1) {
|
||||||
|
onRedstoneInputChanged(side)
|
||||||
|
}
|
||||||
_rednetInput(side.ordinal())(color) = value
|
_rednetInput(side.ordinal())(color) = value
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,11 +67,11 @@ trait BundledRedstoneAware extends RedstoneAware with IBundledEmitter with IBund
|
|||||||
val newBundledInput = computeBundledInput(side)
|
val newBundledInput = computeBundledInput(side)
|
||||||
var changed = false
|
var changed = false
|
||||||
if (newBundledInput != null) for (color <- 0 until 16) {
|
if (newBundledInput != null) for (color <- 0 until 16) {
|
||||||
changed = changed || oldBundledInput(color) != newBundledInput(color)
|
changed = changed || (oldBundledInput(color) >= 0 && oldBundledInput(color) != newBundledInput(color))
|
||||||
oldBundledInput(color) = newBundledInput(color)
|
oldBundledInput(color) = newBundledInput(color)
|
||||||
}
|
}
|
||||||
else for (color <- 0 until 16) {
|
else for (color <- 0 until 16) {
|
||||||
changed = changed || oldBundledInput(color) != 0
|
changed = changed || oldBundledInput(color) > 0
|
||||||
oldBundledInput(color) = 0
|
oldBundledInput(color) = 0
|
||||||
}
|
}
|
||||||
if (changed) {
|
if (changed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user