Added thermal pump / Better conveyor autotile

This commit is contained in:
Anuken
2018-08-05 10:14:18 -04:00
parent d86dd4f80b
commit 07c19ce085
12 changed files with 30 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 533 B

View File

@@ -525,6 +525,7 @@ block.nuclear-reactor.name=Nuclear Reactor
block.command-center.name=Command Center block.command-center.name=Command Center
block.mass-driver.name=Mass Driver block.mass-driver.name=Mass Driver
block.blast-drill.name=Blast Drill block.blast-drill.name=Blast Drill
block.thermal-pump.name=Thermal Pump
unit.drone.name=Drone unit.drone.name=Drone
unit.drone.description=The starter drone unit. Spawns in the core by default. Automatically mines ores, collects items and repairs blocks. unit.drone.description=The starter drone unit. Spawns in the core by default. Automatically mines ores, collects items and repairs blocks.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

@@ -154,6 +154,7 @@ public class Recipes implements ContentList{
new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 20)) new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 20))
.setDependencies(CraftingBlocks.smelter); .setDependencies(CraftingBlocks.smelter);
new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.tungsten, 140), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 70)); new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.tungsten, 140), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 70));
new Recipe(liquid, LiquidBlocks.thermalPump, new ItemStack(Items.tungsten, 160), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 80), new ItemStack(Items.thorium, 70));
//DEBUG //DEBUG
new Recipe(units, DebugBlocks.itemSource, new ItemStack(Items.carbide, 10)).setDebug(); new Recipe(units, DebugBlocks.itemSource, new ItemStack(Items.carbide, 10)).setDebug();

View File

@@ -28,8 +28,9 @@ public class LiquidBlocks extends BlockList implements ContentList{
}}; }};
thermalPump = new Pump("thermal-pump"){{ thermalPump = new Pump("thermal-pump"){{
pumpAmount = 0.3f; shadow = "shadow-rounded-2";
consumes.power(0.05f); pumpAmount = 0.55f;
consumes.power(0.03f);
liquidCapacity = 40f; liquidCapacity = 40f;
size = 2; size = 2;
tier = 2; tier = 2;

View File

@@ -24,8 +24,6 @@ public abstract class BaseBlock{
public boolean outputsLiquid = false; public boolean outputsLiquid = false;
public boolean singleLiquid = true; public boolean singleLiquid = true;
public boolean outputsItems = false;
public int itemCapacity; public int itemCapacity;
public float liquidCapacity = 10f; public float liquidCapacity = 10f;
public float liquidFlowFactor = 4.9f; public float liquidFlowFactor = 4.9f;
@@ -68,6 +66,10 @@ public abstract class BaseBlock{
tile.entity.items.add(item, amount); tile.entity.items.add(item, amount);
} }
public boolean outputsItems(){
return hasItems;
}
/**Returns offset for stack placement.*/ /**Returns offset for stack placement.*/
public void getStackOffset(Item item, Tile tile, Translator trns){ public void getStackOffset(Item item, Tile tile, Translator trns){

View File

@@ -128,7 +128,7 @@ public class Conveyor extends Block{
Tile other = tile.getNearby(Mathf.mod(tile.getRotation() - direction, 4)); Tile other = tile.getNearby(Mathf.mod(tile.getRotation() - direction, 4));
if(other != null) other = other.target(); if(other != null) other = other.target();
if(other == null || (!other.block().outputsItems && !other.block().hasItems)) return false; if(other == null || !other.block().outputsItems()) return false;
return (tile.getNearby(tile.getRotation()) == other) return (tile.getNearby(tile.getRotation()) == other)
|| (!other.block().rotate || other.getNearby(other.getRotation()) == tile); || (!other.block().rotate || other.getNearby(other.getRotation()) == tile);
} }

View File

@@ -20,10 +20,14 @@ public class Junction extends Block{
update = true; update = true;
solid = true; solid = true;
instantTransfer = true; instantTransfer = true;
outputsItems = true;
group = BlockGroup.transportation; group = BlockGroup.transportation;
} }
@Override
public boolean outputsItems(){
return true;
}
@Override @Override
public void update(Tile tile){ public void update(Tile tile){
JunctionEntity entity = tile.entity(); JunctionEntity entity = tile.entity();

View File

@@ -26,11 +26,15 @@ public class Sorter extends Block implements SelectionTrait{
update = true; update = true;
solid = true; solid = true;
instantTransfer = true; instantTransfer = true;
outputsItems = true;
group = BlockGroup.transportation; group = BlockGroup.transportation;
configurable = true; configurable = true;
} }
@Override
public boolean outputsItems(){
return true;
}
@Remote(targets = Loc.both, called = Loc.both, forward = true) @Remote(targets = Loc.both, called = Loc.both, forward = true)
public static void setSorterItem(Player player, Tile tile, Item item){ public static void setSorterItem(Player player, Tile tile, Item item){
SorterEntity entity = tile.entity(); SorterEntity entity = tile.entity();

View File

@@ -12,6 +12,11 @@ public class PowerGenerator extends PowerDistributor{
flags = EnumSet.of(BlockFlag.producer); flags = EnumSet.of(BlockFlag.producer);
} }
@Override
public boolean outputsItems(){
return false;
}
@Override @Override
public TileEntity getEntity(){ public TileEntity getEntity(){
return new GeneratorEntity(); return new GeneratorEntity();
@@ -19,6 +24,5 @@ public class PowerGenerator extends PowerDistributor{
public static class GeneratorEntity extends TileEntity{ public static class GeneratorEntity extends TileEntity{
public float generateTime; public float generateTime;
public float uptime;
} }
} }

View File

@@ -72,6 +72,11 @@ public class UnitPad extends Block{
} }
} }
@Override
public boolean outputsItems(){
return false;
}
@Override @Override
public void setStats(){ public void setStats(){
super.setStats(); super.setStats();