Merge branch 'master' of https://github.com/Anuken/Mindustry into rework-sectors
This commit is contained in:
@@ -46,6 +46,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
|
|||||||
craftEffect = BlockFx.smeltsmoke;
|
craftEffect = BlockFx.smeltsmoke;
|
||||||
result = Items.silicon;
|
result = Items.silicon;
|
||||||
craftTime = 40f;
|
craftTime = 40f;
|
||||||
|
powerCapacity = 20f;
|
||||||
size = 2;
|
size = 2;
|
||||||
hasLiquids = false;
|
hasLiquids = false;
|
||||||
flameColor = Color.valueOf("ffef99");
|
flameColor = Color.valueOf("ffef99");
|
||||||
@@ -60,6 +61,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
|
|||||||
craftTime = 60f;
|
craftTime = 60f;
|
||||||
output = Items.plastanium;
|
output = Items.plastanium;
|
||||||
itemCapacity = 30;
|
itemCapacity = 30;
|
||||||
|
powerCapacity = 40f;
|
||||||
size = 2;
|
size = 2;
|
||||||
health = 320;
|
health = 320;
|
||||||
hasPower = hasLiquids = true;
|
hasPower = hasLiquids = true;
|
||||||
@@ -75,6 +77,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
|
|||||||
craftEffect = BlockFx.smeltsmoke;
|
craftEffect = BlockFx.smeltsmoke;
|
||||||
result = Items.phasematter;
|
result = Items.phasematter;
|
||||||
craftTime = 120f;
|
craftTime = 120f;
|
||||||
|
powerCapacity = 50f;
|
||||||
size = 2;
|
size = 2;
|
||||||
|
|
||||||
consumes.items(new ItemStack[]{new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10)});
|
consumes.items(new ItemStack[]{new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10)});
|
||||||
@@ -85,6 +88,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
|
|||||||
craftEffect = BlockFx.smeltsmoke;
|
craftEffect = BlockFx.smeltsmoke;
|
||||||
result = Items.surgealloy;
|
result = Items.surgealloy;
|
||||||
craftTime = 75f;
|
craftTime = 75f;
|
||||||
|
powerCapacity = 60f;
|
||||||
size = 2;
|
size = 2;
|
||||||
|
|
||||||
useFlux = true;
|
useFlux = true;
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ public class Router extends Block{
|
|||||||
@Override
|
@Override
|
||||||
public void update(Tile tile){
|
public void update(Tile tile){
|
||||||
SplitterEntity entity = tile.entity();
|
SplitterEntity entity = tile.entity();
|
||||||
|
|
||||||
|
if(entity.lastItem == null && entity.items.total() > 0){
|
||||||
|
entity.lastItem = entity.items.take();
|
||||||
|
entity.items.add(entity.lastItem, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if(entity.lastItem != null){
|
if(entity.lastItem != null){
|
||||||
entity.time += 1f/speed * Timers.delta();
|
entity.time += 1f/speed * Timers.delta();
|
||||||
Tile target = getTileTarget(tile, entity.lastItem, entity.lastInput, false);
|
Tile target = getTileTarget(tile, entity.lastItem, entity.lastInput, false);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.badlogic.gdx.utils.IntSet;
|
|||||||
import com.badlogic.gdx.utils.ObjectSet;
|
import com.badlogic.gdx.utils.ObjectSet;
|
||||||
import com.badlogic.gdx.utils.Queue;
|
import com.badlogic.gdx.utils.Queue;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
|
import io.anuke.ucore.core.Timers;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.threads;
|
import static io.anuke.mindustry.Vars.threads;
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ public class PowerGraph{
|
|||||||
outputs += Math.min(tile.block().powerCapacity - tile.entity.power.amount, toEach) / toEach;
|
outputs += Math.min(tile.block().powerCapacity - tile.entity.power.amount, toEach) / toEach;
|
||||||
}
|
}
|
||||||
|
|
||||||
float finalEach = toEach / outputs;
|
float finalEach = toEach / outputs * Timers.delta();
|
||||||
float buffer = 0f;
|
float buffer = 0f;
|
||||||
|
|
||||||
if(Float.isNaN(finalEach) || Float.isInfinite(finalEach)){
|
if(Float.isNaN(finalEach) || Float.isInfinite(finalEach)){
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class PhaseWeaver extends PowerSmelter{
|
|||||||
Shaders.build.region = weaveRegion;
|
Shaders.build.region = weaveRegion;
|
||||||
Shaders.build.progress = progress;
|
Shaders.build.progress = progress;
|
||||||
Shaders.build.color.set(Palette.accent);
|
Shaders.build.color.set(Palette.accent);
|
||||||
|
Shaders.build.color.a = entity.heat;
|
||||||
Shaders.build.time = -entity.time / 10f;
|
Shaders.build.time = -entity.time / 10f;
|
||||||
|
|
||||||
Graphics.shader(Shaders.build, false);
|
Graphics.shader(Shaders.build, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user