Added localisation to microblock classes

This commit is contained in:
Chicken Bones committed 2013-09-10 19:07:00 +10:00
1 parent 5747fd9bdf
commit f17fa03f98
9 files changed
+35 -29

No files matched your search

+29 -1
View File
@@ -1,4 +1,32 @@
item.microblock:sawStone.name=Stone Saw
item.microblock:sawIron.name=Iron Saw
item.microblock:sawDiamond.name=Diamond Saw
item.microblock:stoneRod.name=Stone Rod
item.microblock:stoneRod.name=Stone Rod
mcr_face.1.name=%s Cover
mcr_face.1.subset=Cover
mcr_face.2.name=%s Panel
mcr_face.2.subset=Panel
mcr_face.4.name=%s Slab
mcr_face.4.subset=Slab
mcr_hllw.1.name=Hollow %s Cover
mcr_hllw.1.subset=Hollow Cover
mcr_hllw.2.name=Hollow %s Panel
mcr_hllw.2.subset=Hollow Panel
mcr_hllw.4.name=Hollow %s Slab
mcr_hllw.4.subset=Hollow Slab
mcr_edge.1.name=%s Strip
mcr_edge.1.subset=Strip
mcr_edge.2.name=%s Post
mcr_edge.2.subset=Post
mcr_edge.4.name=%s Pillar
mcr_edge.4.subset=Pillar
mcr_cnr.1.name=%s Nook
mcr_cnr.1.subset=Nook
mcr_cnr.2.name=%s Corner
mcr_cnr.2.subset=Corner
mcr_cnr.4.name=%s Notch
mcr_cnr.4.subset=Notch
+1 -1
View File
@@ -1,4 +1,4 @@
item.microblock:sawStone.name=Sierra de Piedra
item.microblock:sawIron.name=Sierra de Hierro
item.microblock:sawDiamond.name=Sierra de Diamante
item.microblock:stoneRod.name=Palo de Piedra
item.microblock:stoneRod.name=Palo de Piedra
@@ -49,13 +49,6 @@ object CornerMicroClass extends MicroblockClass
new CornerMicroblock(size, slot, material)
def placementProperties = CornerPlacement
def getDisplayName(size:Int):String = size match
{
case 1 => "Nook"
case 2 => "Corner"
case 4 => "Notch"
}
}
class CornerMicroblockClient(shape$:Byte = 0, material$:Int = 0) extends CornerMicroblock(shape$, material$) with CommonMicroblockClient
@@ -102,13 +102,6 @@ object EdgeMicroClass extends MicroblockClass
new EdgeMicroblock(size, slot, material)
def placementProperties = EdgePlacement
def getDisplayName(size:Int):String = size match
{
case 1 => "Strip"
case 2 => "Post"
case 4 => "Pillar"
}
}
class EdgeMicroblockClient(shape$:Byte = 0, material$:Int = 0) extends EdgeMicroblock(shape$, material$) with CommonMicroblockClient
@@ -70,13 +70,6 @@ object FaceMicroClass extends MicroblockClass
new FaceMicroblock(size, slot, material)
def placementProperties = FacePlacement
def getDisplayName(size:Int):String = size match
{
case 1 => "Cover"
case 2 => "Panel"
case 4 => "Slab"
}
}
class FaceMicroblockClient(shape$:Byte = 0, material$:Int = 0) extends FaceMicroblock(shape$, material$) with CommonMicroblockClient
@@ -74,8 +74,6 @@ object HollowMicroClass extends MicroblockClass
new HollowMicroblock(size, slot, material)
def placementProperties = HollowPlacement
def getDisplayName(size:Int) = "Hollow "+FaceMicroClass.getDisplayName(size)
}
class HollowMicroblockClient(shape$:Byte = 0, material$:Int = 0) extends HollowMicroblock(shape$, material$) with CommonMicroblockClient
+2 -1
View File
@@ -23,6 +23,7 @@ import codechicken.lib.raytracer.RayTracer
import net.minecraft.util.EnumMovingObjectType
import codechicken.lib.vec.Vector3
import codechicken.lib.render.TextureUtils
import codechicken.lib.lang.LangUtil
class ItemMicroPart(id:Int) extends Item(id)
{
@@ -36,7 +37,7 @@ class ItemMicroPart(id:Int) extends Item(id)
if(material == null || mcrClass == null)
return "Unnamed"
return material.getLocalizedName+" "+mcrClass.getDisplayName(size)
return LangUtil.translateG(mcrClass.getName+"."+size+".name", material.getLocalizedName)
}
override def getSubItems(id:Int, tab:CreativeTabs, list$:List[_])
-2
View File
@@ -16,8 +16,6 @@ trait MicroblockClass
{
var classID:Int = _
def getDisplayName(size:Int):String
def itemSlot() = 3
@SideOnly(Side.CLIENT)
@@ -1,5 +1,6 @@
package codechicken.multipart.nei;
import codechicken.lib.lang.LangUtil;
import codechicken.microblock.MicroblockClass;
import codechicken.microblock.MicroblockClassRegistry;
import codechicken.microblock.handler.MicroblockProxy;
@@ -29,7 +30,8 @@ public class NEI_MicroblockConfig implements IConfigureNEI
private void addSubset(MicroblockClass mcrClass, int microID, int i)
{
API.addSetRange("Microblocks."+mcrClass.getDisplayName(i&0xFF), new MultiItemRange().add(microID, i, i));
API.addSetRange("Microblocks."+LangUtil.translateG(mcrClass.getName()+"."+(i&0xFF)+".subset"),
new MultiItemRange().add(microID, i, i));
}
@Override