Added basic multi-unit factories

This commit is contained in:
Anuken
2020-04-13 16:56:33 -04:00
parent d860977144
commit 2af12a632a
17 changed files with 2209 additions and 2587 deletions

View File

@@ -4,7 +4,6 @@ import arc.*;
import arc.graphics.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.struct.*;
import arc.util.*;
import mindustry.*;
import mindustry.ctype.*;
@@ -76,8 +75,7 @@ public class Blocks implements ContentList{
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
//units
commandCenter, draugFactory, spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, crawlerFactory, titanFactory,
fortressFactory, repairPoint
groundFactory, repairPoint
//upgrades
//dartPad, alphaPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad;
@@ -1655,6 +1653,19 @@ public class Blocks implements ContentList{
//endregion
//region units
//for testing only.
groundFactory = new UnitFactory("ground-factory"){{
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.dagger, 60f, ItemStack.with(Items.silicon, 10)),
new UnitPlan(UnitTypes.wraith, 60f, ItemStack.with(Items.silicon, 10)),
};
size = 3;
consumes.power(1.2f);
consumes.items(new ItemStack(Items.silicon, 10));
}};
/*
draugFactory = new UnitFactory("draug-factory"){{
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
unitType = UnitTypes.draug;
@@ -1750,7 +1761,7 @@ public class Blocks implements ContentList{
size = 3;
consumes.power(1.4f);
consumes.items(new ItemStack(Items.silicon, 20), new ItemStack(Items.graphite, 10));
}};
}};*/
repairPoint = new RepairPoint("repair-point"){{
requirements(Category.units, ItemStack.with(Items.lead, 15, Items.copper, 15, Items.silicon, 15));
@@ -1869,6 +1880,7 @@ public class Blocks implements ContentList{
//looked up by name, no ref needed
new LegacyMechPad("legacy-mech-pad");
new LegacyUnitFactory("legacy-unit-factory");
//endregion
}

View File

@@ -276,6 +276,7 @@ public class TechTree implements ContentList{
});
});
/*
node(draugFactory, () -> {
node(spiritFactory, () -> {
node(phantomFactory);

View File

@@ -91,8 +91,8 @@ public class Zones implements ContentList{
resources = with(copper, scrap, lead, coal, sand, titanium);
requirements = with(
new ZoneWave(desertWastes, 60),
new Unlock(Blocks.daggerFactory),
new Unlock(Blocks.draugFactory),
//new Unlock(Blocks.daggerFactory),
//new Unlock(Blocks.draugFactory),
new Unlock(Blocks.door),
new Unlock(Blocks.waterExtractor)
);
@@ -157,8 +157,8 @@ public class Zones implements ContentList{
configureObjective = new Launched(this);
requirements = with(
new ZoneWave(stainedMountains, 15),
new Unlock(Blocks.daggerFactory),
new Unlock(Blocks.crawlerFactory),
//new Unlock(Blocks.daggerFactory),
//new Unlock(Blocks.crawlerFactory),
new Unlock(Blocks.door),
new Unlock(Blocks.siliconSmelter)
);
@@ -175,9 +175,9 @@ public class Zones implements ContentList{
new ZoneWave(craters, 40),
new Launched(fungalPass),
new Unlock(Blocks.cultivator),
new Unlock(Blocks.sporePress),
new Unlock(Blocks.titanFactory),
new Unlock(Blocks.wraithFactory)
new Unlock(Blocks.sporePress)
//new Unlock(Blocks.titanFactory),
//new Unlock(Blocks.wraithFactory)
);
}};