New ferric blocks, improved asteroid generation

This commit is contained in:
Anuken
2021-06-19 21:19:46 -04:00
parent ca60309fde
commit 3c65a26d72
16 changed files with 43 additions and 46 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

View File

@@ -383,3 +383,6 @@
63350=red-ice|block-red-ice-ui
63349=red-ice-wall|block-red-ice-wall-ui
63348=ferrous|block-ferrous-ui
63347=ferric-stone|block-ferric-stone-ui
63346=ferric-stone-wall|block-ferric-stone-wall-ui
63345=ferric-craters|block-ferric-craters-ui

View File

@@ -40,8 +40,8 @@ public class Blocks implements ContentList{
redmat, bluemat,
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
redweed, purbush, coralChunk, glowBlob, yellowCoral,
regolithWall, yellowStoneWall, rhyoliteWall, carbonWall, redIceWall,
graphiticStone,
regolithWall, yellowStoneWall, rhyoliteWall, carbonWall, redIceWall, ferricStoneWall,
ferricStone, ferricCraters, graphiticStone,
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, grass, salt,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
@@ -312,6 +312,16 @@ public class Blocks implements ContentList{
variants = 4;
}};
ferricStone = new Floor("ferric-stone"){{
attributes.set(Attribute.water, -1f);
}};
ferricCraters = new Floor("ferric-craters"){{
variants = 3;
attributes.set(Attribute.water, -1f);
blendGroup = ferricStone;
}};
redIce = new Floor("red-ice"){{
dragMultiplier = 0.4f;
speedMultiplier = 0.9f;
@@ -349,67 +359,52 @@ public class Blocks implements ContentList{
shale = new Floor("shale"){{
variants = 3;
attributes.set(Attribute.oil, 1f);
attributes.set(Attribute.oil, 1.2f);
}};
stoneWall = new StaticWall("stone-wall"){{
variants = 2;
}};
stoneWall = new StaticWall("stone-wall");
sporeWall = new StaticWall("spore-wall"){{
variants = 2;
}};
sporeWall = new StaticWall("spore-wall");
dirtWall = new StaticWall("dirt-wall"){{
variants = 2;
}};
dirtWall = new StaticWall("dirt-wall");
daciteWall = new StaticWall("dacite-wall"){{
variants = 2;
}};
daciteWall = new StaticWall("dacite-wall");
iceWall = new StaticWall("ice-wall"){{
variants = 2;
iceSnow.asFloor().wall = this;
}};
snowWall = new StaticWall("snow-wall"){{
variants = 2;
}};
snowWall = new StaticWall("snow-wall");
duneWall = new StaticWall("dune-wall"){{
variants = 2;
basalt.asFloor().wall = darksandWater.asFloor().wall = darksandTaintedWater.asFloor().wall = this;
}};
regolithWall = new StaticWall("regolith-wall"){{
variants = 2;
regolith.asFloor().wall = this;
}};
yellowStoneWall = new StaticWall("yellow-stone-wall"){{
variants = 2;
yellowStone.asFloor().wall = slag.asFloor().wall = this;
}};
rhyoliteWall = new StaticWall("rhyolite-wall"){{
variants = 2;
rhyolite.asFloor().wall = rhyoliteCrater.asFloor().wall = this;
}};
carbonWall = new StaticWall("carbon-wall"){{
variants = 2;
graphiticStone.asFloor().wall = this;
}};
ferricStoneWall = new StaticWall("ferric-stone-wall"){{
ferricStone.asFloor().wall = this;
}};
redIceWall = new StaticWall("red-ice-wall"){{
variants = 2;
redIce.asFloor().wall = this;
}};
sandWall = new StaticWall("sand-wall"){{
variants = 2;
sandWater.asFloor().wall = water.asFloor().wall = deepwater.asFloor().wall = this;
}};
@@ -417,21 +412,13 @@ public class Blocks implements ContentList{
shrubs = new StaticWall("shrubs");
shaleWall = new StaticWall("shale-wall"){{
variants = 2;
}};
shaleWall = new StaticWall("shale-wall");
sporePine = new StaticTree("spore-pine"){{
variants = 0;
}};
sporePine = new StaticTree("spore-pine");
snowPine = new StaticTree("snow-pine"){{
variants = 0;
}};
snowPine = new StaticTree("snow-pine");
pine = new StaticTree("pine"){{
variants = 0;
}};
pine = new StaticTree("pine");
whiteTreeDead = new TreeBlock("white-tree-dead");

View File

@@ -11,9 +11,9 @@ import mindustry.world.meta.*;
import static mindustry.Vars.*;
public class AsteroidGenerator extends BlankPlanetGenerator{
public static int min = 15, max = 25, octaves = 2, foct = 3;
public static int min = 20, max = 28, octaves = 2, foct = 3;
public static float radMin = 5f, radMax = 50f, persistence = 0.4f, scale = 30f, mag = 0.46f, thresh = 1f;
public static float radMin = 12f, radMax = 60f, persistence = 0.4f, scale = 30f, mag = 0.46f, thresh = 1f;
public static float fmag = 0.6f, fscl = 50f, fper = 0.6f;
@@ -25,7 +25,7 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
for(int x = ax - radius; x <= ax + radius; x++){
for(int y = ay - radius; y <= ay + radius; y++){
if(tiles.in(x, y) && Mathf.dst(x, y, ax, ay) / (radius) + Simplex.noise2d(seed, octaves, persistence, 1f / scale, x, y) * mag < thresh){
tiles.getn(x, y).setFloor(Blocks.stone.asFloor());
tiles.getn(x, y).setFloor(Blocks.ferricStone.asFloor());
}
}
}
@@ -51,7 +51,7 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
}
//tiny asteroids.
int smalls = rand.random(min, max * 2);
int smalls = rand.random(min, max) * 3;
for(int i = 0; i < smalls; i++){
float radius = rand.random(1, 8), ax = rand.random(radius, width - radius), ay = rand.random(radius, height - radius);
@@ -61,15 +61,15 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
pass((x, y) -> {
if(floor != Blocks.space){
if(Ridged.noise2d(seed, x, y, foct, fper, 1f / fscl) > fmag){
floor = Blocks.graphiticStone;
floor = Blocks.stone;
}
}
});
pass((x, y) -> {
if(floor == Blocks.space || Ridged.noise2d(seed + 1, x, y, 3, 0.5f, 1f / 70f) > 0.5f) return;
if(floor == Blocks.space || Ridged.noise2d(seed + 1, x, y, 3, 0.5f, 1f / 60f) > 0.38f || Mathf.within(x, y, sx, sy, 20 + Ridged.noise2d(seed, x, y, 3, 0.5f, 1f / 30f) * 6f)) return;
int radius = 5;
int radius = 6;
for(int dx = x - radius; dx <= x + radius; dx++){
for(int dy = y - radius; dy <= y + radius; dy++){
if(Mathf.within(dx, dy, x, y, radius + 0.0001f) && tiles.in(dx, dy) && tiles.getn(dx, dy).floor() == Blocks.space){
@@ -82,6 +82,11 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
});
pass((x, y) -> {
if(floor == Blocks.ferricStone && rand.chance(0.02)) floor = Blocks.ferricCraters;
if(floor == Blocks.stone && rand.chance(0.02)) floor = Blocks.craters;
});
Schematics.placeLaunchLoadout(sx, sy);
state.rules.environment = Env.space;
@@ -89,6 +94,6 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
@Override
public int getSectorSize(Sector sector){
return 450;
return 500;
}
}

View File

@@ -48,6 +48,7 @@ public class MassDriver extends Block{
hasPower = true;
outlineIcon = true;
sync = true;
envEnabled |= Env.space;
//point2 is relative
config(Point2.class, (MassDriverBuild tile, Point2 point) -> tile.link = Point2.pack(point.x + tile.tileX(), point.y + tile.tileY()));

View File

@@ -10,6 +10,7 @@ public class StaticTree extends StaticWall{
public StaticTree(String name){
super(name);
variants = 0;
}
@Override