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