Fixed some problems with Generators
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Sun Mar 11 09:45:55 EDT 2018
|
#Sun Mar 11 10:06:17 EDT 2018
|
||||||
version=release
|
version=release
|
||||||
androidBuildCode=441
|
androidBuildCode=441
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
|
|||||||
@@ -128,8 +128,7 @@ public class UI extends SceneModule{
|
|||||||
|
|
||||||
if(Graphics.drawing()) Graphics.end();
|
if(Graphics.drawing()) Graphics.end();
|
||||||
|
|
||||||
scene.act();
|
act();
|
||||||
scene.draw();
|
|
||||||
|
|
||||||
if(control.showCursor()) {
|
if(control.showCursor()) {
|
||||||
Draw.color();
|
Draw.color();
|
||||||
|
|||||||
@@ -72,6 +72,14 @@ public class Tile{
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public byte sizedRelativeTo(int cx, int cy){
|
||||||
|
if(x == cx && y == cy - 1 - block().size/2) return 1;
|
||||||
|
if(x == cx && y == cy + 1 + block().size/2) return 3;
|
||||||
|
if(x == cx - 1 - block().size/2 && y == cy) return 0;
|
||||||
|
if(x == cx + 1 + block().size/2 && y == cy) return 2;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
public <T extends TileEntity> T entity(){
|
public <T extends TileEntity> T entity(){
|
||||||
return (T)entity;
|
return (T)entity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class Generator extends PowerBlock{
|
|||||||
|
|
||||||
float r = interfering ? 0f : 0f;
|
float r = interfering ? 0f : 0f;
|
||||||
|
|
||||||
int relative = tile.relativeTo(target.x, target.y);
|
int relative = tile.sizedRelativeTo(target.x, target.y);
|
||||||
|
|
||||||
if(relative == -1){
|
if(relative == -1){
|
||||||
Shapes.laser("laser", "laserend", tile.worldx() + t2.x, tile.worldy() + t2.y,
|
Shapes.laser("laser", "laserend", tile.worldx() + t2.x, tile.worldy() + t2.y,
|
||||||
|
|||||||
Reference in New Issue
Block a user