mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 01:10:19 -04:00
Moved ItemTier to traits package.
This commit is contained in:
parent
3540809a0d
commit
0ab6636b8a
@ -130,5 +130,6 @@ object Textures {
|
||||
|
||||
tm.bindTexture(upgradeCrafting)
|
||||
tm.bindTexture(upgradeGenerator)
|
||||
tm.bindTexture(upgradeInventory)
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package li.cil.oc.common.item
|
||||
|
||||
import scala.language.existentials
|
||||
|
||||
class APU(val parent: Delegator, val tier: Int) extends Delegate with ItemTier with traits.CPULike with traits.GPULike {
|
||||
class APU(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier with traits.CPULike with traits.GPULike {
|
||||
override val unlocalizedName = super[Delegate].unlocalizedName + tier
|
||||
|
||||
override def cpuTier = tier + 1
|
||||
|
@ -2,6 +2,6 @@ package li.cil.oc.common.item
|
||||
|
||||
import li.cil.oc.integration.Mods
|
||||
|
||||
class AbstractBusCard(val parent: Delegator) extends Delegate with ItemTier {
|
||||
class AbstractBusCard(val parent: Delegator) extends Delegate with traits.ItemTier {
|
||||
showInItemList = Mods.StargateTech2.isAvailable
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package li.cil.oc.common.item
|
||||
|
||||
import scala.language.existentials
|
||||
|
||||
class CPU(val parent: Delegator, val tier: Int) extends Delegate with ItemTier with traits.CPULike {
|
||||
class CPU(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier with traits.CPULike {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override def cpuTier = tier
|
||||
|
@ -2,7 +2,7 @@ package li.cil.oc.common.item
|
||||
|
||||
import li.cil.oc.Settings
|
||||
|
||||
class ComponentBus(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class ComponentBus(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -2,7 +2,7 @@ package li.cil.oc.common.item
|
||||
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
class DroneCase(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class DroneCase(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tierFromDriver(stack: ItemStack) = tier
|
||||
|
@ -1,6 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class GraphicsCard(val parent: Delegator, val tier: Int) extends Delegate with ItemTier with traits.GPULike {
|
||||
class GraphicsCard(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier with traits.GPULike {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override def gpuTier = tier
|
||||
|
@ -6,7 +6,7 @@ import li.cil.oc.Settings
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
class HardDiskDrive(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class HardDiskDrive(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
val kiloBytes = Settings.get.hddSizes(tier)
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class InternetCard(val parent: Delegator) extends Delegate with ItemTier
|
||||
class InternetCard(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -7,7 +7,7 @@ import li.cil.oc.util.Tooltip
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
class LinkedCard(val parent: Delegator) extends Delegate with ItemTier {
|
||||
class LinkedCard(val parent: Delegator) extends Delegate with traits.ItemTier {
|
||||
override def tooltipLines(stack: ItemStack, player: EntityPlayer, tooltip: util.List[String], advanced: Boolean) {
|
||||
if (stack.hasTagCompound && stack.getTagCompound.hasKey(Settings.namespace + "data")) {
|
||||
val data = stack.getTagCompound.getCompoundTag(Settings.namespace + "data")
|
||||
|
@ -1,6 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class Memory(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class Memory(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -2,7 +2,7 @@ package li.cil.oc.common.item
|
||||
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
class MicrocontrollerCase(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class MicrocontrollerCase(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tierFromDriver(stack: ItemStack) = tier
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class NetworkCard(val parent: Delegator) extends Delegate with ItemTier
|
||||
class NetworkCard(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -7,7 +7,7 @@ import li.cil.oc.integration.Mods
|
||||
import li.cil.oc.util.Tooltip
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
class RedstoneCard(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class RedstoneCard(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -2,7 +2,7 @@ package li.cil.oc.common.item
|
||||
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
class TabletCase(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class TabletCase(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tierFromDriver(stack: ItemStack) = tier
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeAngel(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeAngel(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -5,7 +5,7 @@ import li.cil.oc.api.driver.item.Chargeable
|
||||
import li.cil.oc.common.item.data.NodeData
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
class UpgradeBattery(val parent: Delegator, val tier: Int) extends Delegate with ItemTier with Chargeable {
|
||||
class UpgradeBattery(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier with Chargeable {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeChunkloader(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeChunkloader(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -1,6 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeContainerCard(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class UpgradeContainerCard(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeContainerUpgrade(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class UpgradeContainerUpgrade(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeCrafting(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeCrafting(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -1,14 +1,14 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
import li.cil.oc.common.GuiType
|
||||
import li.cil.oc.util.Rarity
|
||||
import li.cil.oc.OpenComputers
|
||||
import li.cil.oc.Settings
|
||||
import li.cil.oc.common.GuiType
|
||||
import li.cil.oc.util.Rarity
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.world.World
|
||||
|
||||
class UpgradeDatabase(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class UpgradeDatabase(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeExperience(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeExperience(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -2,6 +2,6 @@ package li.cil.oc.common.item
|
||||
|
||||
import li.cil.oc.Settings
|
||||
|
||||
class UpgradeGenerator(val parent: Delegator) extends Delegate with ItemTier {
|
||||
class UpgradeGenerator(val parent: Delegator) extends Delegate with traits.ItemTier {
|
||||
override protected def tooltipData = Seq((Settings.get.generatorEfficiency * 100).toInt)
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package li.cil.oc.common.item
|
||||
|
||||
import li.cil.oc.Settings
|
||||
|
||||
class UpgradeHover(val parent: Delegator, val tier: Int) extends Delegate with ItemTier {
|
||||
class UpgradeHover(val parent: Delegator, val tier: Int) extends Delegate with traits.ItemTier {
|
||||
override val unlocalizedName = super.unlocalizedName + tier
|
||||
|
||||
override protected def tooltipName = Option(super.unlocalizedName)
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeInventory(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeInventory(val parent: Delegator) extends Delegate with traits.ItemTier
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeInventoryController(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeInventoryController(val parent: Delegator) extends Delegate with traits.ItemTier
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeLeash(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeLeash(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeNavigation(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeNavigation(val parent: Delegator) extends Delegate with traits.ItemTier
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradePiston(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradePiston(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeSign(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeSign(val parent: Delegator) extends Delegate with traits.ItemTier
|
||||
|
@ -2,6 +2,6 @@ package li.cil.oc.common.item
|
||||
|
||||
import li.cil.oc.Settings
|
||||
|
||||
class UpgradeSolarGenerator(val parent: Delegator) extends Delegate with ItemTier {
|
||||
class UpgradeSolarGenerator(val parent: Delegator) extends Delegate with traits.ItemTier {
|
||||
override protected def tooltipData = Seq((Settings.get.solarGeneratorEfficiency * 100).toInt)
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraftforge.fluids.FluidStack
|
||||
|
||||
class UpgradeTank(val parent: Delegator) extends Delegate with ItemTier {
|
||||
class UpgradeTank(val parent: Delegator) extends Delegate with traits.ItemTier {
|
||||
@SideOnly(Side.CLIENT) override
|
||||
def tooltipLines(stack: ItemStack, player: EntityPlayer, tooltip: util.List[String], advanced: Boolean) = {
|
||||
if (stack.hasTagCompound) {
|
||||
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeTankController(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeTankController(val parent: Delegator) extends Delegate with traits.ItemTier
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class UpgradeTractorBeam(val parent: Delegator) extends Delegate with ItemTier
|
||||
class UpgradeTractorBeam(val parent: Delegator) extends Delegate with traits.ItemTier
|
@ -1,3 +1,3 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
class WirelessNetworkCard(val parent: Delegator) extends Delegate with ItemTier
|
||||
class WirelessNetworkCard(val parent: Delegator) extends Delegate with traits.ItemTier
|
@ -2,6 +2,6 @@ package li.cil.oc.common.item
|
||||
|
||||
import li.cil.oc.integration.Mods
|
||||
|
||||
class WorldSensorCard(val parent: Delegator) extends Delegate with ItemTier {
|
||||
class WorldSensorCard(val parent: Delegator) extends Delegate with traits.ItemTier {
|
||||
showInItemList = Mods.Galacticraft.isAvailable
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
package li.cil.oc.common.item
|
||||
package li.cil.oc.common.item.traits
|
||||
|
||||
import java.util
|
||||
|
||||
import cpw.mods.fml.relauncher.Side
|
||||
import cpw.mods.fml.relauncher.SideOnly
|
||||
import li.cil.oc.Localization
|
||||
import li.cil.oc.common.item.Delegate
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
|
Loading…
x
Reference in New Issue
Block a user