Fixed #2282
This commit is contained in:
@@ -146,17 +146,16 @@ public class ItemBridge extends Block{
|
||||
public void drawSelect(){
|
||||
if(linkValid(tile, world.tile(link))){
|
||||
drawInput(world.tile(link));
|
||||
}else{
|
||||
incoming.each(pos -> drawInput(world.tile(pos)));
|
||||
}
|
||||
|
||||
incoming.each(pos -> drawInput(world.tile(pos)));
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
private void drawInput(Tile other){
|
||||
if(!linkValid(tile, other, false)) return;
|
||||
boolean linked = other.pos() == link;
|
||||
if(!linked && !(other.<ItemBridgeEntity>bc().link == tile.pos())) return;
|
||||
|
||||
Tmp.v2.trns(tile.angleTo(other), 2f);
|
||||
float tx = tile.drawx(), ty = tile.drawy();
|
||||
|
||||
@@ -97,6 +97,7 @@ public class CoreBlock extends StorageBlock{
|
||||
|
||||
@Override
|
||||
public boolean canPlaceOn(Tile tile, Team team){
|
||||
if(tile == null) return false;
|
||||
CoreEntity core = team.core();
|
||||
//must have all requirements
|
||||
if(core == null || (!state.rules.infiniteResources && !core.items.has(requirements))) return false;
|
||||
@@ -138,7 +139,9 @@ public class CoreBlock extends StorageBlock{
|
||||
|
||||
@Override
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
if(!canPlaceOn(world.tile(x, y),player.team())){
|
||||
if(world.tile(x, y) == null) return;
|
||||
|
||||
if(!canPlaceOn(world.tile(x, y), player.team())){
|
||||
|
||||
drawPlaceText(Core.bundle.get((player.team().core() != null && player.team().core().items.has(requirements) && !state.rules.infiniteResources) ?
|
||||
"bar.corereq" :
|
||||
|
||||
Reference in New Issue
Block a user