mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
Added thermal pump / Better conveyor autotile
This commit is contained in:
parent
d86dd4f80b
commit
07c19ce085
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 |
@ -525,6 +525,7 @@ block.nuclear-reactor.name=Nuclear Reactor
|
||||
block.command-center.name=Command Center
|
||||
block.mass-driver.name=Mass Driver
|
||||
block.blast-drill.name=Blast Drill
|
||||
block.thermal-pump.name=Thermal Pump
|
||||
|
||||
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.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
@ -154,6 +154,7 @@ public class Recipes implements ContentList{
|
||||
new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 20))
|
||||
.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.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
|
||||
new Recipe(units, DebugBlocks.itemSource, new ItemStack(Items.carbide, 10)).setDebug();
|
||||
|
@ -28,8 +28,9 @@ public class LiquidBlocks extends BlockList implements ContentList{
|
||||
}};
|
||||
|
||||
thermalPump = new Pump("thermal-pump"){{
|
||||
pumpAmount = 0.3f;
|
||||
consumes.power(0.05f);
|
||||
shadow = "shadow-rounded-2";
|
||||
pumpAmount = 0.55f;
|
||||
consumes.power(0.03f);
|
||||
liquidCapacity = 40f;
|
||||
size = 2;
|
||||
tier = 2;
|
||||
|
@ -24,8 +24,6 @@ public abstract class BaseBlock{
|
||||
public boolean outputsLiquid = false;
|
||||
public boolean singleLiquid = true;
|
||||
|
||||
public boolean outputsItems = false;
|
||||
|
||||
public int itemCapacity;
|
||||
public float liquidCapacity = 10f;
|
||||
public float liquidFlowFactor = 4.9f;
|
||||
@ -68,6 +66,10 @@ public abstract class BaseBlock{
|
||||
tile.entity.items.add(item, amount);
|
||||
}
|
||||
|
||||
public boolean outputsItems(){
|
||||
return hasItems;
|
||||
}
|
||||
|
||||
/**Returns offset for stack placement.*/
|
||||
public void getStackOffset(Item item, Tile tile, Translator trns){
|
||||
|
||||
|
@ -128,7 +128,7 @@ public class Conveyor extends Block{
|
||||
Tile other = tile.getNearby(Mathf.mod(tile.getRotation() - direction, 4));
|
||||
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)
|
||||
|| (!other.block().rotate || other.getNearby(other.getRotation()) == tile);
|
||||
}
|
||||
|
@ -20,10 +20,14 @@ public class Junction extends Block{
|
||||
update = true;
|
||||
solid = true;
|
||||
instantTransfer = true;
|
||||
outputsItems = true;
|
||||
group = BlockGroup.transportation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsItems(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Tile tile){
|
||||
JunctionEntity entity = tile.entity();
|
||||
|
@ -26,11 +26,15 @@ public class Sorter extends Block implements SelectionTrait{
|
||||
update = true;
|
||||
solid = true;
|
||||
instantTransfer = true;
|
||||
outputsItems = true;
|
||||
group = BlockGroup.transportation;
|
||||
configurable = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsItems(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Remote(targets = Loc.both, called = Loc.both, forward = true)
|
||||
public static void setSorterItem(Player player, Tile tile, Item item){
|
||||
SorterEntity entity = tile.entity();
|
||||
|
@ -12,6 +12,11 @@ public class PowerGenerator extends PowerDistributor{
|
||||
flags = EnumSet.of(BlockFlag.producer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsItems(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getEntity(){
|
||||
return new GeneratorEntity();
|
||||
@ -19,6 +24,5 @@ public class PowerGenerator extends PowerDistributor{
|
||||
|
||||
public static class GeneratorEntity extends TileEntity{
|
||||
public float generateTime;
|
||||
public float uptime;
|
||||
}
|
||||
}
|
||||
|
@ -72,6 +72,11 @@ public class UnitPad extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsItems(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
Loading…
Reference in New Issue
Block a user