More slag

This commit is contained in:
Anuken
2021-11-14 10:12:47 -05:00
parent 3a6878ef60
commit 70cf55f314
4 changed files with 23 additions and 4 deletions

View File

@@ -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;

View File

@@ -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]);
});

View File

@@ -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);