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.
|
#Autogenerated file. Do not modify.
|
||||||
#Fri Feb 09 14:51:54 EST 2018
|
#Fri Feb 09 22:22:25 EST 2018
|
||||||
version=beta
|
version=beta
|
||||||
androidBuildCode=142
|
androidBuildCode=143
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
code=3.3
|
code=3.3
|
||||||
build=custom build
|
build=custom build
|
||||||
|
@ -215,13 +215,13 @@ public class Control extends Module{
|
|||||||
ui.loadfrag.show();
|
ui.loadfrag.show();
|
||||||
saves.resetSave();
|
saves.resetSave();
|
||||||
|
|
||||||
Timers.runTask(10, ()->{
|
Timers.runTask(10, () -> {
|
||||||
logic.reset();
|
logic.reset();
|
||||||
world.loadMap(map);
|
world.loadMap(map);
|
||||||
logic.play();
|
logic.play();
|
||||||
});
|
});
|
||||||
|
|
||||||
Timers.runTask(18, ()-> ui.loadfrag.hide());
|
Timers.runTask(18, () -> ui.loadfrag.hide());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isHighScore(){
|
public boolean isHighScore(){
|
||||||
|
@ -189,6 +189,10 @@ public abstract class InputHandler extends InputAdapter{
|
|||||||
|
|
||||||
placeBlockInternal(x, y, result, rotation, effects, sound);
|
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){
|
if(Net.active() && result != ProductionBlocks.core){
|
||||||
NetEvents.handlePlace(x, y, result, rotation);
|
NetEvents.handlePlace(x, y, result, rotation);
|
||||||
}
|
}
|
||||||
@ -225,8 +229,6 @@ public abstract class InputHandler extends InputAdapter{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(effects && sound) Sounds.play("place");
|
if(effects && sound) Sounds.play("place");
|
||||||
|
|
||||||
result.placed(tile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void breakBlock(int x, int y, boolean sound){
|
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)){
|
for(SolidEntity e : Entities.getNearby(enemyGroup, x * tilesize, y * tilesize, tilesize * 2f)){
|
||||||
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
||||||
|
|
||||||
if(rect.overlaps(rect)){
|
if(this.rect.overlaps(rect)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ public class Door extends Wall{
|
|||||||
for(SolidEntity e : Entities.getNearby(playerGroup, x * tilesize, y * tilesize, tilesize * 2f)){
|
for(SolidEntity e : Entities.getNearby(playerGroup, x * tilesize, y * tilesize, tilesize * 2f)){
|
||||||
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
||||||
|
|
||||||
if(rect.overlaps(rect)){
|
if(this.rect.overlaps(rect)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ public class Teleporter extends PowerBlock{
|
|||||||
@Override
|
@Override
|
||||||
public void placed(Tile tile){
|
public void placed(Tile tile){
|
||||||
tile.<TeleporterEntity>entity().color = lastColor;
|
tile.<TeleporterEntity>entity().color = lastColor;
|
||||||
|
Timers.run(1f, () -> setConfigure(tile, lastColor));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user