From 0441f10a546f3fb11b413ea540c1a583e0bd7b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Fri, 4 Oct 2013 11:45:17 +0200 Subject: [PATCH] hard drive graphics --- assets/opencomputers/lang/de_DE.lang | 10 ++++++---- assets/opencomputers/lang/en_US.lang | 10 ++++++---- assets/opencomputers/textures/items/hdd2.png | Bin 0 -> 265 bytes assets/opencomputers/textures/items/hdd4.png | Bin 0 -> 265 bytes assets/opencomputers/textures/items/hdd8.png | Bin 0 -> 265 bytes li/cil/oc/Items.scala | 8 ++++++-- li/cil/oc/common/item/Hdd.scala | 13 +++++++++++-- li/cil/oc/server/driver/FileSystem.scala | 2 +- 8 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 assets/opencomputers/textures/items/hdd2.png create mode 100644 assets/opencomputers/textures/items/hdd4.png create mode 100644 assets/opencomputers/textures/items/hdd8.png diff --git a/assets/opencomputers/lang/de_DE.lang b/assets/opencomputers/lang/de_DE.lang index 00f537b52..6619d1bcd 100644 --- a/assets/opencomputers/lang/de_DE.lang +++ b/assets/opencomputers/lang/de_DE.lang @@ -3,8 +3,10 @@ oc.block.Keyboard.name=Tastatur oc.block.Screen.name=Bildschirm oc.container.computer=Computer oc.item.GraphicsCard.name=Grafikkarte -oc.item.HardDiskDrive.name=Festplatte -oc.item.Memory128k.name=RAM (128k) -oc.item.Memory32k.name=RAM (32k) -oc.item.Memory64k.name=RAM (64k) +oc.item.HardDiskDrive2m.name=Festplatte (2MB) +oc.item.HardDiskDrive4m.name=Festplatte (4MB) +oc.item.HardDiskDrive8m.name=Festplatte (8MB) +oc.item.Memory128k.name=RAM (128KB) +oc.item.Memory32k.name=RAM (32KB) +oc.item.Memory64k.name=RAM (64KB) oc.item.RedstoneCard.name=Redstonekarte \ No newline at end of file diff --git a/assets/opencomputers/lang/en_US.lang b/assets/opencomputers/lang/en_US.lang index 79e9c53e5..ddce0133d 100644 --- a/assets/opencomputers/lang/en_US.lang +++ b/assets/opencomputers/lang/en_US.lang @@ -3,8 +3,10 @@ oc.block.Keyboard.name=Keyboard oc.block.Screen.name=Screen oc.container.computer=Computer oc.item.GraphicsCard.name=Graphics Card -oc.item.HardDiskDrive.name=Hard Disk Drive -oc.item.Memory128k.name=RAM (128k) -oc.item.Memory32k.name=RAM (32k) -oc.item.Memory64k.name=RAM (64k) +oc.item.HardDiskDrive2m.name=Hard Disk Drive (2MB) +oc.item.HardDiskDrive4m.name=Hard Disk Drive (4MB) +oc.item.HardDiskDrive8m.name=Hard Disk Drive (8MB) +oc.item.Memory128k.name=RAM (128KB) +oc.item.Memory32k.name=RAM (32KB) +oc.item.Memory64k.name=RAM (64KB) oc.item.RedstoneCard.name=Redstone Card \ No newline at end of file diff --git a/assets/opencomputers/textures/items/hdd2.png b/assets/opencomputers/textures/items/hdd2.png new file mode 100644 index 0000000000000000000000000000000000000000..8922421fb1fdd1f09a192232937f2080418b0b15 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!fo^#Gp`S95do|NsAg`}Qp~H1y`pn;SN4ICkvVmMvSlyStYy zTefGdb~?}SY{O0t>16K7%I8X-eBT)^%f!Rbyq9fh@8TQ&hf&F+uRyH4n@RkJm1p~Qoz+n4AsSPL*@9E+gQgJJ#pIfLwfrIs@R@8U< zd>6NnGZwqF&jjDFXWhpVc2cPB%CRTWU6Tdn3k`#~(oI$T9)3?dqU-vlIQYbkqpD^* zj`&@uxT*V0LLunLi(2l<%I8X-eBT)^%f!RbxQcD*Z@bBtfmShiy85}Sb4q9e0J+(4 Al>h($ literal 0 HcmV?d00001 diff --git a/assets/opencomputers/textures/items/hdd8.png b/assets/opencomputers/textures/items/hdd8.png new file mode 100644 index 0000000000000000000000000000000000000000..44fcc2468c9b0ae49a86fec80c629aa1b52d1232 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!fo^#Gp`S2_Q{|NsAg`t|F?%h!5UwcVGluDSoP_RNKeSFVTd zIT&~F=-eB(feN<2akm6&;VlXB3kGuGfWh{KQX5br-qXb~q~caeKeteW0tf3)t+em< z`7UlDXDoJUp9#KU&$^E#?4(fLm19q$yCw_D7a9g}rOSHEIrRRxLZ0TL`Lmsl>FI4e zs9M%^>~x;tS%)PYuWPv{E1xTU@_lExEE5kyGdJ7P$H&%t1Fd54boFyt=akR{0Ike# AR{#J2 literal 0 HcmV?d00001 diff --git a/li/cil/oc/Items.scala b/li/cil/oc/Items.scala index 07ffe0ae3..9090bbd70 100644 --- a/li/cil/oc/Items.scala +++ b/li/cil/oc/Items.scala @@ -12,7 +12,9 @@ object Items { var ram64k: item.Memory = null var ram128k: item.Memory = null - var hdd: item.Hdd = null + var hdd2: item.Hdd = null + var hdd4: item.Hdd = null + var hdd8: item.Hdd = null def init() { multi = new item.Delegator(Config.itemId) @@ -24,6 +26,8 @@ object Items { ram64k = new item.Memory(multi, 64) ram128k = new item.Memory(multi, 128) - hdd = new item.Hdd(multi, 2 * 1024 * 1024) + hdd2 = new item.Hdd(multi, 2) + hdd4 = new item.Hdd(multi, 4) + hdd8 = new item.Hdd(multi, 8) } } \ No newline at end of file diff --git a/li/cil/oc/common/item/Hdd.scala b/li/cil/oc/common/item/Hdd.scala index b730dd8cb..d2f0aa6d7 100644 --- a/li/cil/oc/common/item/Hdd.scala +++ b/li/cil/oc/common/item/Hdd.scala @@ -1,5 +1,14 @@ package li.cil.oc.common.item -class Hdd(val parent: Delegator, val capacity: Int) extends Delegate { - def unlocalizedName = "HardDiskDrive" +import li.cil.oc.Config +import net.minecraft.client.renderer.texture.IconRegister + +class Hdd(val parent: Delegator, val megaBytes: Int) extends Delegate { + def unlocalizedName = "HardDiskDrive" + megaBytes + "m" + + override def registerIcons(iconRegister: IconRegister) { + super.registerIcons(iconRegister) + + icon = iconRegister.registerIcon(Config.resourceDomain + ":hdd" + megaBytes) + } } \ No newline at end of file diff --git a/li/cil/oc/server/driver/FileSystem.scala b/li/cil/oc/server/driver/FileSystem.scala index 5940bbbcd..f456ccc25 100644 --- a/li/cil/oc/server/driver/FileSystem.scala +++ b/li/cil/oc/server/driver/FileSystem.scala @@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack object FileSystem extends Item { override def api = Option(getClass.getResourceAsStream(Config.driverPath + "fs.lua")) - override def worksWith(item: ItemStack) = WorksWith(Items.hdd)(item) + override def worksWith(item: ItemStack) = WorksWith(Items.hdd2, Items.hdd4, Items.hdd8)(item) override def slot(item: ItemStack) = Slot.HDD