More slag
This commit is contained in:
@@ -2495,12 +2495,12 @@ public class UnitTypes implements ContentList{
|
||||
payloadCapacity = Mathf.sqr(2f) * tilePayload;
|
||||
|
||||
setEnginesMirror(
|
||||
new UnitEngine(34 / 4f, 30 / 4f, 3f, 45f),
|
||||
new UnitEngine(34 / 4f, 31 / 4f, 3f, 45f),
|
||||
new UnitEngine(35 / 4f, -38 / 4f, 3f, 315f)
|
||||
);
|
||||
|
||||
weapons.add(new Weapon("incite-weapon"){{
|
||||
reload = 35f;
|
||||
reload = 30f;
|
||||
x = 4f;
|
||||
y = 6.25f;
|
||||
shootY = 5.75f;
|
||||
@@ -2514,6 +2514,7 @@ public class UnitTypes implements ContentList{
|
||||
height = 12f;
|
||||
shootEffect = Fx.sparkShoot;
|
||||
smokeEffect = Fx.shootBigSmoke;
|
||||
pierceCap = 2;
|
||||
pierce = true;
|
||||
pierceBuilding = true;
|
||||
hitColor = backColor = trailColor = Pal.bulletYellowBack;
|
||||
|
||||
@@ -49,10 +49,16 @@ public abstract class BasicGenerator implements WorldGenerator{
|
||||
}
|
||||
|
||||
public void median(int radius, double percentile){
|
||||
median(radius, percentile, null);
|
||||
}
|
||||
|
||||
public void median(int radius, double percentile, @Nullable Block targetFloor){
|
||||
short[] blocks = new short[tiles.width * tiles.height];
|
||||
short[] floors = new short[blocks.length];
|
||||
|
||||
tiles.each((x, y) -> {
|
||||
if(targetFloor != null && tiles.getn(x, y).floor() != targetFloor) return;
|
||||
|
||||
ints1.clear();
|
||||
ints2.clear();
|
||||
Geometry.circle(x, y, width, height, radius, (cx, cy) -> {
|
||||
@@ -67,6 +73,8 @@ public abstract class BasicGenerator implements WorldGenerator{
|
||||
});
|
||||
|
||||
pass((x, y) -> {
|
||||
if(targetFloor != null && floor != targetFloor) return;
|
||||
|
||||
block = content.block(blocks[x + y * width]);
|
||||
floor = content.block(floors[x + y * width]);
|
||||
});
|
||||
|
||||
@@ -110,7 +110,8 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
if(floor != Blocks.redIce){
|
||||
float noise = noise(x + 782, y, 7, 0.8f, 280f, 1f);
|
||||
if(noise > 0.62f){
|
||||
if(noise > 0.7f){
|
||||
if(noise > 0.635f){
|
||||
//TODO slag must be rounded, no single occurrences
|
||||
floor = Blocks.slag;
|
||||
}else{
|
||||
floor = Blocks.yellowStone;
|
||||
@@ -136,6 +137,9 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
distort(10f, 12f);
|
||||
distort(5f, 7f);
|
||||
|
||||
//smooth out slag to prevent random 1-tile patches
|
||||
median(3, 0.6, Blocks.slag);
|
||||
|
||||
pass((x, y) -> {
|
||||
float max = 0;
|
||||
for(Point2 p : Geometry.d8){
|
||||
@@ -209,6 +213,12 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
}
|
||||
}
|
||||
|
||||
for(Tile tile : tiles){
|
||||
if(tile.overlay().needsSurface && !tile.floor().hasSurface()){
|
||||
tile.setOverlay(Blocks.air);
|
||||
}
|
||||
}
|
||||
|
||||
//not allowed
|
||||
state.rules.hiddenBuildItems.addAll(Items.copper, Items.titanium, Items.coal, Items.lead, Items.blastCompound, Items.pyratite, Items.sporePod, Items.metaglass, Items.plastanium);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user