More code cleanup
This commit is contained in:
@@ -457,9 +457,7 @@ public class World implements ApplicationListener{
|
||||
}
|
||||
|
||||
for(int x = 0; x < tiles.length; x++){
|
||||
for(int y = 0; y < tiles[0].length; y++){
|
||||
dark[x][y] = writeBuffer[x][y];
|
||||
}
|
||||
System.arraycopy(writeBuffer[x], 0, dark[x], 0, tiles[0].length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.anuke.mindustry.editor.generation;
|
||||
|
||||
import io.anuke.mindustry.content.Blocks;
|
||||
import io.anuke.mindustry.editor.generation.FilterOption.BlockOption;
|
||||
import io.anuke.mindustry.editor.generation.FilterOption.SliderOption;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
|
||||
|
||||
@@ -305,9 +305,10 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai
|
||||
y = data.readFloat();
|
||||
liquid = content.liquid(data.readByte());
|
||||
targetAmount = data.readShort() / 4f;
|
||||
tile = world.tile(data.readInt());
|
||||
int pos = data.readInt();
|
||||
tile = world.tile(pos);
|
||||
|
||||
map.put(tile.pos(), this);
|
||||
map.put(pos, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -237,9 +237,8 @@ public class TreeLayout{
|
||||
}
|
||||
executeShifts(v);
|
||||
float midpoint = (v.children[0].prelim + v.children[v.children.length-1].prelim) / 2f;
|
||||
TreeNode w = leftSibling;
|
||||
if(w != null){
|
||||
v.prelim = w.prelim + getDistance(v, w);
|
||||
if(leftSibling != null){
|
||||
v.prelim = leftSibling.prelim + getDistance(v, leftSibling);
|
||||
v.mode = v.prelim - midpoint;
|
||||
}else{
|
||||
v.prelim = midpoint;
|
||||
|
||||
@@ -186,7 +186,8 @@ public class Build{
|
||||
Tile tile = world.tile(x + point.x, y + point.y);
|
||||
if(tile != null && !tile.floor().isDeep()) return true;
|
||||
}
|
||||
return world.tile(x, y) != null && !world.tile(x, y).floor().isDeep();
|
||||
Tile tile = world.tile(x, y);
|
||||
return tile != null && !tile.floor().isDeep();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public class Conveyor extends Block{
|
||||
pos.y = Mathf.clamp(pos.y, 0, nextMax);
|
||||
|
||||
if(pos.y >= 0.9999f && offloadDir(tile, pos.item)){
|
||||
if(next.block() instanceof Conveyor){
|
||||
if(next != null && next.block() instanceof Conveyor){
|
||||
ConveyorEntity othere = next.entity();
|
||||
|
||||
ItemPos ni = pos2.set(othere.convey.get(othere.lastInserted), ItemPos.updateShorts);
|
||||
|
||||
Reference in New Issue
Block a user