This commit is contained in:
Anuken
2020-08-20 09:46:08 -04:00
parent 5df2a3e625
commit 3498a34c56
11 changed files with 77 additions and 24 deletions

View File

@@ -48,6 +48,7 @@ public class ForceProjector extends Block{
hasPower = true;
hasLiquids = true;
hasItems = true;
//TODO this isn't good enough, shields are still clipped
expanded = true;
consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.1f)).boost().update(false);
}

View File

@@ -113,6 +113,11 @@ public class LogicBlock extends Block{
}
}
@Override
public void drawPlace(int x, int y, int rotation, boolean valid){
Drawf.circles(x*tilesize + offset, y*tilesize + offset, range);
}
@Override
public Object pointConfig(Object config, Cons<Point2> transformer){
if(config instanceof byte[]){
@@ -389,10 +394,7 @@ public class LogicBlock extends Block{
return other != null && other.isValid() && other.team == team && other.within(this, range + other.block.size*tilesize/2f) && !(other instanceof BuildEntity);
}
@Override
public void drawSelect(){
}
@Override
public void buildConfiguration(Table table){

View File

@@ -31,6 +31,7 @@ public class BlockPayload implements Payload{
public void place(Tile tile, int rotation){
tile.setBlock(entity.block(), entity.team(), rotation, () -> entity);
entity.dropped();
}
@Override

View File

@@ -306,6 +306,14 @@ public class PowerNode extends PowerBlock{
super.placed();
}
@Override
public void dropped(){
power.links.clear();
//create new power graph to manually unlink (this may be redundant)
power.graph = new PowerGraph();
power.graph.add(this);
}
@Override
public void updateTile(){
power.graph.update();