Fixed offloadNear and power smelter bugs
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 292 B |
BIN
core/assets-raw/sprites/blocks/production/powersmelter-top.png
Normal file
After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
@ -1,7 +1,7 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Tue Mar 27 20:10:08 EDT 2018
|
#Tue Mar 27 21:26:54 EDT 2018
|
||||||
version=release
|
version=release
|
||||||
androidBuildCode=678
|
androidBuildCode=681
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
code=3.4
|
code=3.4
|
||||||
build=custom build
|
build=custom build
|
||||||
|
@ -41,8 +41,9 @@ public class CraftingBlocks {
|
|||||||
|
|
||||||
powersmelter = new PowerSmelter("powersmelter") {{
|
powersmelter = new PowerSmelter("powersmelter") {{
|
||||||
health = 90;
|
health = 90;
|
||||||
|
craftEffect = Fx.smeltsmoke;
|
||||||
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.iron, 1)};
|
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.iron, 1)};
|
||||||
result = Items.densealloy;
|
result = Items.steel;
|
||||||
burnDuration = 45f;
|
burnDuration = 45f;
|
||||||
powerUse = 0.1f;
|
powerUse = 0.1f;
|
||||||
craftTime = 25f;
|
craftTime = 25f;
|
||||||
|
@ -111,10 +111,12 @@ public abstract class BaseBlock {
|
|||||||
int size = tile.block().size;
|
int size = tile.block().size;
|
||||||
|
|
||||||
GridPoint2[] nearby = Edges.getEdges(size);
|
GridPoint2[] nearby = Edges.getEdges(size);
|
||||||
|
byte i = (byte)(tile.getDump() % nearby.length);
|
||||||
|
|
||||||
for(int j = 0; j < nearby.length; j ++){
|
for(int j = 0; j < nearby.length; j ++){
|
||||||
Tile other = tile.getNearby(nearby[j]);
|
tile.setDump((byte)((i + 1) % nearby.length));
|
||||||
Tile in = tile.getNearby(Edges.getInsideEdges(size)[j]);
|
Tile other = tile.getNearby(nearby[i]);
|
||||||
|
Tile in = tile.getNearby(Edges.getInsideEdges(size)[i]);
|
||||||
if(other != null && other.block().acceptItem(item, other, in) && canDump(tile, other, item)){
|
if(other != null && other.block().acceptItem(item, other, in) && canDump(tile, other, item)){
|
||||||
other.block().handleItem(item, other, in);
|
other.block().handleItem(item, other, in);
|
||||||
return;
|
return;
|
||||||
|
@ -14,7 +14,6 @@ import io.anuke.ucore.core.Effects.Effect;
|
|||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
import io.anuke.ucore.graphics.Draw;
|
import io.anuke.ucore.graphics.Draw;
|
||||||
import io.anuke.ucore.graphics.Fill;
|
import io.anuke.ucore.graphics.Fill;
|
||||||
import io.anuke.ucore.util.Log;
|
|
||||||
import io.anuke.ucore.util.Mathf;
|
import io.anuke.ucore.util.Mathf;
|
||||||
import io.anuke.ucore.util.Strings;
|
import io.anuke.ucore.util.Strings;
|
||||||
|
|
||||||
@ -131,21 +130,19 @@ public class PowerSmelter extends PowerBlock {
|
|||||||
|
|
||||||
PowerSmelterEntity entity = tile.entity();
|
PowerSmelterEntity entity = tile.entity();
|
||||||
|
|
||||||
Log.info(entity.heat + "");
|
|
||||||
|
|
||||||
//draw glowing center
|
//draw glowing center
|
||||||
if(entity.heat > 0f){
|
if(entity.heat > 0f){
|
||||||
float g = 0.3f;
|
float g = 0.3f;
|
||||||
float r = 0.06f;
|
float r = 0.06f;
|
||||||
float cr = Mathf.random(0.1f);
|
float cr = Mathf.random(0.1f);
|
||||||
|
|
||||||
Draw.alpha(((1f-g) + Mathf.absin(Timers.time(), 9f, g) + Mathf.random(r) - r) * entity.heat);
|
Draw.alpha(((1f-g) + Mathf.absin(Timers.time(), 8f, g) + Mathf.random(r) - r) * entity.heat);
|
||||||
|
|
||||||
Draw.tint(Color.valueOf("ffc999"));
|
Draw.tint(Color.valueOf("ffc999"));
|
||||||
Fill.circle(tile.drawx(), tile.drawy(), 3f + Mathf.absin(Timers.time(), 6f, 2f) + cr);
|
Fill.circle(tile.drawx(), tile.drawy(), 3f + Mathf.absin(Timers.time(), 5f, 2f) + cr);
|
||||||
Draw.color(1f, 1f, 1f, entity.heat);
|
Draw.color(1f, 1f, 1f, entity.heat);
|
||||||
Draw.rect(name + "-top", tile.drawx(), tile.drawy());
|
Draw.rect(name + "-top", tile.drawx(), tile.drawy());
|
||||||
Fill.circle(tile.drawx(), tile.drawy(), 2f + Mathf.absin(Timers.time(), 6f, 1f) + cr);
|
Fill.circle(tile.drawx(), tile.drawy(), 1.9f + Mathf.absin(Timers.time(), 5f, 1f) + cr);
|
||||||
|
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
|