mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-10 15:57:37 +07:00
Fixed item bridges
This commit is contained in:
@ -19,7 +19,7 @@ public class ExtendingItemBridge extends ItemBridge{
|
|||||||
public class ExtendingItemBridgeEntity extends ItemBridgeEntity{
|
public class ExtendingItemBridgeEntity extends ItemBridgeEntity{
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
super.draw();
|
Draw.rect(region, x, y);
|
||||||
|
|
||||||
Draw.z(Layer.power);
|
Draw.z(Layer.power);
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ public class ExtendingItemBridge extends ItemBridge{
|
|||||||
int i = tile.absoluteRelativeTo(other.x, other.y);
|
int i = tile.absoluteRelativeTo(other.x, other.y);
|
||||||
|
|
||||||
float ex = other.worldx() - x - Geometry.d4[i].x * tilesize / 2f,
|
float ex = other.worldx() - x - Geometry.d4[i].x * tilesize / 2f,
|
||||||
ey = other.worldy() - y - Geometry.d4[i].y * tilesize / 2f;
|
ey = other.worldy() - y - Geometry.d4[i].y * tilesize / 2f;
|
||||||
|
|
||||||
float uptime = state.isEditor() ? 1f : this.uptime;
|
float uptime = state.isEditor() ? 1f : this.uptime;
|
||||||
|
|
||||||
@ -62,7 +62,8 @@ public class ExtendingItemBridge extends ItemBridge{
|
|||||||
Draw.alpha(Mathf.absin(a / (float)arrows - time / 100f, 0.1f, 1f) * uptime * opacity);
|
Draw.alpha(Mathf.absin(a / (float)arrows - time / 100f, 0.1f, 1f) * uptime * opacity);
|
||||||
Draw.rect(arrowRegion,
|
Draw.rect(arrowRegion,
|
||||||
x + Geometry.d4[i].x * (tilesize / 2f + a * 6f + 2) * uptime,
|
x + Geometry.d4[i].x * (tilesize / 2f + a * 6f + 2) * uptime,
|
||||||
y + Geometry.d4[i].y * (tilesize / 2f + a * 6f + 2) * uptime, i * 90f);
|
y + Geometry.d4[i].y * (tilesize / 2f + a * 6f + 2) * uptime,
|
||||||
|
i * 90f);
|
||||||
}
|
}
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ public class ItemBridge extends Block{
|
|||||||
public void playerPlaced(){
|
public void playerPlaced(){
|
||||||
Tile link = findLink(tile.x, tile.y);
|
Tile link = findLink(tile.x, tile.y);
|
||||||
if(linkValid(tile, link)){
|
if(linkValid(tile, link)){
|
||||||
configure(tile.pos());
|
link.entity.configure(tile.pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
lastPlaced = tile.pos();
|
lastPlaced = tile.pos();
|
||||||
|
Reference in New Issue
Block a user