Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2021-01-18 18:04:21 -05:00
4 changed files with 9 additions and 5 deletions

View File

@@ -778,6 +778,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
} }
power.links.clear(); power.links.clear();
} }
public boolean conductsTo(Building other){
return !block.insulated;
}
public Seq<Building> getPowerConnections(Seq<Building> out){ public Seq<Building> getPowerConnections(Seq<Building> out){
out.clear(); out.clear();
@@ -786,7 +790,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
for(Building other : proximity){ for(Building other : proximity){
if(other != null && other.power != null if(other != null && other.power != null
&& !(block.consumesPower && other.block.consumesPower && !block.outputsPower && !other.block.outputsPower) && !(block.consumesPower && other.block.consumesPower && !block.outputsPower && !other.block.outputsPower)
&& !power.links.contains(other.pos())){ && conductsTo(other) && other.conductsTo(self()) && !power.links.contains(other.pos())){
out.add(other); out.add(other);
} }
} }

View File

@@ -251,7 +251,7 @@ public class DesktopInput extends InputHandler{
//zoom camera //zoom camera
if((!Core.scene.hasScroll() || Core.input.keyDown(Binding.diagonal_placement)) && !ui.chatfrag.shown() && Math.abs(Core.input.axisTap(Binding.zoom)) > 0 if((!Core.scene.hasScroll() || Core.input.keyDown(Binding.diagonal_placement)) && !ui.chatfrag.shown() && Math.abs(Core.input.axisTap(Binding.zoom)) > 0
&& !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!isPlacing() || !block.rotate) && selectRequests.isEmpty()))){ && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!player.isBuilder() || !isPlacing() || !block.rotate) && selectRequests.isEmpty()))){
renderer.scaleCamera(Core.input.axisTap(Binding.zoom)); renderer.scaleCamera(Core.input.axisTap(Binding.zoom));
} }

View File

@@ -652,7 +652,7 @@ public class MobileInput extends InputHandler implements GestureListener{
} }
//zoom camera //zoom camera
if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!isPlacing() || !block.rotate) && selectRequests.isEmpty()))){ if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!player.isBuilder() || !isPlacing() || !block.rotate) && selectRequests.isEmpty()))){
renderer.scaleCamera(Core.input.axisTap(Binding.zoom)); renderer.scaleCamera(Core.input.axisTap(Binding.zoom));
} }

View File

@@ -127,11 +127,11 @@ public class Conveyor extends Block implements Autotiler{
} }
} }
Draw.z(Layer.block); Draw.z(Layer.block - 0.2f);
Draw.rect(regions[blendbits][frame], x, y, tilesize * blendsclx, tilesize * blendscly, rotation * 90); Draw.rect(regions[blendbits][frame], x, y, tilesize * blendsclx, tilesize * blendscly, rotation * 90);
Draw.z(Layer.blockOver); Draw.z(Layer.block - 0.1f);
for(int i = 0; i < len; i++){ for(int i = 0; i < len; i++){
Item item = ids[i]; Item item = ids[i];