Added sectors to tech tree / Bugfixes

This commit is contained in:
Anuken
2020-07-30 23:13:06 -04:00
parent ff990925f0
commit a4ddf90ef5
8 changed files with 113 additions and 93 deletions

View File

@@ -1,10 +1,8 @@
package mindustry.content;
import mindustry.ctype.*;
import mindustry.game.Objectives.*;
import mindustry.type.*;
import static arc.struct.Seq.*;
import static mindustry.content.Planets.*;
public class SectorPresets implements ContentList{
@@ -29,112 +27,52 @@ public class SectorPresets implements ContentList{
saltFlats = new SectorPreset("saltFlats", serpulo, 101){{
conditionWave = 10;
launchPeriod = 5;
requirements = with(
new SectorWave(groundZero, 60),
//new Unlock(Blocks.daggerFactory),
//new Unlock(Blocks.draugFactory),
new Research(Blocks.door),
new Research(Blocks.waterExtractor)
);
}};
frozenForest = new SectorPreset("frozenForest", serpulo, 86){{
conditionWave = 10;
requirements = with(
new SectorWave(groundZero, 10),
new Research(Blocks.junction),
new Research(Blocks.router)
);
}};
craters = new SectorPreset("craters", serpulo, 18){{
conditionWave = 10;
requirements = with(
new SectorWave(frozenForest, 10),
new Research(Blocks.mender),
new Research(Blocks.combustionGenerator)
);
}};
ruinousShores = new SectorPreset("ruinousShores", serpulo, 19){{
conditionWave = 20;
launchPeriod = 20;
requirements = with(
new SectorWave(groundZero, 20),
new SectorWave(craters, 15),
new Research(Blocks.graphitePress),
new Research(Blocks.combustionGenerator),
new Research(Blocks.kiln),
new Research(Blocks.mechanicalPump)
);
}};
stainedMountains = new SectorPreset("stainedMountains", serpulo, 20){{
conditionWave = 10;
launchPeriod = 10;
requirements = with(
new SectorWave(frozenForest, 15),
new Research(Blocks.pneumaticDrill),
new Research(Blocks.powerNode),
new Research(Blocks.turbineGenerator)
);
}};
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
requirements = with(
new SectorWave(stainedMountains, 15),
//new Unlock(Blocks.daggerFactory),
//new Unlock(Blocks.crawlerFactory),
new Research(Blocks.door),
new Research(Blocks.siliconSmelter)
);
}};
overgrowth = new SectorPreset("overgrowth", serpulo, 22){{
conditionWave = 12;
launchPeriod = 4;
requirements = with(
new SectorWave(craters, 40),
new Launched(fungalPass),
new Research(Blocks.cultivator),
new Research(Blocks.sporePress)
//new Unlock(Blocks.titanFactory),
//new Unlock(Blocks.wraithFactory)
);
}};
tarFields = new SectorPreset("tarFields", serpulo, 23){{
conditionWave = 15;
launchPeriod = 10;
requirements = with(
new SectorWave(ruinousShores, 20),
new Research(Blocks.coalCentrifuge),
new Research(Blocks.conduit),
new Research(Blocks.wave)
);
}};
desolateRift = new SectorPreset("desolateRift", serpulo, 123){{
conditionWave = 3;
launchPeriod = 2;
requirements = with(
new SectorWave(tarFields, 20),
new Research(Blocks.thermalGenerator),
new Research(Blocks.thoriumReactor)
);
}};
nuclearComplex = new SectorPreset("nuclearComplex", serpulo, 130){{
conditionWave = 30;
launchPeriod = 15;
requirements = with(
new Launched(fungalPass),
new Research(Blocks.thermalGenerator),
new Research(Blocks.laserDrill)
);
}};
/*
crags = new Zone("crags", new MapGenerator("crags").dist(2f)){{
loadout = Loadouts.basicFoundation;

View File

@@ -11,6 +11,8 @@ import mindustry.type.*;
import mindustry.world.*;
import static mindustry.content.Blocks.*;
import static mindustry.content.SectorPresets.*;
import static mindustry.content.SectorPresets.craters;
import static mindustry.content.UnitTypes.*;
import static mindustry.type.ItemStack.*;
@@ -405,17 +407,87 @@ public class TechTree implements ContentList{
});
//TODO research sectors
/*
node(SectorPresets.groundZero, () -> {
node(SectorPresets.nuclearComplex, () -> {
node(SectorPresets.craters, () -> {
node(SectorPresets.saltFlats, () -> {
node(groundZero, () -> {
node(frozenForest, Seq.with(
new SectorComplete(groundZero),
new Research(junction),
new Research(router)
), () -> {
node(craters, Seq.with(
new SectorComplete(frozenForest),
new Research(mender),
new Research(combustionGenerator)
), () -> {
node(ruinousShores, Seq.with(
new SectorComplete(craters),
new Research(graphitePress),
new Research(combustionGenerator),
new Research(kiln),
new Research(mechanicalPump)
), () -> {
node(tarFields, Seq.with(
new SectorComplete(ruinousShores),
new Research(coalCentrifuge),
new Research(conduit),
new Research(wave)
), () -> {
node(desolateRift, Seq.with(
new SectorComplete(tarFields),
new Research(thermalGenerator),
new Research(thoriumReactor)
), () -> {
});
});
node(saltFlats, Seq.with(
new SectorComplete(ruinousShores),
new Research(groundFactory),
new Research(airFactory),
new Research(door),
new Research(waterExtractor)
), () -> {
});
});
node(overgrowth, Seq.with(
new SectorComplete(craters),
new SectorComplete(fungalPass),
new Research(cultivator),
new Research(sporePress),
new Research(UnitTypes.mace),
new Research(UnitTypes.flare)
), () -> {
});
});
node(stainedMountains, Seq.with(
new SectorComplete(frozenForest),
new Research(pneumaticDrill),
new Research(powerNode),
new Research(turbineGenerator)
), () -> {
node(fungalPass, Seq.with(
new SectorComplete(stainedMountains),
new Research(groundFactory),
new Research(door),
new Research(siliconSmelter)
), () -> {
node(nuclearComplex, Seq.with(
new SectorComplete(fungalPass),
new Research(thermalGenerator),
new Research(laserDrill)
), () -> {
});
});
});
});
});
*/
});
}
@@ -448,6 +520,12 @@ public class TechTree implements ContentList{
return new TechNode(content, requirements, children);
}
private static TechNode node(UnlockableContent content, Seq<Objective> objectives, Runnable children){
TechNode node = new TechNode(content, empty, children);
node.objectives = objectives;
return node;
}
private static TechNode node(UnlockableContent block){
return node(block, () -> {});
}