mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
Localizing drone name for tooltips / Waila and making item swing when using analyzer on entities.
This commit is contained in:
parent
44194b6422
commit
2949a13cbe
@ -124,6 +124,9 @@ item.oc.UpgradeTankController.name=Tank Controller Upgrade
|
||||
item.oc.UpgradeTractorBeam.name=Tractor Beam Upgrade
|
||||
item.oc.WirelessNetworkCard.name=Wireless Network Card
|
||||
|
||||
# Entities
|
||||
entity.oc.Drone.name=Drone
|
||||
|
||||
# GUI
|
||||
oc:gui.Analyzer.Address=§6Address§f: %s
|
||||
oc:gui.Analyzer.AddressCopied=Address copied to clipboard.
|
||||
|
@ -434,6 +434,8 @@ class Drone(val world: World) extends Entity(world) with MachineHost with intern
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
override def getCommandSenderName = Localization.localizeImmediately("entity.oc.Drone.name")
|
||||
|
||||
override def handleWaterMovement() = {
|
||||
inWater = worldObj.handleMaterialAcceleration(boundingBox, Material.water, this)
|
||||
inWater
|
||||
|
@ -22,10 +22,12 @@ object Analyzer {
|
||||
val player = e.entityPlayer
|
||||
val held = player.getHeldItem
|
||||
if (api.Items.get(held) == analyzer) {
|
||||
if (analyze(e.target, player, 0, 0, 0, 0))
|
||||
if (analyze(e.target, player, 0, 0, 0, 0)) {
|
||||
player.swingItem()
|
||||
e.setCanceled(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def analyze(thing: AnyRef, player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float): Boolean = {
|
||||
val world = player.worldObj
|
||||
|
Loading…
x
Reference in New Issue
Block a user