Fixed uncloseable doors, uncolored teleporters
This commit is contained in:
@@ -215,13 +215,13 @@ public class Control extends Module{
|
||||
ui.loadfrag.show();
|
||||
saves.resetSave();
|
||||
|
||||
Timers.runTask(10, ()->{
|
||||
Timers.runTask(10, () -> {
|
||||
logic.reset();
|
||||
world.loadMap(map);
|
||||
logic.play();
|
||||
});
|
||||
|
||||
Timers.runTask(18, ()-> ui.loadfrag.hide());
|
||||
Timers.runTask(18, () -> ui.loadfrag.hide());
|
||||
}
|
||||
|
||||
public boolean isHighScore(){
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user