mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 07:07:03 +07:00
parent
add3fd9fb3
commit
6357c17f8a
@ -258,6 +258,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
player.clearUnit();
|
||||
Groups.unit.clear();
|
||||
Groups.build.clear();
|
||||
Groups.weather.clear();
|
||||
logic.play();
|
||||
|
||||
if(player.team().core() == null){
|
||||
@ -700,8 +701,6 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
if(core != 0) return core;
|
||||
int synth = Boolean.compare(b1.synthetic(), b2.synthetic());
|
||||
if(synth != 0) return synth;
|
||||
int editorVis = Boolean.compare(b1.buildVisibility == BuildVisibility.editorOnly, b2.buildVisibility == BuildVisibility.editorOnly);
|
||||
if(editorVis != 0) return editorVis;
|
||||
int ore = Boolean.compare(b1 instanceof OverlayFloor, b2 instanceof OverlayFloor);
|
||||
if(ore != 0) return ore;
|
||||
return Integer.compare(b1.id, b2.id);
|
||||
|
@ -427,12 +427,14 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||
//actually place the part
|
||||
if(part != null && BaseGenerator.tryPlace(part, x, y, Team.derelict, (cx, cy) -> {
|
||||
Tile other = tiles.getn(cx, cy);
|
||||
other.setOverlay(Blocks.oreScrap);
|
||||
for(int j = 1; j <= 2; j++){
|
||||
for(Point2 p : Geometry.d8){
|
||||
Tile t = tiles.get(cx + p.x*j, cy + p.y*j);
|
||||
if(t != null && t.floor().hasSurface() && rand.chance(j == 1 ? 0.4 : 0.2)){
|
||||
t.setOverlay(Blocks.oreScrap);
|
||||
if(other.floor().hasSurface()){
|
||||
other.setOverlay(Blocks.oreScrap);
|
||||
for(int j = 1; j <= 2; j++){
|
||||
for(Point2 p : Geometry.d8){
|
||||
Tile t = tiles.get(cx + p.x*j, cy + p.y*j);
|
||||
if(t != null && t.floor().hasSurface() && rand.chance(j == 1 ? 0.4 : 0.2)){
|
||||
t.setOverlay(Blocks.oreScrap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,9 +219,8 @@ public interface Autotiler{
|
||||
/**
|
||||
* Check if a position is facing the secondary position at a rotation
|
||||
*
|
||||
* @param tile The origin tile that is or is not facing the destinated `otherblock`
|
||||
* @param tile The origin tile that is or is not facing the `otherblock`
|
||||
* @param rotation The rotation of the tile on (x, y)
|
||||
*
|
||||
* @param otherx The x coordinate of position 2
|
||||
* @param othery The y coordinate of position 2
|
||||
* @return whether this tile is looking at the other tile.
|
||||
|
@ -12,7 +12,8 @@ public class ArmoredConveyor extends Conveyor{
|
||||
|
||||
@Override
|
||||
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
|
||||
return otherblock.outputsItems() && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock);
|
||||
return (otherblock.outputsItems() && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock)) ||
|
||||
(lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems);
|
||||
}
|
||||
|
||||
public class ArmoredConveyorBuild extends ConveyorBuild{
|
||||
|
@ -16,7 +16,8 @@ public class ArmoredConduit extends Conduit{
|
||||
|
||||
@Override
|
||||
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
|
||||
return otherblock.outputsLiquid && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock);
|
||||
return (otherblock.outputsLiquid && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock)) ||
|
||||
(lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasLiquids);
|
||||
}
|
||||
|
||||
public class ArmoredConduitBuild extends ConduitBuild{
|
||||
@ -24,7 +25,7 @@ public class ArmoredConduit extends Conduit{
|
||||
public void draw(){
|
||||
super.draw();
|
||||
|
||||
// draw the cap when a conduit would normally leak
|
||||
//draw the cap when a conduit would normally leak
|
||||
Building next = front();
|
||||
if(next != null && next.team == team && next.block.hasLiquids) return;
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=172b5df0a7258f7195d4b1f4c5b5724108f13ab0
|
||||
archash=c1f1b3d22d98cd850e648f2bd7fbc73b1ced8624
|
||||
|
Loading…
Reference in New Issue
Block a user