Suggest pressure conduit

This commit is contained in:
Patrick 'Quezler' Mounier
2019-10-30 13:10:14 +01:00
parent ee5d229f51
commit 721dd9255e
16 changed files with 1817 additions and 1705 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -944,6 +944,7 @@ block.fortress-factory.name = Fortress Mech Factory
block.revenant-factory.name = Revenant Fighter Factory
block.repair-point.name = Repair Point
block.pulse-conduit.name = Pulse Conduit
block.pressure-conduit.name = Pressure Conduit
block.phase-conduit.name = Phase Conduit
block.liquid-router.name = Liquid Router
block.liquid-tank.name = Liquid Tank
@@ -1112,6 +1113,7 @@ block.rotary-pump.description = An advanced pump. Pumps more liquid, but require
block.thermal-pump.description = The ultimate pump.
block.conduit.description = Basic liquid transport block. Moves liquids forward. Used in conjunction with pumps and other conduits.
block.pulse-conduit.description = An advanced liquid transport block. Transports liquids faster and stores more than standard conduits.
block.pressure-conduit.description = A pressurized liquid transport block. The pressure on its output side is slightly higher than its input one.
block.liquid-router.description = Accepts liquids from one direction and outputs them to up to 3 other directions equally. Can also store a certain amount of liquid. Useful for splitting the liquids from one source to multiple targets.
block.liquid-tank.description = Stores a large amount of liquids. Use for creating buffers in situations with non-constant demand of materials or as a safeguard for cooling vital blocks.
block.liquid-junction.description = Acts as a bridge for two crossing conduits. Useful in situations with two different conduits carrying different liquids to different locations.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

After

Width:  |  Height:  |  Size: 740 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 KiB

After

Width:  |  Height:  |  Size: 935 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 KiB

After

Width:  |  Height:  |  Size: 331 KiB

View File

@@ -59,7 +59,7 @@ public class Blocks implements ContentList{
conveyor, titaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router, overflowGate, massDriver,
//liquids
mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidTank, liquidJunction, bridgeConduit, phaseConduit,
mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, pressureConduit, liquidRouter, liquidTank, liquidJunction, bridgeConduit, phaseConduit,
//power
combustionGenerator, thermalGenerator, turbineGenerator, differentialGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor,
@@ -1005,12 +1005,21 @@ public class Blocks implements ContentList{
conduit = new Conduit("conduit"){{
requirements(Category.liquid, ItemStack.with(Items.metaglass, 1));
health = 45;
bar = 1f;
}};
pulseConduit = new Conduit("pulse-conduit"){{
requirements(Category.liquid, ItemStack.with(Items.titanium, 2, Items.metaglass, 1));
liquidCapacity = 16f;
health = 90;
bar = 1f;
}};
pressureConduit = new Conduit("pressure-conduit"){{
requirements(Category.liquid, ItemStack.with(Items.surgealloy, 2, Items.metaglass, 1));
liquidCapacity = 20f;
health = 70;
bar = 1.025f;
}};
liquidRouter = new LiquidRouter("liquid-router"){{

View File

@@ -13,6 +13,7 @@ import io.anuke.mindustry.entities.type.Unit;
import io.anuke.mindustry.ctype.UnlockableContent;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.Liquid;
import io.anuke.mindustry.world.blocks.distribution.Conduit;
import io.anuke.mindustry.world.consumers.Consumers;
import io.anuke.mindustry.world.meta.BlockBars;
import io.anuke.mindustry.world.meta.BlockStats;
@@ -143,7 +144,7 @@ public abstract class BlockStorage extends UnlockableContent{
if(next.block().acceptLiquid(next, tile, liquid, 0f)){
float ofract = next.entity.liquids.get(liquid) / next.block().liquidCapacity;
float fract = tile.entity.liquids.get(liquid) / liquidCapacity;
float fract = tile.entity.liquids.get(liquid) / liquidCapacity * (tile.block() instanceof Conduit ? ((Conduit) tile.block()).bar : 1f);
float flow = Math.min(Mathf.clamp((fract - ofract) * (1f)) * (liquidCapacity), tile.entity.liquids.get(liquid));
flow = Math.min(flow, next.block().liquidCapacity - next.entity.liquids.get(liquid) - 0.001f);

View File

@@ -17,6 +17,8 @@ public class Conduit extends LiquidBlock implements Autotiler{
protected TextureRegion[] topRegions = new TextureRegion[7];
protected TextureRegion[] botRegions = new TextureRegion[7];
public float bar;
public Conduit(String name){
super(name);
rotate = true;