Files
Mindustry/core/src/mindustry/content/ErekirTechTree.java

362 lines
13 KiB
Java
Raw Normal View History

2021-11-28 13:48:06 -05:00
package mindustry.content;
2021-12-25 22:17:18 -05:00
import arc.struct.*;
2022-02-28 18:50:04 -05:00
import arc.util.*;
import mindustry.entities.bullet.*;
2021-12-25 22:17:18 -05:00
import mindustry.game.Objectives.*;
2021-12-28 16:00:25 -05:00
import mindustry.type.*;
2022-02-28 18:50:04 -05:00
import mindustry.type.unit.*;
import mindustry.world.blocks.defense.turrets.*;
2021-12-25 22:17:18 -05:00
2022-02-28 18:50:04 -05:00
import static mindustry.Vars.*;
2021-11-28 13:48:06 -05:00
import static mindustry.content.Blocks.*;
2022-01-22 16:49:18 -05:00
import static mindustry.content.SectorPresets.*;
2021-11-28 13:48:06 -05:00
import static mindustry.content.TechTree.*;
public class ErekirTechTree{
2022-02-28 18:50:04 -05:00
static IntSet balanced = new IntSet();
static void rebalanceBullet(BulletType bullet){
if(balanced.add(bullet.id)){
bullet.damage *= 0.7f;
}
}
//TODO remove this
public static void rebalance(){
for(var unit : content.units().select(u -> u instanceof ErekirUnitType)){
for(var weapon : unit.weapons){
rebalanceBullet(weapon.bullet);
}
}
for(var block : content.blocks()){
if(block instanceof Turret turret && Structs.contains(block.requirements, i -> !Items.serpuloItems.contains(i.item))){
if(turret instanceof ItemTurret item){
for(var bullet : item.ammoTypes.values()){
rebalanceBullet(bullet);
}
}else if(turret instanceof ContinuousTurret cont){
rebalanceBullet(cont.shootType);
}else if(turret instanceof ContinuousLiquidTurret cont){
for(var bullet : cont.ammoTypes.values()){
rebalanceBullet(bullet);
}
}
}
}
}
2021-11-28 13:48:06 -05:00
public static void load(){
2022-02-28 18:50:04 -05:00
rebalance();
2022-01-26 00:13:43 -05:00
//TODO might be unnecessary with no asteroids
2021-12-25 22:17:18 -05:00
Seq<Objective> erekirSector = Seq.with(new OnPlanet(Planets.erekir));
2021-12-28 16:00:25 -05:00
var costMultipliers = new ObjectFloatMap<Item>();
2022-02-04 21:05:01 -05:00
costMultipliers.put(Items.silicon, 9);
2021-12-28 16:00:25 -05:00
costMultipliers.put(Items.surgeAlloy, 4);
2022-01-23 14:37:08 -05:00
costMultipliers.put(Items.phaseFabric, 4);
2022-01-23 15:45:40 -05:00
costMultipliers.put(Items.thorium, 9);
2022-02-05 21:51:29 -05:00
costMultipliers.put(Items.graphite, 9);
2022-02-13 21:43:45 -05:00
//oxide is hard to make
costMultipliers.put(Items.oxide, 0.5f);
2021-12-28 16:00:25 -05:00
//TODO remove
Objective tmpNever = new Research(Items.fissileMatter);
2022-01-24 13:50:47 -05:00
//TODO gate behind capture
2021-12-10 12:25:35 -05:00
Planets.erekir.techTree = nodeRoot("erekir", coreBastion, true, () -> {
2022-02-15 19:11:49 -05:00
//context().researchCostMultipliers = costMultipliers;
2022-01-26 00:13:43 -05:00
node(duct, erekirSector, () -> {
2022-02-20 15:52:49 -05:00
node(ductRouter, () -> {
2021-11-28 13:48:06 -05:00
node(ductBridge, () -> {
node(surgeConveyor, () -> {
node(surgeRouter);
});
2021-11-29 20:12:43 -05:00
node(unitCargoLoader, () -> {
node(unitCargoUnloadPoint, () -> {
});
});
2021-11-28 13:48:06 -05:00
});
2022-02-20 15:52:49 -05:00
node(overflowDuct, Seq.with(new OnSector(two)), () -> {
node(reinforcedContainer, () -> {
2022-01-27 14:15:30 -05:00
node(ductUnloader, () -> {
2021-11-28 13:48:06 -05:00
2022-01-27 14:15:30 -05:00
});
2021-11-28 13:48:06 -05:00
node(reinforcedVault, () -> {
2021-11-28 13:48:06 -05:00
});
2021-11-28 13:48:06 -05:00
});
});
});
2021-11-28 20:51:26 -05:00
node(reinforcedPayloadConveyor, Seq.with(new OnSector(four)), () -> {
//TODO should only be unlocked in unit sector
node(constructor, Seq.with(new Research(siliconArcFurnace), new OnSector(four)), () -> {
2022-02-14 16:33:07 -05:00
node(payloadMassDriver, Seq.with(new OnSector(five)), () -> {
//TODO further limitations
node(payloadLoader, () -> {
node(payloadUnloader, () -> {
node(payloadPropulsionTower, () -> {
});
});
});
2022-02-05 21:51:29 -05:00
node(smallDeconstructor, () -> {
node(largeConstructor, () -> {
2021-11-28 20:51:26 -05:00
});
2021-11-28 20:51:26 -05:00
node(deconstructor, () -> {
2021-11-28 20:51:26 -05:00
});
});
2021-11-28 20:51:26 -05:00
});
});
2021-12-06 14:30:54 -05:00
node(reinforcedPayloadRouter, () -> {
2021-12-06 14:30:54 -05:00
2021-11-28 20:51:26 -05:00
});
});
});
2022-01-23 16:57:09 -05:00
//TODO move into turbine condenser?
node(plasmaBore, () -> {
2022-02-20 13:39:41 -05:00
node(impactDrill, Seq.with(new OnSector(two)), () -> {
2022-02-14 20:31:28 -05:00
node(largePlasmaBore, Seq.with(new OnSector(five)), () -> {
2022-01-23 16:57:09 -05:00
node(eruptionDrill, () -> {
});
});
});
});
2021-11-28 20:51:26 -05:00
node(turbineCondenser, () -> {
node(beamNode, () -> {
2022-02-20 13:39:41 -05:00
node(ventCondenser, Seq.with(new OnSector(two)), () -> {
2022-01-31 15:50:29 -05:00
node(chemicalCombustionChamber, Seq.with(new OnSector(three)), () -> {
2021-12-10 12:25:35 -05:00
node(pyrolysisGenerator, () -> {
2021-12-01 19:31:59 -05:00
2021-12-10 12:25:35 -05:00
});
2021-12-02 17:37:18 -05:00
});
2021-12-01 19:31:59 -05:00
});
2022-02-05 21:51:29 -05:00
node(beamTower, Seq.with(new OnSector(four)), () -> {
2021-11-28 20:51:26 -05:00
});
2021-12-22 16:43:22 -05:00
node(regenProjector, () -> {
//TODO more tiers of build tower or "support" structures like overdrive projectors
2022-02-14 20:35:34 -05:00
node(buildTower, Seq.with(new OnSector(five)), () -> {
2021-12-22 16:43:22 -05:00
});
2021-11-28 20:51:26 -05:00
});
});
2021-12-10 12:25:35 -05:00
2022-02-20 13:39:41 -05:00
node(reinforcedConduit, Seq.with(new OnSector(two)), () -> {
2022-01-27 15:01:01 -05:00
//TODO maybe should be even later
2022-01-31 15:50:29 -05:00
node(reinforcedPump, Seq.with(new OnSector(three)), () -> {
2022-01-27 15:01:01 -05:00
//TODO T2 pump, consume cyanogen or similar
2022-01-23 16:57:09 -05:00
});
2021-12-10 12:25:35 -05:00
2022-01-23 16:57:09 -05:00
node(reinforcedLiquidJunction, () -> {
node(reinforcedBridgeConduit, () -> {
2021-12-09 17:16:32 -05:00
2022-01-23 16:57:09 -05:00
});
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
node(reinforcedLiquidRouter, () -> {
node(reinforcedLiquidContainer, () -> {
2022-01-31 15:50:29 -05:00
node(reinforcedLiquidTank, Seq.with(new SectorComplete(three)), () -> {
2021-11-28 20:51:26 -05:00
});
});
});
2022-01-23 16:57:09 -05:00
});
});
2021-11-28 20:51:26 -05:00
2022-02-20 15:35:14 -05:00
node(cliffCrusher, () -> {
node(siliconArcFurnace, () -> {
2022-01-31 15:50:29 -05:00
node(electrolyzer, Seq.with(new OnSector(three)), () -> {
2022-01-23 16:57:09 -05:00
node(oxidationChamber, () -> {
2022-02-05 21:51:29 -05:00
node(electricHeater, Seq.with(new OnSector(four)), () -> {
2022-01-23 16:57:09 -05:00
node(heatRedirector, () -> {
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
});
2021-11-28 20:51:26 -05:00
2022-02-13 15:59:02 -05:00
node(atmosphericConcentrator, Seq.with(new OnSector(four)), () -> {
2022-02-14 16:33:07 -05:00
node(cyanogenSynthesizer, Seq.with(new OnSector(five)), () -> {
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
});
});
2021-11-28 20:51:26 -05:00
2022-02-13 15:59:02 -05:00
node(carbideCrucible, Seq.with(tmpNever), () -> {
2022-01-23 16:57:09 -05:00
node(surgeCrucible, () -> {
node(phaseSynthesizer, () -> {
node(phaseHeater, () -> {
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
});
});
});
});
});
});
2021-11-28 20:51:26 -05:00
2022-02-05 21:51:29 -05:00
node(slagIncinerator, Seq.with(new OnSector(four)), () -> {
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
node(slagCentrifuge, () -> {
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
});
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
node(heatReactor, () -> {
2021-11-28 20:51:26 -05:00
2022-01-23 16:57:09 -05:00
});
2021-11-28 20:51:26 -05:00
});
});
});
});
});
2022-03-01 10:32:36 -05:00
node(radar, Seq.with(new Research(beamNode), new Research(turbineCondenser)), () -> {
node(breach, Seq.with(new Research(siliconArcFurnace), new OnSector(two)), () -> {
node(berylliumWall, () -> {
node(berylliumWallLarge, () -> {
2021-12-24 14:18:25 -05:00
2022-03-01 10:32:36 -05:00
});
2021-12-24 14:18:25 -05:00
2022-03-01 10:32:36 -05:00
node(tungstenWall, () -> {
node(tungstenWallLarge, () -> {
2021-12-24 14:18:25 -05:00
2022-03-01 10:32:36 -05:00
});
2022-02-20 13:32:25 -05:00
2022-03-01 10:32:36 -05:00
node(carbideWall, () -> {
node(carbideWallLarge, () -> {
2022-02-20 13:32:25 -05:00
2022-03-01 10:32:36 -05:00
});
2022-02-20 13:32:25 -05:00
});
});
2021-12-24 14:18:25 -05:00
});
2021-11-28 20:51:26 -05:00
2022-03-01 10:32:36 -05:00
node(sublimate, () -> {
//TODO implement
node(titan, Seq.with(new OnSector(five)), () -> {
2021-12-08 21:57:10 -05:00
2022-03-01 10:32:36 -05:00
});
2022-02-11 20:08:59 -05:00
2022-03-01 10:32:36 -05:00
node(disperse, Seq.with(new OnSector(five)), () -> {
2022-02-11 20:08:59 -05:00
2022-03-01 10:32:36 -05:00
});
2022-02-11 20:08:59 -05:00
});
2021-11-28 20:51:26 -05:00
});
});
2022-02-05 21:51:29 -05:00
node(coreCitadel, Seq.with(new SectorComplete(four)), () -> {
2021-11-28 20:51:26 -05:00
node(coreAcropolis, () -> {
});
});
2022-02-20 13:32:25 -05:00
node(fabricator, () -> {
node(UnitTypes.stell, Seq.with(new Research(siliconArcFurnace), new Research(plasmaBore), new Research(turbineCondenser)), () -> {
});
2022-02-20 13:32:25 -05:00
node(tankAssembler, Seq.with(new OnSector(four), new Research(constructor), new Research(atmosphericConcentrator)), () -> {
node(UnitTypes.vanquish, () -> {
node(UnitTypes.conquer, Seq.with(tmpNever), () -> {
});
});
2022-02-20 13:32:25 -05:00
node(shipAssembler, Seq.with(new OnSector(five)), () -> {
node(UnitTypes.quell, () -> {
node(UnitTypes.disrupt, Seq.with(tmpNever), () -> {
});
});
node(mechAssembler, Seq.with(tmpNever), () -> {
node(UnitTypes.bulwark, () -> {
node(UnitTypes.krepost, Seq.with(tmpNever), () -> {
2022-02-20 13:32:25 -05:00
});
});
});
});
});
});
2022-01-22 16:49:18 -05:00
//TODO more sectors
node(onset, () -> {
2022-02-20 15:52:49 -05:00
node(two, Seq.with(new SectorComplete(onset), new Research(ductRouter), new Research(ductBridge)), () -> {
2022-02-20 13:39:41 -05:00
node(three, Seq.with(new SectorComplete(two), new Research(reinforcedContainer), new Research(ductUnloader), new Research(ventCondenser)), () -> {
2022-02-05 21:51:29 -05:00
node(four, Seq.with(new SectorComplete(three), new Research(electrolyzer), new Research(oxidationChamber), new Research(chemicalCombustionChamber)), () -> {
2022-02-14 16:33:07 -05:00
//TODO research reqs?
node(five, Seq.with(new SectorComplete(four)), () -> {
2022-01-22 16:49:18 -05:00
2022-02-14 16:33:07 -05:00
});
2022-02-05 21:51:29 -05:00
});
2022-01-31 15:50:29 -05:00
});
2022-01-26 00:13:43 -05:00
});
2022-01-22 16:49:18 -05:00
});
2021-11-28 20:51:26 -05:00
nodeProduce(Items.beryllium, () -> {
2022-03-02 21:03:45 -05:00
nodeProduce(Items.sand, () -> {
nodeProduce(Items.silicon, () -> {
nodeProduce(Items.oxide, () -> {
nodeProduce(Items.fissileMatter, () -> {
2021-11-28 20:51:26 -05:00
2022-02-20 13:32:25 -05:00
});
});
2021-11-28 20:51:26 -05:00
});
2022-03-02 21:03:45 -05:00
});
2021-11-28 20:51:26 -05:00
2022-03-02 21:03:45 -05:00
nodeProduce(Liquids.water, () -> {
nodeProduce(Liquids.ozone, () -> {
nodeProduce(Liquids.hydrogen, () -> {
nodeProduce(Liquids.nitrogen, () -> {
nodeProduce(Liquids.cyanogen, () -> {
2021-11-28 20:51:26 -05:00
2022-02-20 13:32:25 -05:00
});
2021-11-28 20:51:26 -05:00
});
});
});
2022-03-02 21:03:45 -05:00
});
2021-11-28 20:51:26 -05:00
2022-03-02 21:03:45 -05:00
nodeProduce(Items.graphite, () -> {
2022-02-20 13:32:25 -05:00
nodeProduce(Items.tungsten, () -> {
nodeProduce(Liquids.slag, () -> {
2021-11-28 20:51:26 -05:00
2021-11-29 10:02:03 -05:00
});
2022-02-20 13:32:25 -05:00
nodeProduce(Items.thorium, () -> {
nodeProduce(Items.carbide, () -> {
nodeProduce(Items.surgeAlloy, () -> {
nodeProduce(Items.phaseFabric, () -> {
});
});
nodeProduce(Liquids.gallium, () -> {
nodeProduce(Items.scrap, () -> {
});
});
});
});
2021-11-28 20:51:26 -05:00
});
});
});
2021-11-28 13:48:06 -05:00
});
}
}