mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
parent
3a2a4d0a18
commit
e5ccda83f0
@ -2,7 +2,7 @@ package li.cil.oc.common.event
|
|||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent
|
||||||
import li.cil.oc.api.event.RobotPlaceInAirEvent
|
import li.cil.oc.api.event.RobotPlaceInAirEvent
|
||||||
import li.cil.oc.api.network.Component
|
import li.cil.oc.api.network.Node
|
||||||
import li.cil.oc.server.component.UpgradeAngel
|
import li.cil.oc.server.component.UpgradeAngel
|
||||||
|
|
||||||
import scala.collection.convert.WrapAsScala._
|
import scala.collection.convert.WrapAsScala._
|
||||||
@ -12,8 +12,8 @@ object AngelUpgradeHandler {
|
|||||||
def onPlaceInAir(e: RobotPlaceInAirEvent) {
|
def onPlaceInAir(e: RobotPlaceInAirEvent) {
|
||||||
val machineNode = e.agent.machine.node
|
val machineNode = e.agent.machine.node
|
||||||
e.setAllowed(machineNode.reachableNodes.exists {
|
e.setAllowed(machineNode.reachableNodes.exists {
|
||||||
case component: Component if component.canBeSeenFrom(machineNode) =>
|
case node: Node if node.canBeReachedFrom(machineNode) =>
|
||||||
component.host.isInstanceOf[UpgradeAngel]
|
node.host.isInstanceOf[UpgradeAngel]
|
||||||
case _ => false
|
case _ => false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ class Robot extends traits.Computer with traits.PowerInformation with IFluidHand
|
|||||||
else {
|
else {
|
||||||
world.setBlockToAir(newPosition)
|
world.setBlockToAir(newPosition)
|
||||||
}
|
}
|
||||||
created && BlockPosition(this) == newPosition
|
created && this.position == newPosition
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
blockRobotProxy.moving.set(None)
|
blockRobotProxy.moving.set(None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user