@@ -258,6 +258,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
player.clearUnit();
|
player.clearUnit();
|
||||||
Groups.unit.clear();
|
Groups.unit.clear();
|
||||||
Groups.build.clear();
|
Groups.build.clear();
|
||||||
|
Groups.weather.clear();
|
||||||
logic.play();
|
logic.play();
|
||||||
|
|
||||||
if(player.team().core() == null){
|
if(player.team().core() == null){
|
||||||
@@ -700,8 +701,6 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
if(core != 0) return core;
|
if(core != 0) return core;
|
||||||
int synth = Boolean.compare(b1.synthetic(), b2.synthetic());
|
int synth = Boolean.compare(b1.synthetic(), b2.synthetic());
|
||||||
if(synth != 0) return synth;
|
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);
|
int ore = Boolean.compare(b1 instanceof OverlayFloor, b2 instanceof OverlayFloor);
|
||||||
if(ore != 0) return ore;
|
if(ore != 0) return ore;
|
||||||
return Integer.compare(b1.id, b2.id);
|
return Integer.compare(b1.id, b2.id);
|
||||||
|
|||||||
@@ -427,12 +427,14 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
//actually place the part
|
//actually place the part
|
||||||
if(part != null && BaseGenerator.tryPlace(part, x, y, Team.derelict, (cx, cy) -> {
|
if(part != null && BaseGenerator.tryPlace(part, x, y, Team.derelict, (cx, cy) -> {
|
||||||
Tile other = tiles.getn(cx, cy);
|
Tile other = tiles.getn(cx, cy);
|
||||||
other.setOverlay(Blocks.oreScrap);
|
if(other.floor().hasSurface()){
|
||||||
for(int j = 1; j <= 2; j++){
|
other.setOverlay(Blocks.oreScrap);
|
||||||
for(Point2 p : Geometry.d8){
|
for(int j = 1; j <= 2; j++){
|
||||||
Tile t = tiles.get(cx + p.x*j, cy + p.y*j);
|
for(Point2 p : Geometry.d8){
|
||||||
if(t != null && t.floor().hasSurface() && rand.chance(j == 1 ? 0.4 : 0.2)){
|
Tile t = tiles.get(cx + p.x*j, cy + p.y*j);
|
||||||
t.setOverlay(Blocks.oreScrap);
|
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
|
* 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 rotation The rotation of the tile on (x, y)
|
||||||
*
|
|
||||||
* @param otherx The x coordinate of position 2
|
* @param otherx The x coordinate of position 2
|
||||||
* @param othery The y coordinate of position 2
|
* @param othery The y coordinate of position 2
|
||||||
* @return whether this tile is looking at the other tile.
|
* @return whether this tile is looking at the other tile.
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ public class ArmoredConveyor extends Conveyor{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
|
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{
|
public class ArmoredConveyorBuild extends ConveyorBuild{
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ public class ArmoredConduit extends Conduit{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
|
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{
|
public class ArmoredConduitBuild extends ConduitBuild{
|
||||||
@@ -24,7 +25,7 @@ public class ArmoredConduit extends Conduit{
|
|||||||
public void draw(){
|
public void draw(){
|
||||||
super.draw();
|
super.draw();
|
||||||
|
|
||||||
// draw the cap when a conduit would normally leak
|
//draw the cap when a conduit would normally leak
|
||||||
Building next = front();
|
Building next = front();
|
||||||
if(next != null && next.team == team && next.block.hasLiquids) return;
|
if(next != null && next.team == team && next.block.hasLiquids) return;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=172b5df0a7258f7195d4b1f4c5b5724108f13ab0
|
archash=c1f1b3d22d98cd850e648f2bd7fbc73b1ced8624
|
||||||
|
|||||||
Reference in New Issue
Block a user