mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 12:38:05 +07:00
Fixed some problems with Generators
This commit is contained in:
parent
5834dc9b2e
commit
9674ca5e87
@ -1,5 +1,5 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Sun Mar 11 09:45:55 EDT 2018
|
||||
#Sun Mar 11 10:06:17 EDT 2018
|
||||
version=release
|
||||
androidBuildCode=441
|
||||
name=Mindustry
|
||||
|
@ -127,9 +127,8 @@ public class UI extends SceneModule{
|
||||
if(Vars.debug && !Vars.showUI) return;
|
||||
|
||||
if(Graphics.drawing()) Graphics.end();
|
||||
|
||||
scene.act();
|
||||
scene.draw();
|
||||
|
||||
act();
|
||||
|
||||
if(control.showCursor()) {
|
||||
Draw.color();
|
||||
|
@ -71,6 +71,14 @@ public class Tile{
|
||||
if(x == cx + 1 && y == cy) return 2;
|
||||
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(){
|
||||
return (T)entity;
|
||||
|
@ -214,7 +214,7 @@ public class Generator extends PowerBlock{
|
||||
|
||||
float r = interfering ? 0f : 0f;
|
||||
|
||||
int relative = tile.relativeTo(target.x, target.y);
|
||||
int relative = tile.sizedRelativeTo(target.x, target.y);
|
||||
|
||||
if(relative == -1){
|
||||
Shapes.laser("laser", "laserend", tile.worldx() + t2.x, tile.worldy() + t2.y,
|
||||
|
Loading…
Reference in New Issue
Block a user