diff --git a/assets/items.psd b/assets/items.psd index 9c65a2b86..78087d3e9 100644 Binary files a/assets/items.psd and b/assets/items.psd differ diff --git a/src/main/resources/assets/opencomputers/lang/en_US.lang b/src/main/resources/assets/opencomputers/lang/en_US.lang index 527629c23..c31a753a4 100644 --- a/src/main/resources/assets/opencomputers/lang/en_US.lang +++ b/src/main/resources/assets/opencomputers/lang/en_US.lang @@ -45,6 +45,7 @@ item.oc.ALU.name=Arithmetic Logic Unit (ALU) item.oc.Analyzer.name=Analyzer item.oc.APU0.name=Accelerated Processing Unit (APU) (Tier 1) item.oc.APU1.name=Accelerated Processing Unit (APU) (Tier 2) +item.oc.APU2.name=Accelerated Processing Unit (APU) (Creative) item.oc.ArrowKeys.name=Arrow Keys item.oc.ButtonGroup.name=Button Group item.oc.CardBase.name=Card Base diff --git a/src/main/resources/assets/opencomputers/textures/items/APU2.png b/src/main/resources/assets/opencomputers/textures/items/APU2.png new file mode 100644 index 000000000..4a09b42d6 Binary files /dev/null and b/src/main/resources/assets/opencomputers/textures/items/APU2.png differ diff --git a/src/main/resources/assets/opencomputers/textures/items/APU2.png.mcmeta b/src/main/resources/assets/opencomputers/textures/items/APU2.png.mcmeta new file mode 100644 index 000000000..622c31336 --- /dev/null +++ b/src/main/resources/assets/opencomputers/textures/items/APU2.png.mcmeta @@ -0,0 +1,18 @@ +{ + "animation": { + "frametime": 1, + "frames": [ + { "index": 0, "time": 3 }, + { "index": 1, "time": 3 }, + { "index": 2, "time": 3 }, + { "index": 3, "time": 3 }, + { "index": 4, "time": 3 }, + { "index": 5, "time": 3 }, + { "index": 4, "time": 3 }, + { "index": 3, "time": 3 }, + { "index": 2, "time": 3 }, + { "index": 1, "time": 3 }, + { "index": 0, "time": 3 } + ] + } +} \ No newline at end of file diff --git a/src/main/scala/li/cil/oc/Constants.scala b/src/main/scala/li/cil/oc/Constants.scala index 413ceff3d..be261a68d 100644 --- a/src/main/scala/li/cil/oc/Constants.scala +++ b/src/main/scala/li/cil/oc/Constants.scala @@ -49,6 +49,7 @@ object Constants { final val Alu = "alu" final val Analyzer = "analyzer" final val AngelUpgrade = "angelUpgrade" + final val APUCreative = "apuCreative" final val APUTier1 = "apu1" final val APUTier2 = "apu2" final val ArrowKeys = "arrowKeys" diff --git a/src/main/scala/li/cil/oc/common/init/Items.scala b/src/main/scala/li/cil/oc/common/init/Items.scala index 0acc17155..3fd66423c 100644 --- a/src/main/scala/li/cil/oc/common/init/Items.scala +++ b/src/main/scala/li/cil/oc/common/init/Items.scala @@ -535,5 +535,8 @@ object Items extends ItemAPI { // 1.5.11 Recipes.addItem(new item.HoverBoots(), Constants.ItemName.HoverBoots, "oc:hoverBoots") + + // 1.5.12 + registerItem(new item.APU(multi, Tier.Three), Constants.ItemName.APUCreative) } } diff --git a/src/main/scala/li/cil/oc/common/item/APU.scala b/src/main/scala/li/cil/oc/common/item/APU.scala index a03c2457e..b111a240c 100644 --- a/src/main/scala/li/cil/oc/common/item/APU.scala +++ b/src/main/scala/li/cil/oc/common/item/APU.scala @@ -1,11 +1,13 @@ package li.cil.oc.common.item +import li.cil.oc.common.Tier + import scala.language.existentials class APU(val parent: Delegator, val tier: Int) extends traits.Delegate with traits.ItemTier with traits.CPULike with traits.GPULike { override val unlocalizedName = super[Delegate].unlocalizedName + tier - override def cpuTier = tier + 1 + override def cpuTier = math.min(Tier.Three, tier + 1) override def gpuTier = tier diff --git a/src/main/scala/li/cil/oc/common/item/Server.scala b/src/main/scala/li/cil/oc/common/item/Server.scala index b31b0c19f..a2272e7b2 100644 --- a/src/main/scala/li/cil/oc/common/item/Server.scala +++ b/src/main/scala/li/cil/oc/common/item/Server.scala @@ -43,7 +43,7 @@ class Server(val parent: Delegator, val tier: Int) extends traits.Delegate { val itemName = item.getDisplayName items += itemName -> (if (items.contains(itemName)) items(itemName) + 1 else 1) } - if (items.size > 0) { + if (items.nonEmpty) { tooltip.addAll(Tooltip.get("Server.Components")) for (itemName <- items.keys.toArray.sorted) { tooltip.add("- " + items(itemName) + "x " + itemName) diff --git a/src/main/scala/li/cil/oc/integration/opencomputers/DriverAPU.scala b/src/main/scala/li/cil/oc/integration/opencomputers/DriverAPU.scala index 97fa16316..a41112f13 100644 --- a/src/main/scala/li/cil/oc/integration/opencomputers/DriverAPU.scala +++ b/src/main/scala/li/cil/oc/integration/opencomputers/DriverAPU.scala @@ -14,12 +14,14 @@ import net.minecraft.item.ItemStack object DriverAPU extends DriverCPU with HostAware with EnvironmentAware { override def worksWith(stack: ItemStack) = isOneOf(stack, api.Items.get(Constants.ItemName.APUTier1), - api.Items.get(Constants.ItemName.APUTier2)) + api.Items.get(Constants.ItemName.APUTier2), + api.Items.get(Constants.ItemName.APUCreative)) override def createEnvironment(stack: ItemStack, host: EnvironmentHost) = gpuTier(stack) match { case Tier.One => new component.GraphicsCard.Tier1() case Tier.Two => new component.GraphicsCard.Tier2() + case Tier.Three => new component.GraphicsCard.Tier3() case _ => null }