mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
Added creative tier APU (acts as T3 CPU+GPU). Closes #1169.
This commit is contained in:
parent
e14ba3be7a
commit
37e0403927
BIN
assets/items.psd
BIN
assets/items.psd
Binary file not shown.
@ -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
|
||||
|
BIN
src/main/resources/assets/opencomputers/textures/items/APU2.png
Normal file
BIN
src/main/resources/assets/opencomputers/textures/items/APU2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 887 B |
@ -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 }
|
||||
]
|
||||
}
|
||||
}
|
@ -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"
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user