mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Fixed uncloseable doors, uncolored teleporters
This commit is contained in:
parent
3c3a440424
commit
ff406027b0
Binary file not shown.
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 345 B |
Binary file not shown.
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Fri Feb 09 14:51:54 EST 2018
|
||||
#Fri Feb 09 22:22:25 EST 2018
|
||||
version=beta
|
||||
androidBuildCode=142
|
||||
androidBuildCode=143
|
||||
name=Mindustry
|
||||
code=3.3
|
||||
build=custom build
|
||||
|
@ -189,6 +189,10 @@ public abstract class InputHandler extends InputAdapter{
|
||||
|
||||
placeBlockInternal(x, y, result, rotation, effects, sound);
|
||||
|
||||
Tile tile = world.tile(x, y);
|
||||
|
||||
if(tile != null) result.placed(tile);
|
||||
|
||||
if(Net.active() && result != ProductionBlocks.core){
|
||||
NetEvents.handlePlace(x, y, result, rotation);
|
||||
}
|
||||
@ -225,8 +229,6 @@ public abstract class InputHandler extends InputAdapter{
|
||||
}
|
||||
|
||||
if(effects && sound) Sounds.play("place");
|
||||
|
||||
result.placed(tile);
|
||||
}
|
||||
|
||||
public void breakBlock(int x, int y, boolean sound){
|
||||
|
@ -72,7 +72,7 @@ public class Door extends Wall{
|
||||
for(SolidEntity e : Entities.getNearby(enemyGroup, x * tilesize, y * tilesize, tilesize * 2f)){
|
||||
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
||||
|
||||
if(rect.overlaps(rect)){
|
||||
if(this.rect.overlaps(rect)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -80,7 +80,7 @@ public class Door extends Wall{
|
||||
for(SolidEntity e : Entities.getNearby(playerGroup, x * tilesize, y * tilesize, tilesize * 2f)){
|
||||
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
||||
|
||||
if(rect.overlaps(rect)){
|
||||
if(this.rect.overlaps(rect)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ public class Teleporter extends PowerBlock{
|
||||
@Override
|
||||
public void placed(Tile tile){
|
||||
tile.<TeleporterEntity>entity().color = lastColor;
|
||||
Timers.run(1f, () -> setConfigure(tile, lastColor));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user