Nameable CPUs.

This commit is contained in:
AlgorithmX2
2014-07-15 22:26:12 -05:00
parent e64bf91789
commit e49864e295
9 changed files with 121 additions and 9 deletions
@@ -83,6 +83,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
public ICraftingLink myLastLink;
MachineSource machineSrc = null;
public String myName = "";
int accelerator = 0;
public WorldCoord min;
@@ -244,7 +245,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
te.isCoreBlock = false;
te.markDirty();
tiles.add( te );
tiles.push( te );
if ( te.isStorage() )
{
@@ -995,6 +996,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
}
updateCPU();
updateName();
}
@Override
@@ -1003,4 +1005,27 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
return machineSrc;
}
@Override
public String getName()
{
return myName;
}
public void updateName()
{
myName = "";
for (TileCraftingTile te : tiles)
{
if ( te.hasCustomName() )
{
if ( myName.length() > 0 )
myName += " " + te.getCustomName();
else
myName = te.getCustomName();
}
}
}
}