New WIP sector preset

This commit is contained in:
Anuken 2022-01-26 00:13:43 -05:00
parent cd68b4b410
commit 121ae08240
15 changed files with 74 additions and 23 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -561,7 +561,7 @@ requirement.research = Research {0}
requirement.produce = Produce {0}
requirement.capture = Capture {0}
requirement.onplanet = Control Sector On {0}
requirement.onsector = Land On Sector {0}
requirement.onsector = Land On Sector: {0}
launch.text = Launch
research.multiplayer = Only the host can research items.
map.multiplayer = Only the host can view sectors.

View file

@ -516,3 +516,4 @@
63187=red-dimaond-wall|block-red-dimaond-wall-ui
63186=red-stone-boulder|block-red-stone-boulder-ui
63185=red-diamond-wall|block-red-diamond-wall-ui
63184=crystal-orbs|block-crystal-orbs-ui

BIN
core/assets/maps/aware.msav Normal file

Binary file not shown.

View file

@ -50,7 +50,7 @@ public class Blocks{
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, grass, salt,
//boulders
shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, carbonBoulder, ferricBoulder, beryllicBoulder, yellowStoneBoulder,
arkyicBoulder, crystalCluster, vibrantCrystalCluster, crystalBlocks, crystallineBoulder, redIceBoulder, rhyoliteBoulder, redStoneBoulder,
arkyicBoulder, crystalCluster, vibrantCrystalCluster, crystalBlocks, crystalOrbs, crystallineBoulder, redIceBoulder, rhyoliteBoulder, redStoneBoulder,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
pebbles, tendrils,
@ -705,6 +705,13 @@ public class Blocks{
shadowOffset = -2.5f;
}};
crystalOrbs = new TallBlock("crystal-orbs"){{
variants = 3;
clipSize = 128f;
shadowAlpha = 0.5f;
shadowOffset = -2.5f;
}};
crystallineBoulder = new Prop("crystalline-boulder"){{
variants = 2;
crystallineStone.asFloor().decoration = this;
@ -725,7 +732,6 @@ public class Blocks{
denseRedStone.asFloor().decoration = redStone.asFloor().decoration = this;
}};
metalFloor = new Floor("metal-floor", 0);
metalFloorDamaged = new Floor("metal-floor-damaged", 3);

View file

@ -11,6 +11,7 @@ import static mindustry.content.TechTree.*;
public class ErekirTechTree{
public static void load(){
//TODO might be unnecessary with no asteroids
Seq<Objective> erekirSector = Seq.with(new OnPlanet(Planets.erekir));
var costMultipliers = new ObjectFloatMap<Item>();
@ -25,7 +26,7 @@ public class ErekirTechTree{
Planets.erekir.techTree = nodeRoot("erekir", coreBastion, true, () -> {
context().researchCostMultipliers = costMultipliers;
node(duct, () -> {
node(duct, erekirSector, () -> {
node(ductRouter, () -> {
node(ductBridge, () -> {
node(surgeConveyor, () -> {
@ -76,8 +77,7 @@ public class ErekirTechTree{
//TODO move into turbine condenser?
node(plasmaBore, () -> {
node(impactDrill, erekirSector, () -> {
node(impactDrill, Seq.with(new OnSector(aware)), () -> {
node(largePlasmaBore, () -> {
node(eruptionDrill, () -> {
@ -88,7 +88,7 @@ public class ErekirTechTree{
node(turbineCondenser, () -> {
node(beamNode, () -> {
node(ventCondenser, erekirSector, () -> {
node(ventCondenser, Seq.with(new OnSector(aware)), () -> {
node(chemicalCombustionChamber, () -> {
node(pyrolysisGenerator, () -> {
@ -109,8 +109,9 @@ public class ErekirTechTree{
});
});
node(reinforcedConduit, erekirSector, () -> {
node(reinforcedPump, () -> {
node(reinforcedConduit, () -> {
//TODO so should this be *on* or *complete*?
node(reinforcedPump, Seq.with(new SectorComplete(aware)), () -> {
//TODO T2 pump
});
@ -131,7 +132,7 @@ public class ErekirTechTree{
node(siliconArcFurnace, () -> {
node(cliffCrusher, () -> {
node(electrolyzer, erekirSector, () -> {
node(electrolyzer, () -> {
node(oxidationChamber, () -> {
node(electricHeater, () -> {
node(heatRedirector, () -> {
@ -201,7 +202,9 @@ public class ErekirTechTree{
//TODO more sectors
node(onset, () -> {
node(aware, Seq.with(new SectorComplete(onset), new Research(ductRouter)), () -> {
});
});
nodeProduce(Items.beryllium, () -> {

View file

@ -12,7 +12,7 @@ public class SectorPresets{
impact0078, desolateRift, nuclearComplex, planetaryTerminal,
coastline, navalFortress,
onset
onset, aware
;
public static void load(){
@ -118,6 +118,11 @@ public class SectorPresets{
difficulty = 1;
}};
aware = new SectorPreset("aware", erekir, 88){{
captureWave = 5;
difficulty = 3;
}};
//endregion
}
}

View file

@ -115,15 +115,21 @@ public class MapRenderer implements Disposable{
boolean center = tile.isCenter();
boolean useSyntheticWall = wall.synthetic() || overlay.wallOre;
//draw synthetic wall or floor
//draw synthetic wall or floor OR standard wall if wall ore
if(wall != Blocks.air && useSyntheticWall){
region = !center ? clearEditor : getIcon(wall, idxWall);
float width = region.width * Draw.scl, height = region.height * Draw.scl;
float width = region.width * Draw.scl, height = region.height * Draw.scl, ox = wall.offset + (tilesize - width) / 2f, oy = wall.offset + (tilesize - height) / 2f;
//force fit to tile
if(overlay.wallOre && !wall.synthetic()){
width = height = tilesize;
ox = oy = 0f;
}
mesh.draw(idxWall, region,
wx * tilesize + wall.offset + (tilesize - width) / 2f,
wy * tilesize + wall.offset + (tilesize - height) / 2f,
wx * tilesize + ox,
wy * tilesize + oy,
width, height,
tile.build == null || !wall.rotate ? 0 : tile.build.rotdeg());
}else{
@ -159,10 +165,8 @@ public class MapRenderer implements Disposable{
float width = region.width * Draw.scl, height = region.height * Draw.scl;
if(!wall.synthetic() && wall != Blocks.air && !wall.isMultiblock()){
offsetX = 0;
offsetY = 0;
width = tilesize;
height = tilesize;
offsetX = offsetY = 0f;
width = height = tilesize;
}
mesh.draw(idxDecal, region, wx * tilesize + offsetX, wy * tilesize + offsetY, width, height);

View file

@ -364,6 +364,20 @@ public abstract class BasicGenerator implements WorldGenerator{
return false;
}
public void removeWall(int cx, int cy, int rad, Boolf<Block> pred){
for(int x = -rad; x <= rad; x++){
for(int y = -rad; y <= rad; y++){
int wx = cx + x, wy = cy + y;
if(Structs.inBounds(wx, wy, width, height) && Mathf.within(x, y, rad)){
Tile other = tiles.getn(wx, wy);
if(pred.get(other.block())){
other.setBlock(Blocks.air);
}
}
}
}
}
public boolean near(int cx, int cy, int rad, Block block){
for(int x = -rad; x <= rad; x++){
for(int y = -rad; y <= rad; y++){

View file

@ -93,8 +93,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
position = Tmp.v32;
//TODO arkycite should NOT generate around slag.
//TODO tweak this to make it more natural
//TODO edge distortion?
if(ice < redThresh - noArkThresh && Ridged.noise3d(seed + arkSeed, position.x + 2f, position.y + 8f, position.z + 1f, arkOct, arkScl) > arkThresh){
@ -104,7 +102,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
if(ice > redThresh){
result = Blocks.redStone;
}else if(ice > redThresh - 0.33f){
}else if(ice > redThresh - 0.3f){
result = Blocks.regolith;
}
@ -160,6 +158,9 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
cells(4);
//TODO: yellow regolith biome tweaks
//TODO: crystal biome
float length = width/3f;
Vec2 trns = Tmp.v1.trns(rand.random(360f), length);
int
@ -259,6 +260,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
}else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.665f){
ore = Blocks.wallOreBeryl;
}
}
}else if(!nearWall(x, y)){
@ -280,12 +282,19 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
if(block == Blocks.air && (floor == Blocks.crystallineStone || floor == Blocks.crystalFloor) && rand.chance(0.09) && nearWall(x, y)
&& !near(x, y, 4, Blocks.crystalCluster) && !near(x, y, 4, Blocks.vibrantCrystalCluster)){
block = floor == Blocks.crystalFloor ? Blocks.vibrantCrystalCluster : Blocks.crystalCluster;
ore = Blocks.air;
}
if(block == Blocks.arkyicWall && rand.chance(0.2) && nearAir(x, y) && !near(x, y, 3, Blocks.crystalOrbs)){
block = Blocks.crystalOrbs;
ore = Blocks.air;
}
//TODO test, different placement
//TODO this biome should have more blocks in general
if(block == Blocks.regolithWall && rand.chance(0.2) && nearAir(x, y) && !near(x, y, 3, Blocks.crystalBlocks)){
if(block == Blocks.regolithWall && rand.chance(0.3) && nearAir(x, y) && !near(x, y, 3, Blocks.crystalBlocks)){
block = Blocks.crystalBlocks;
ore = Blocks.air;
}
//this is annoying as blocks under it can't be seen
@ -294,8 +303,17 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
//}
});
//remove props near ores, they're too annoying
//TODO for standard ores too maybe?
pass((x, y) -> {
if(ore.asFloor().wallOre || block.itemDrop != null){
removeWall(x, y, 3, b -> b instanceof TallBlock);
}
});
trimDark();
//TODO vents everywhere!
//vents
outer:
for(Tile tile : tiles){