mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-11 16:28:12 -04:00
seems onLoaded from ic2 can call oc before traits are ready. this probably closes #3187
This commit is contained in:
parent
9bb7b69528
commit
a1d1834597
@ -92,7 +92,10 @@ trait RedstoneAware extends RotationAware with IConnectable with IRedstoneEmitte
|
|||||||
|
|
||||||
def getOutput: Array[Int] = ForgeDirection.VALID_DIRECTIONS.map{ side: ForgeDirection => _output(toLocal(side).ordinal) }
|
def getOutput: Array[Int] = ForgeDirection.VALID_DIRECTIONS.map{ side: ForgeDirection => _output(toLocal(side).ordinal) }
|
||||||
|
|
||||||
def getOutput(side: ForgeDirection) = _output(toLocal(side).ordinal())
|
def getOutput(side: ForgeDirection) = Option(_output) match {
|
||||||
|
case Some(output) => output(toLocal(side).ordinal())
|
||||||
|
case _ => 0
|
||||||
|
}
|
||||||
|
|
||||||
def setOutput(side: ForgeDirection, value: Int): Boolean = {
|
def setOutput(side: ForgeDirection, value: Int): Boolean = {
|
||||||
if (value == getOutput(side)) return false
|
if (value == getOutput(side)) return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user