Added massive amount of partially-unfinished content to recipe menu

This commit is contained in:
Anuken
2018-06-30 20:59:05 -04:00
parent cb6090c773
commit cc5910f997
92 changed files with 1015 additions and 785 deletions

View File

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

View File

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

View File

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

View File

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

View File

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

View File

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 346 B

View File

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

View File

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

View File

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 181 B

View File

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

View File

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

View File

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

View File

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B

View File

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 256 B

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 196 B

View File

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

View File

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 219 B

View File

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 524 B

View File

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

View File

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

View File

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 306 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 219 B

View File

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

View File

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

View File

@@ -393,7 +393,8 @@ item.thorium.name=Thorium
item.thorium.description=A dense, radioactive metal used as structural support and nuclear fuel. item.thorium.description=A dense, radioactive metal used as structural support and nuclear fuel.
item.silicon.name=Silicon item.silicon.name=Silicon
item.silcion.description=An extremely useful semiconductor, with applications in solar panels and many complex electronics. item.silcion.description=An extremely useful semiconductor, with applications in solar panels and many complex electronics.
item.plasteel.name=Plasteel item.plastanium.name=Plastanium
item.plastanium.description=A light, ductile material used in advanced aircraft and and fragmentation ammunition.
item.phase-matter.name=Phase Matter item.phase-matter.name=Phase Matter
item.surge-alloy.name=Surge Alloy item.surge-alloy.name=Surge Alloy
item.biomatter.name=Biomatter item.biomatter.name=Biomatter
@@ -403,6 +404,11 @@ item.sand.description=A common material that is used extensively in smelting, bo
item.blast-compound.name=Blast Compound item.blast-compound.name=Blast Compound
item.thermite.name=Thermite item.thermite.name=Thermite
liquid.water.name=Water
liquid.lava.name=Lava
liquid.oil.name=Oil
liquid.cryofluid.name=Cryofluid
text.item.explosiveness=[LIGHT_GRAY]Explosiveness: {0} text.item.explosiveness=[LIGHT_GRAY]Explosiveness: {0}
text.item.flammability=[LIGHT_GRAY]Flammability: {0} text.item.flammability=[LIGHT_GRAY]Flammability: {0}
text.item.radioactivity=[LIGHT_GRAY]Radioactivity: {0} text.item.radioactivity=[LIGHT_GRAY]Radioactivity: {0}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

@@ -36,7 +36,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = Fx.none; smokeEffect = Fx.none;
}}; }};
bombIncendiary = new AmmoType(Items.thermite, WeaponBullets.bombIncendiary, 3) {{ bombIncendiary = new AmmoType(Items.pyratite, WeaponBullets.bombIncendiary, 3) {{
shootEffect = Fx.none; shootEffect = Fx.none;
smokeEffect = Fx.none; smokeEffect = Fx.none;
}}; }};
@@ -46,7 +46,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = Fx.none; smokeEffect = Fx.none;
}}; }};
flamerThermite = new AmmoType(Items.thermite, TurretBullets.basicFlame, 3) {{ flamerThermite = new AmmoType(Items.pyratite, TurretBullets.basicFlame, 3) {{
shootEffect = ShootFx.shootSmallFlame; shootEffect = ShootFx.shootSmallFlame;
}}; }};
@@ -82,7 +82,7 @@ public class AmmoTypes implements ContentList {
reloadMultiplier = 1.4f; reloadMultiplier = 1.4f;
}}; }};
bulletThermite = new AmmoType(Items.thermite, StandardBullets.tracer, 3) {{ bulletThermite = new AmmoType(Items.pyratite, StandardBullets.tracer, 3) {{
shootEffect = ShootFx.shootSmall; shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke; smokeEffect = ShootFx.shootSmallSmoke;
inaccuracy = 3f; inaccuracy = 3f;
@@ -100,7 +100,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootSmallSmoke; smokeEffect = ShootFx.shootSmallSmoke;
}}; }};
flakPlastic = new AmmoType(Items.plasteel, FlakBullets.plastic, 5) {{ flakPlastic = new AmmoType(Items.plastanium, FlakBullets.plastic, 5) {{
shootEffect = ShootFx.shootSmall; shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke; smokeEffect = ShootFx.shootSmallSmoke;
}}; }};
@@ -117,7 +117,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
missileIncindiary = new AmmoType(Items.thermite, MissileBullets.incindiary, 1) {{ missileIncindiary = new AmmoType(Items.pyratite, MissileBullets.incindiary, 1) {{
shootEffect = ShootFx.shootBig2; shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
@@ -139,7 +139,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
artilleryPlastic = new AmmoType(Items.plasteel, ArtilleryBullets.plastic, 1) {{ artilleryPlastic = new AmmoType(Items.plastanium, ArtilleryBullets.plastic, 1) {{
shootEffect = ShootFx.shootBig2; shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
@@ -149,7 +149,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
artilleryIncindiary = new AmmoType(Items.thermite, ArtilleryBullets.incindiary, 1) {{ artilleryIncindiary = new AmmoType(Items.pyratite, ArtilleryBullets.incindiary, 1) {{
shootEffect = ShootFx.shootBig2; shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};

View File

@@ -8,8 +8,8 @@ import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.ItemType; import io.anuke.mindustry.type.ItemType;
public class Items implements ContentList{ public class Items implements ContentList{
public static Item stone, tungsten, lead, coal, carbide, titanium, thorium, silicon, plasteel, phasematter, surgealloy, public static Item stone, tungsten, lead, coal, carbide, titanium, thorium, silicon, plastanium, phasematter, surgealloy,
biomatter, sand, blastCompound, thermite; biomatter, sand, blastCompound, pyratite;
@Override @Override
public void load() { public void load() {
@@ -54,7 +54,7 @@ public class Items implements ContentList{
type = ItemType.material; type = ItemType.material;
}}; }};
plasteel = new Item("plasteel", Color.valueOf("e9ead3")) {{ plastanium = new Item("plastanium", Color.valueOf("e9ead3")) {{
type = ItemType.material; type = ItemType.material;
flammability = 0.1f; flammability = 0.1f;
explosiveness = 0.1f; explosiveness = 0.1f;
@@ -82,7 +82,7 @@ public class Items implements ContentList{
explosiveness = 0.6f; explosiveness = 0.6f;
}}; }};
thermite = new Item("thermite", Color.valueOf("ff795e")) {{ pyratite = new Item("pyratite", Color.valueOf("ff795e")) {{
flammability = 0.7f; flammability = 0.7f;
explosiveness = 0.2f; explosiveness = 0.2f;
}}; }};

View File

@@ -12,7 +12,12 @@ public class Liquids implements ContentList {
@Override @Override
public void load() { public void load() {
none = new Liquid("none", Color.CLEAR); none = new Liquid("none", Color.CLEAR){
@Override
public boolean isHidden(){
return true;
}
};
water = new Liquid("water", Color.valueOf("486acd")) { water = new Liquid("water", Color.valueOf("486acd")) {
{ {

View File

@@ -31,25 +31,27 @@ public class Recipes implements ContentList{
new Recipe(weapon, TurretBlocks.scorch, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 20)); new Recipe(weapon, TurretBlocks.scorch, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 20));
new Recipe(weapon, TurretBlocks.hail, new ItemStack(Items.tungsten, 60), new ItemStack(Items.carbide, 35)); new Recipe(weapon, TurretBlocks.hail, new ItemStack(Items.tungsten, 60), new ItemStack(Items.carbide, 35));
new Recipe(weapon, TurretBlocks.lancer, new ItemStack(Items.tungsten, 25), new ItemStack(Items.lead, 25), new ItemStack(Items.silicon, 25)); new Recipe(weapon, TurretBlocks.lancer, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 90));
//TODO arc turret broken new Recipe(weapon, TurretBlocks.wave, new ItemStack(Items.carbide, 60), new ItemStack(Items.titanium, 70), new ItemStack(Items.lead, 150));
//new Recipe(weapon, TurretBlocks.arc, new ItemStack(Items.tungsten, 25), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 30)); new Recipe(weapon, TurretBlocks.swarmer, new ItemStack(Items.carbide, 70), new ItemStack(Items.titanium, 70), new ItemStack(Items.plastanium, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.phasematter, 60));
new Recipe(weapon, TurretBlocks.salvo, new ItemStack(Items.tungsten, 160), new ItemStack(Items.carbide, 190), new ItemStack(Items.thorium, 130));
new Recipe(weapon, TurretBlocks.ripple, new ItemStack(Items.tungsten, 170), new ItemStack(Items.carbide, 220), new ItemStack(Items.thorium, 120));
//DISTRIBUTION //DISTRIBUTION
new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.lead, 1)); new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.lead, 1));
new Recipe(distribution, DistributionBlocks.titaniumconveyor, new ItemStack(Items.lead, 2), new ItemStack(Items.titanium, 1)); new Recipe(distribution, DistributionBlocks.titaniumconveyor, new ItemStack(Items.lead, 2), new ItemStack(Items.titanium, 1));
new Recipe(distribution, DistributionBlocks.phaseConveyor, new ItemStack(Items.phasematter, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.carbide, 20));
//starter tungsten transporation //starter lead transporation
new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.lead, 2)); new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.lead, 2));
new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.lead, 2)); new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.lead, 6));
//advanced carbide transporation //advanced carbide transporation
new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.carbide, 2), new ItemStack(Items.tungsten, 2)); new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.carbide, 2), new ItemStack(Items.tungsten, 2));
new Recipe(distribution, DistributionBlocks.multiplexer, new ItemStack(Items.carbide, 8), new ItemStack(Items.tungsten, 8)); new Recipe(distribution, DistributionBlocks.multiplexer, new ItemStack(Items.carbide, 8), new ItemStack(Items.tungsten, 8));
new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.carbide, 4), new ItemStack(Items.tungsten, 4)); new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.carbide, 4), new ItemStack(Items.tungsten, 4));
new Recipe(distribution, DistributionBlocks.overflowgate, new ItemStack(Items.carbide, 4), new ItemStack(Items.tungsten, 8)); new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.carbide, 4), new ItemStack(Items.tungsten, 8));
new Recipe(distribution, DistributionBlocks.bridgeconveyor, new ItemStack(Items.carbide, 8), new ItemStack(Items.tungsten, 8)); new Recipe(distribution, DistributionBlocks.bridgeConveyor, new ItemStack(Items.carbide, 8), new ItemStack(Items.tungsten, 8));
//CRAFTING //CRAFTING
@@ -58,20 +60,22 @@ public class Recipes implements ContentList{
new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 60), new ItemStack(Items.lead, 50)); new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 60), new ItemStack(Items.lead, 50));
new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50)); new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50));
//other crafting //advanced fabrication
new Recipe(crafting, CraftingBlocks.phaseweaver, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 240), new ItemStack(Items.thorium, 150)); new Recipe(crafting, CraftingBlocks.plastaniumCompressor, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 230), new ItemStack(Items.carbide, 120), new ItemStack(Items.titanium, 160));
new Recipe(crafting, CraftingBlocks.phaseWeaver, new ItemStack(Items.silicon, 260), new ItemStack(Items.lead, 240), new ItemStack(Items.thorium, 150));
//TODO implement alloy smelter //TODO implement alloy smelter
//new Recipe(crafting, CraftingBlocks.alloySmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140)); //new Recipe(crafting, CraftingBlocks.alloySmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140));
// new Recipe(crafting, CraftingBlocks.plasteelcompressor, new ItemStack(Items.silicon, 60), new ItemStack(Items.lead, 170), new ItemStack(Items.titanium, 170));
//misc //misc
new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50)); new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50));
//new Recipe(crafting, CraftingBlocks.thermiteMixer, new ItemStack(Items.tungsten, 100), new ItemStack(Items.lead, 50)); new Recipe(crafting, CraftingBlocks.pyratiteMixer, new ItemStack(Items.tungsten, 100), new ItemStack(Items.lead, 50));
//new Recipe(crafting, CraftingBlocks.blastMixer, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 60), new ItemStack(Items.carbide, 40)); new Recipe(crafting, CraftingBlocks.blastMixer, new ItemStack(Items.lead, 60), new ItemStack(Items.carbide, 40));
new Recipe(crafting, CraftingBlocks.cryofluidmixer, new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 80), new ItemStack(Items.titanium, 90)); new Recipe(crafting, CraftingBlocks.cryofluidmixer, new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 80), new ItemStack(Items.thorium, 90));
new Recipe(crafting, CraftingBlocks.solidifier, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 20));
new Recipe(crafting, CraftingBlocks.melter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.carbide, 90)); new Recipe(crafting, CraftingBlocks.melter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.carbide, 90));
new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.carbide, 10), new ItemStack(Items.lead, 30)); new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.carbide, 10), new ItemStack(Items.lead, 30));
//processing //processing
@@ -80,20 +84,28 @@ public class Recipes implements ContentList{
new Recipe(crafting, CraftingBlocks.centrifuge, new ItemStack(Items.tungsten, 130), new ItemStack(Items.carbide, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); new Recipe(crafting, CraftingBlocks.centrifuge, new ItemStack(Items.tungsten, 130), new ItemStack(Items.carbide, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50));
//POWER //POWER
new Recipe(power, PowerBlocks.powernode, new ItemStack(Items.tungsten, 2), new ItemStack(Items.lead, 6)); new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.tungsten, 2), new ItemStack(Items.lead, 6))
new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.carbide, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6)); .setDependencies(PowerBlocks.combustionGenerator);
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.tungsten, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4)); new Recipe(power, PowerBlocks.powerNodeLarge, new ItemStack(Items.carbide, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6))
new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.carbide, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30)); .setDependencies(PowerBlocks.powerNode);
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.tungsten, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4))
.setDependencies(PowerBlocks.powerNode);
new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.carbide, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30))
.setDependencies(PowerBlocks.powerNode);
//generators //generators - combustion
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 30)); new Recipe(power, PowerBlocks.combustionGenerator, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 30));
new Recipe(power, PowerBlocks.turbinegenerator, new ItemStack(Items.tungsten, 70), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60)); new Recipe(power, PowerBlocks.turbineGenerator, new ItemStack(Items.tungsten, 70), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60));
//generators - solar
new Recipe(power, PowerBlocks.solarPanel, new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 30));
new Recipe(power, PowerBlocks.largeSolarPanel, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 290), new ItemStack(Items.phasematter, 30));
//new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.carbide, 50)); //new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.carbide, 50));
new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 50)); new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 50));
new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 70)); new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 70));
new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.carbide, 300), new ItemStack(Items.thorium, 250)); new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.carbide, 500), new ItemStack(Items.thorium, 350));
//DRILLS, PRODUCERS //DRILLS, PRODUCERS
new Recipe(production, ProductionBlocks.tungstenDrill, new ItemStack(Items.tungsten, 30)); new Recipe(production, ProductionBlocks.tungstenDrill, new ItemStack(Items.tungsten, 30));
@@ -102,7 +114,7 @@ public class Recipes implements ContentList{
new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 40)); new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 40));
new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.tungsten, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20)); new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.tungsten, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20));
//new Recipe(production, ProductionBlocks.oilextractor, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 150), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 100)); new Recipe(production, ProductionBlocks.oilextractor, new ItemStack(Items.tungsten, 300), new ItemStack(Items.carbide, 350), new ItemStack(Items.lead, 230), new ItemStack(Items.thorium, 230), new ItemStack(Items.silicon, 150));
//UNITS //UNITS
@@ -111,27 +123,35 @@ public class Recipes implements ContentList{
new Recipe(units, UpgradeBlocks.dartFactory, new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 200), new ItemStack(Items.titanium, 240)) new Recipe(units, UpgradeBlocks.dartFactory, new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 200), new ItemStack(Items.titanium, 240))
.setDesktop(); //dart is desktop only, because it's the starter mobile ship .setDesktop(); //dart is desktop only, because it's the starter mobile ship
new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.carbide, 160), new ItemStack(Items.silicon, 220), new ItemStack(Items.titanium, 250)).setDesktop(); new Recipe(units, UpgradeBlocks.tridentFactory, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 250), new ItemStack(Items.titanium, 300), new ItemStack(Items.plastanium, 200));
new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.carbide, 160), new ItemStack(Items.silicon, 220), new ItemStack(Items.titanium, 250))
.setDesktop();
//new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30)); //new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30));
//actual unit related stuff //actual unit related stuff
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 130)); new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 130));
new Recipe(units, UnitBlocks.fabricatorFactory, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 100), new ItemStack(Items.lead, 150), new ItemStack(Items.silicon, 300));
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30)); new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30)); new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
//LIQUIDS //LIQUIDS
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1)); new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1))
.setDependencies(CraftingBlocks.smelter);
new Recipe(liquid, LiquidBlocks.pulseConduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.lead, 1));
new Recipe(liquid, LiquidBlocks.phaseConduit, new ItemStack(Items.phasematter, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.titanium, 20));
new Recipe(liquid, LiquidBlocks.pulseconduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.lead, 1));
new Recipe(liquid, LiquidBlocks.liquidrouter, new ItemStack(Items.carbide, 4), new ItemStack(Items.lead, 4)); new Recipe(liquid, LiquidBlocks.liquidRouter, new ItemStack(Items.carbide, 4), new ItemStack(Items.lead, 4));
new Recipe(liquid, LiquidBlocks.liquidtank, new ItemStack(Items.titanium, 50), new ItemStack(Items.lead, 50), new ItemStack(Items.carbide, 20)); new Recipe(liquid, LiquidBlocks.liquidtank, new ItemStack(Items.titanium, 50), new ItemStack(Items.lead, 50), new ItemStack(Items.carbide, 20));
new Recipe(liquid, LiquidBlocks.liquidjunction, new ItemStack(Items.carbide, 4), new ItemStack(Items.lead, 4)); new Recipe(liquid, LiquidBlocks.liquidJunction, new ItemStack(Items.carbide, 4), new ItemStack(Items.lead, 4));
new Recipe(liquid, LiquidBlocks.bridgeconduit, new ItemStack(Items.carbide, 8), new ItemStack(Items.lead, 8)); new Recipe(liquid, LiquidBlocks.bridgeConduit, new ItemStack(Items.carbide, 8), new ItemStack(Items.lead, 8));
//new Recipe(liquid, LiquidBlocks.laserconduit, new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 2), new ItemStack(Items.phasematter, 10));
new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 20)); new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 20))
.setDependencies(CraftingBlocks.smelter);
new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.tungsten, 140), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 70));
//DEBUG //DEBUG
new Recipe(units, DebugBlocks.itemSource, new ItemStack(Items.carbide, 10)).setDebug(); new Recipe(units, DebugBlocks.itemSource, new ItemStack(Items.carbide, 10)).setDebug();
@@ -139,12 +159,9 @@ public class Recipes implements ContentList{
new Recipe(units, DebugBlocks.liquidSource, new ItemStack(Items.carbide, 10)).setDebug(); new Recipe(units, DebugBlocks.liquidSource, new ItemStack(Items.carbide, 10)).setDebug();
new Recipe(units, DebugBlocks.powerVoid, new ItemStack(Items.carbide, 10)).setDebug(); new Recipe(units, DebugBlocks.powerVoid, new ItemStack(Items.carbide, 10)).setDebug();
new Recipe(units, DebugBlocks.powerInfinite, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5)).setDebug(); new Recipe(units, DebugBlocks.powerInfinite, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5)).setDebug();
//new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5));
//new Recipe(liquid, LiquidBlocks.thermalPump, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5)); //new Recipe(liquid, LiquidBlocks.thermalPump, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5));
/* /*
new Recipe(production, ProductionBlocks.laserdrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.nucleardrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40)); new Recipe(production, ProductionBlocks.nucleardrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.plasmadrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40)); new Recipe(production, ProductionBlocks.plasmadrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40)); new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
@@ -153,8 +170,7 @@ public class Recipes implements ContentList{
//new Recipe(distribution, DistributionBlocks.laserconveyor, new ItemStack(Items.carbide, 5)); //new Recipe(distribution, DistributionBlocks.massDriver, new ItemStack(Items.carbide, 1));
//new Recipe(distribution, DistributionBlocks.massdriver, new ItemStack(Items.carbide, 1));
/* /*
@@ -186,13 +202,13 @@ public class Recipes implements ContentList{
new Recipe(crafting, CraftingBlocks.alloysmelter, new ItemStack(Items.titanium, 50), new ItemStack(Items.carbide, 50)); new Recipe(crafting, CraftingBlocks.alloysmelter, new ItemStack(Items.titanium, 50), new ItemStack(Items.carbide, 50));
new Recipe(crafting, CraftingBlocks.alloyfuser, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30)); new Recipe(crafting, CraftingBlocks.alloyfuser, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30));
new Recipe(crafting, CraftingBlocks.phaseweaver, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30)); new Recipe(crafting, CraftingBlocks.phaseWeaver, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30));
new Recipe(crafting, CraftingBlocks.separator, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30)); new Recipe(crafting, CraftingBlocks.separator, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30));
new Recipe(crafting, CraftingBlocks.centrifuge, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30)); new Recipe(crafting, CraftingBlocks.centrifuge, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30));
new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30)); new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.carbide, 30), new ItemStack(Items.tungsten, 30));
new Recipe(crafting, CraftingBlocks.oilRefinery, new ItemStack(Items.carbide, 15), new ItemStack(Items.tungsten, 15)); new Recipe(crafting, CraftingBlocks.oilRefinery, new ItemStack(Items.carbide, 15), new ItemStack(Items.tungsten, 15));
new Recipe(crafting, CraftingBlocks.biomatterCompressor, new ItemStack(Items.carbide, 15), new ItemStack(Items.tungsten, 15)); new Recipe(crafting, CraftingBlocks.biomatterCompressor, new ItemStack(Items.carbide, 15), new ItemStack(Items.tungsten, 15));
new Recipe(crafting, CraftingBlocks.plasteelcompressor, new ItemStack(Items.carbide, 30), new ItemStack(Items.titanium, 15)); new Recipe(crafting, CraftingBlocks.plastaniumCompressor, new ItemStack(Items.carbide, 30), new ItemStack(Items.titanium, 15));
new Recipe(crafting, CraftingBlocks.cryofluidmixer, new ItemStack(Items.carbide, 30), new ItemStack(Items.titanium, 15)); new Recipe(crafting, CraftingBlocks.cryofluidmixer, new ItemStack(Items.carbide, 30), new ItemStack(Items.titanium, 15));
new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.carbide, 10), new ItemStack(Items.tungsten, 10)); new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.carbide, 10), new ItemStack(Items.tungsten, 10));
new Recipe(crafting, CraftingBlocks.stoneFormer, new ItemStack(Items.carbide, 10), new ItemStack(Items.tungsten, 10)); new Recipe(crafting, CraftingBlocks.stoneFormer, new ItemStack(Items.carbide, 10), new ItemStack(Items.tungsten, 10));
@@ -210,29 +226,29 @@ public class Recipes implements ContentList{
new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40)); new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.oilextractor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40)); new Recipe(production, ProductionBlocks.oilextractor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(power, PowerBlocks.powernode, new ItemStack(Items.carbide, 3), new ItemStack(Items.tungsten, 3)); new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.carbide, 3), new ItemStack(Items.tungsten, 3));
new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.carbide, 3), new ItemStack(Items.tungsten, 3)); new Recipe(power, PowerBlocks.powerNodeLarge, new ItemStack(Items.carbide, 3), new ItemStack(Items.tungsten, 3));
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.carbide, 5), new ItemStack(Items.tungsten, 5)); new Recipe(power, PowerBlocks.battery, new ItemStack(Items.carbide, 5), new ItemStack(Items.tungsten, 5));
new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.carbide, 5), new ItemStack(Items.tungsten, 5)); new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.carbide, 5), new ItemStack(Items.tungsten, 5));
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.tungsten, 1)); new Recipe(power, PowerBlocks.combustionGenerator, new ItemStack(Items.tungsten, 1));
new Recipe(power, PowerBlocks.turbinegenerator, new ItemStack(Items.tungsten, 1)); new Recipe(power, PowerBlocks.turbineGenerator, new ItemStack(Items.tungsten, 1));
new Recipe(power, PowerBlocks.thermalgenerator, new ItemStack(Items.carbide, 1)); new Recipe(power, PowerBlocks.thermalGenerator, new ItemStack(Items.carbide, 1));
new Recipe(power, PowerBlocks.rtgenerator, new ItemStack(Items.titanium, 1), new ItemStack(Items.carbide, 1)); new Recipe(power, PowerBlocks.rtgGenerator, new ItemStack(Items.titanium, 1), new ItemStack(Items.carbide, 1));
new Recipe(power, PowerBlocks.solarpanel, new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 20)); new Recipe(power, PowerBlocks.solarPanel, new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 20));
new Recipe(power, PowerBlocks.largesolarpanel, new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 20)); new Recipe(power, PowerBlocks.largeSolarPanel, new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 20));
new Recipe(power, PowerBlocks.nuclearReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.carbide, 50)); new Recipe(power, PowerBlocks.nuclearReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.carbide, 50));
new Recipe(power, PowerBlocks.fusionReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.carbide, 50)); new Recipe(power, PowerBlocks.fusionReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.carbide, 50));
new Recipe(distribution, PowerBlocks.warpgate, new ItemStack(Items.carbide, 1)); new Recipe(distribution, PowerBlocks.warpGate, new ItemStack(Items.carbide, 1));
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.carbide, 1)); new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.carbide, 1));
new Recipe(liquid, LiquidBlocks.pulseconduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.carbide, 1)); new Recipe(liquid, LiquidBlocks.pulseConduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.carbide, 1));
new Recipe(liquid, LiquidBlocks.liquidrouter, new ItemStack(Items.carbide, 2)); new Recipe(liquid, LiquidBlocks.liquidRouter, new ItemStack(Items.carbide, 2));
new Recipe(liquid, LiquidBlocks.liquidtank, new ItemStack(Items.carbide, 2)); new Recipe(liquid, LiquidBlocks.liquidtank, new ItemStack(Items.carbide, 2));
new Recipe(liquid, LiquidBlocks.liquidjunction, new ItemStack(Items.carbide, 2)); new Recipe(liquid, LiquidBlocks.liquidJunction, new ItemStack(Items.carbide, 2));
new Recipe(liquid, LiquidBlocks.bridgeconduit, new ItemStack(Items.titanium, 2), new ItemStack(Items.carbide, 2)); new Recipe(liquid, LiquidBlocks.bridgeConduit, new ItemStack(Items.titanium, 2), new ItemStack(Items.carbide, 2));
new Recipe(liquid, LiquidBlocks.laserconduit, new ItemStack(Items.titanium, 2), new ItemStack(Items.carbide, 2)); new Recipe(liquid, LiquidBlocks.phaseConduit, new ItemStack(Items.titanium, 2), new ItemStack(Items.carbide, 2));
new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.carbide, 10)); new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.carbide, 10));
new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5)); new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5));

View File

@@ -7,7 +7,7 @@ import io.anuke.mindustry.game.Content;
import io.anuke.mindustry.type.ContentList; import io.anuke.mindustry.type.ContentList;
public class UnitTypes implements ContentList { public class UnitTypes implements ContentList {
public static UnitType drone, scout, vtol, monsoon, titan; public static UnitType drone, scout, vtol, monsoon, titan, fabricator;
@Override @Override
public void load() { public void load() {
@@ -44,7 +44,6 @@ public class UnitTypes implements ContentList {
maxVelocity = 2.1f; maxVelocity = 2.1f;
drag = 0.01f; drag = 0.01f;
isFlying = true; isFlying = true;
reload = 7;
}}; }};
monsoon = new UnitType("monsoon", Monsoon.class, Monsoon::new){{ monsoon = new UnitType("monsoon", Monsoon.class, Monsoon::new){{
@@ -53,9 +52,23 @@ public class UnitTypes implements ContentList {
maxVelocity = 1.5f; maxVelocity = 1.5f;
drag = 0.01f; drag = 0.01f;
isFlying = true; isFlying = true;
reload = 7;
weapon = Weapons.bomber; weapon = Weapons.bomber;
}}; }};
fabricator = new UnitType("fabricator", Fabricator.class, Fabricator::new){{
isFlying = true;
drag = 0.01f;
speed = 0.2f;
maxVelocity = 0.6f;
ammoCapacity = 0;
range = 70f;
itemCapacity = 70;
health = 120;
health = 45;
buildPower = 0.9f;
minePower = 1.1f;
healSpeed = 0.3f;
}};
} }
@Override @Override

View File

@@ -11,9 +11,9 @@ import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.blocks.production.*; import io.anuke.mindustry.world.blocks.production.*;
public class CraftingBlocks extends BlockList implements ContentList { public class CraftingBlocks extends BlockList implements ContentList {
public static Block smelter, arcsmelter, siliconsmelter, plasteelcompressor, phaseweaver, alloysmelter, alloyfuser, public static Block smelter, arcsmelter, siliconsmelter, plastaniumCompressor, phaseWeaver, alloysmelter, alloyfuser,
thermiteMixer, blastMixer, pyratiteMixer, blastMixer,
cryofluidmixer, melter, separator, centrifuge, biomatterCompressor, pulverizer, oilRefinery, stoneFormer, incinerator; cryofluidmixer, melter, separator, centrifuge, biomatterCompressor, pulverizer, oilRefinery, solidifier, incinerator;
@Override @Override
public void load() { public void load() {
@@ -52,14 +52,14 @@ public class CraftingBlocks extends BlockList implements ContentList {
flameColor = Color.valueOf("ffef99"); flameColor = Color.valueOf("ffef99");
}}; }};
plasteelcompressor = new PlasteelCompressor("plasteel-compressor") {{ plastaniumCompressor = new PlasteelCompressor("plastanium-compressor") {{
inputLiquid = Liquids.oil; inputLiquid = Liquids.oil;
inputItem = new ItemStack(Items.carbide, 1); inputItem = new ItemStack(Items.carbide, 1);
liquidUse = 0.3f; liquidUse = 0.3f;
liquidCapacity = 60f; liquidCapacity = 60f;
powerUse = 0.5f; powerUse = 0.5f;
craftTime = 80f; craftTime = 80f;
output = Items.plasteel; output = Items.plastanium;
itemCapacity = 30; itemCapacity = 30;
size = 2; size = 2;
health = 320; health = 320;
@@ -68,7 +68,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
updateEffect = BlockFx.plasticburn; updateEffect = BlockFx.plasticburn;
}}; }};
phaseweaver = new PhaseWeaver("phase-weaver") {{ phaseWeaver = new PhaseWeaver("phase-weaver") {{
health = 90; health = 90;
craftEffect = BlockFx.smeltsmoke; craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10)}; inputs = new ItemStack[]{new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10)};
@@ -81,7 +81,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
alloysmelter = new PowerSmelter("alloy-smelter") {{ alloysmelter = new PowerSmelter("alloy-smelter") {{
health = 90; health = 90;
craftEffect = BlockFx.smeltsmoke; craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.plasteel, 2)}; inputs = new ItemStack[]{new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.plastanium, 2)};
result = Items.surgealloy; result = Items.surgealloy;
powerUse = 0.3f; powerUse = 0.3f;
craftTime = 50f; craftTime = 50f;
@@ -94,7 +94,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
alloyfuser = new PowerSmelter("alloy-fuser") {{ alloyfuser = new PowerSmelter("alloy-fuser") {{
health = 90; health = 90;
craftEffect = BlockFx.smeltsmoke; craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.titanium, 3), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.plasteel, 2)}; inputs = new ItemStack[]{new ItemStack(Items.titanium, 3), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.plastanium, 2)};
result = Items.surgealloy; result = Items.surgealloy;
powerUse = 0.4f; powerUse = 0.4f;
craftTime = 30f; craftTime = 30f;
@@ -121,19 +121,19 @@ public class CraftingBlocks extends BlockList implements ContentList {
hasPower = true; hasPower = true;
inputLiquid = Liquids.oil; inputLiquid = Liquids.oil;
liquidUse = 0.05f; liquidUse = 0.05f;
inputItem = new ItemStack(Items.thermite, 1); inputItem = new ItemStack(Items.pyratite, 1);
output = Items.blastCompound; output = Items.blastCompound;
powerUse = 0.04f; powerUse = 0.04f;
size = 2; size = 2;
}}; }};
thermiteMixer = new PowerSmelter("thermite-mixer") {{ pyratiteMixer = new PowerSmelter("pyratite-mixer") {{
itemCapacity = 20; itemCapacity = 20;
hasItems = true; hasItems = true;
hasPower = true; hasPower = true;
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 2), new ItemStack(Items.sand, 2)}; inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 2), new ItemStack(Items.sand, 2)};
result = Items.thermite; result = Items.pyratite;
powerUse = 0.02f; powerUse = 0.02f;
size = 2; size = 2;
@@ -231,7 +231,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
hasItems = hasLiquids = hasPower = true; hasItems = hasLiquids = hasPower = true;
}}; }};
stoneFormer = new GenericCrafter("stoneformer") {{ solidifier = new GenericCrafter("solidifer") {{
inputLiquid = Liquids.lava; inputLiquid = Liquids.lava;
liquidUse = 1f; liquidUse = 1f;
liquidCapacity = 21f; liquidCapacity = 21f;

View File

@@ -6,7 +6,7 @@ import io.anuke.mindustry.world.blocks.distribution.*;
public class DistributionBlocks extends BlockList implements ContentList{ public class DistributionBlocks extends BlockList implements ContentList{
public static Block conveyor, titaniumconveyor, router, multiplexer, junction, public static Block conveyor, titaniumconveyor, router, multiplexer, junction,
bridgeconveyor, laserconveyor, sorter, splitter, overflowgate, massdriver; bridgeConveyor, phaseConveyor, sorter, splitter, overflowGate, massDriver;
@Override @Override
public void load() { public void load() {
@@ -33,12 +33,12 @@ public class DistributionBlocks extends BlockList implements ContentList{
capacity = 32; capacity = 32;
}}; }};
bridgeconveyor = new BufferedItemBridge("bridgeconveyor") {{ bridgeConveyor = new BufferedItemBridge("bridge-conveyor") {{
range = 3; range = 3;
hasPower = false; hasPower = false;
}}; }};
laserconveyor = new ItemBridge("laserconveyor") {{ phaseConveyor = new ItemBridge("phase-conveyor") {{
range = 7; range = 7;
}}; }};
@@ -46,9 +46,9 @@ public class DistributionBlocks extends BlockList implements ContentList{
splitter = new Splitter("splitter"); splitter = new Splitter("splitter");
overflowgate = new OverflowGate("overflowgate"); overflowGate = new OverflowGate("overflow-gate");
massdriver = new MassDriver("mass-driver"){{ massDriver = new MassDriver("mass-driver"){{
size = 3; size = 3;
itemCapacity = 80; itemCapacity = 80;
range = 300f; range = 300f;

View File

@@ -6,18 +6,20 @@ import io.anuke.mindustry.world.blocks.distribution.*;
import io.anuke.mindustry.world.blocks.production.Pump; import io.anuke.mindustry.world.blocks.production.Pump;
public class LiquidBlocks extends BlockList implements ContentList{ public class LiquidBlocks extends BlockList implements ContentList{
public static Block mechanicalPump, rotaryPump, thermalPump, conduit, pulseconduit, liquidrouter, liquidtank, liquidjunction, bridgeconduit, laserconduit; public static Block mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidtank, liquidJunction, bridgeConduit, phaseConduit;
@Override @Override
public void load() { public void load() {
mechanicalPump = new Pump("mechanical-pump") {{ mechanicalPump = new Pump("mechanical-pump") {{
shadow = "shadow-round-1";
pumpAmount = 0.1f; pumpAmount = 0.1f;
tier = 0; tier = 0;
}}; }};
rotaryPump = new Pump("rotary-pump") {{ rotaryPump = new Pump("rotary-pump") {{
pumpAmount = 0.2f; shadow = "shadow-rounded-2";
pumpAmount = 0.25f;
powerUse = 0.015f; powerUse = 0.015f;
liquidCapacity = 30f; liquidCapacity = 30f;
size = 2; size = 2;
@@ -36,30 +38,30 @@ public class LiquidBlocks extends BlockList implements ContentList{
health = 45; health = 45;
}}; }};
pulseconduit = new Conduit("pulseconduit") {{ pulseConduit = new Conduit("pulse-conduit") {{
liquidCapacity = 16f; liquidCapacity = 16f;
liquidFlowFactor = 4.9f; liquidFlowFactor = 4.9f;
health = 65; health = 90;
}}; }};
liquidrouter = new LiquidRouter("liquidrouter") {{ liquidRouter = new LiquidRouter("liquid-router") {{
liquidCapacity = 40f; liquidCapacity = 40f;
}}; }};
liquidtank = new LiquidRouter("liquidtank") {{ liquidtank = new LiquidRouter("liquid-tank") {{
size = 3; size = 3;
liquidCapacity = 1500f; liquidCapacity = 1500f;
health = 500; health = 500;
}}; }};
liquidjunction = new LiquidJunction("liquidjunction"); liquidJunction = new LiquidJunction("liquid-junction");
bridgeconduit = new LiquidExtendingBridge("bridgeconduit") {{ bridgeConduit = new LiquidExtendingBridge("bridge-conduit") {{
range = 3; range = 3;
hasPower = false; hasPower = false;
}}; }};
laserconduit = new LiquidBridge("laserconduit") {{ phaseConduit = new LiquidBridge("phase-conduit") {{
range = 7; range = 7;
}}; }};
} }

View File

@@ -7,17 +7,18 @@ import io.anuke.mindustry.world.blocks.distribution.WarpGate;
import io.anuke.mindustry.world.blocks.power.*; import io.anuke.mindustry.world.blocks.power.*;
public class PowerBlocks extends BlockList implements ContentList { public class PowerBlocks extends BlockList implements ContentList {
public static Block combustiongenerator, thermalgenerator, turbinegenerator, rtgenerator, solarpanel, largesolarpanel, public static Block combustionGenerator, thermalGenerator, turbineGenerator, rtgGenerator, solarPanel, largeSolarPanel,
nuclearReactor, fusionReactor, battery, batteryLarge, powernode, powernodelarge, warpgate; nuclearReactor, fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge, warpGate;
@Override @Override
public void load() { public void load() {
combustiongenerator = new BurnerGenerator("combustion-generator") {{ combustionGenerator = new BurnerGenerator("combustion-generator") {{
powerOutput = 0.04f; powerOutput = 0.06f;
powerCapacity = 40f; powerCapacity = 40f;
itemDuration = 50f;
}}; }};
thermalgenerator = new LiquidHeatGenerator("thermal-generator") {{ thermalGenerator = new LiquidHeatGenerator("thermal-generator") {{
maxLiquidGenerate = 0.5f; maxLiquidGenerate = 0.5f;
powerPerLiquid = 0.08f; powerPerLiquid = 0.08f;
powerCapacity = 40f; powerCapacity = 40f;
@@ -25,25 +26,26 @@ public class PowerBlocks extends BlockList implements ContentList {
size = 2; size = 2;
}}; }};
turbinegenerator = new TurbineGenerator("turbine-generator") {{ turbineGenerator = new TurbineGenerator("turbine-generator") {{
powerOutput = 0.04f; powerOutput = 0.15f;
powerCapacity = 40f; powerCapacity = 40f;
itemDuration = 40f;
size = 2; size = 2;
}}; }};
rtgenerator = new DecayGenerator("rtg-generator") {{ rtgGenerator = new DecayGenerator("rtg-generator") {{
powerCapacity = 40f; powerCapacity = 40f;
powerOutput = 0.02f; powerOutput = 0.02f;
itemDuration = 500f; itemDuration = 500f;
}}; }};
solarpanel = new SolarGenerator("solar-panel") {{ solarPanel = new SolarGenerator("solar-panel") {{
generation = 0.003f; generation = 0.0045f;
}}; }};
largesolarpanel = new SolarGenerator("large-solar-panel") {{ largeSolarPanel = new SolarGenerator("solar-panel-large") {{
size = 3; size = 3;
generation = 0.012f; generation = 0.055f;
}}; }};
nuclearReactor = new NuclearReactor("nuclear-reactor") {{ nuclearReactor = new NuclearReactor("nuclear-reactor") {{
@@ -65,11 +67,11 @@ public class PowerBlocks extends BlockList implements ContentList {
powerCapacity = 2000f; powerCapacity = 2000f;
}}; }};
powernode = new PowerDistributor("power-node") {{ powerNode = new PowerDistributor("power-node") {{
shadow = "shadow-round-1"; shadow = "shadow-round-1";
}}; }};
powernodelarge = new PowerDistributor("power-node-large") {{ powerNodeLarge = new PowerDistributor("power-node-large") {{
size = 2; size = 2;
powerSpeed = 1f; powerSpeed = 1f;
maxNodes = 5; maxNodes = 5;
@@ -77,7 +79,7 @@ public class PowerBlocks extends BlockList implements ContentList {
shadow = "shadow-round-2"; shadow = "shadow-round-2";
}}; }};
warpgate = new WarpGate("warpgate"); warpGate = new WarpGate("warp-gate");
} }
} }

View File

@@ -24,6 +24,7 @@ public class TurretBlocks extends BlockList implements ContentList {
range = 80f; range = 80f;
shootCone = 15f; shootCone = 15f;
ammoUseEffect = ShootFx.shellEjectSmall; ammoUseEffect = ShootFx.shellEjectSmall;
health = 80;
}}; }};
/* /*
scatter = new BurstTurret("scatter") {{ scatter = new BurstTurret("scatter") {{
@@ -44,6 +45,7 @@ public class TurretBlocks extends BlockList implements ContentList {
recoil = 2f; recoil = 2f;
range = 200f; range = 200f;
inaccuracy = 5f; inaccuracy = 5f;
health = 120;
}}; }};
scorch = new LiquidTurret("scorch") {{ scorch = new LiquidTurret("scorch") {{
@@ -52,6 +54,7 @@ public class TurretBlocks extends BlockList implements ContentList {
reload = 5f; reload = 5f;
shootCone = 50f; shootCone = 50f;
ammoUseEffect = ShootFx.shellEjectSmall; ammoUseEffect = ShootFx.shellEjectSmall;
health = 140;
drawer = (tile, entity) -> Draw.rect(entity.target != null ? name + "-shoot" : name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); drawer = (tile, entity) -> Draw.rect(entity.target != null ? name + "-shoot" : name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
}}; }};
@@ -65,6 +68,7 @@ public class TurretBlocks extends BlockList implements ContentList {
shootCone = 50f; shootCone = 50f;
shootEffect = ShootFx.shootLiquid; shootEffect = ShootFx.shootLiquid;
range = 70f; range = 70f;
health = 360;
drawer = (tile, entity) -> { drawer = (tile, entity) -> {
Draw.rect(name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); Draw.rect(name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
@@ -93,6 +97,7 @@ public class TurretBlocks extends BlockList implements ContentList {
chargeBeginEffect = ShootFx.lancerLaserChargeBegin; chargeBeginEffect = ShootFx.lancerLaserChargeBegin;
heatColor = Color.RED; heatColor = Color.RED;
size = 2; size = 2;
health = 320;
}}; }};
arc = new LaserTurret("arc") {{ arc = new LaserTurret("arc") {{
@@ -113,6 +118,7 @@ public class TurretBlocks extends BlockList implements ContentList {
swarmer = new ItemTurret("swarmer") {{ swarmer = new ItemTurret("swarmer") {{
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge}; ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge};
size = 2; size = 2;
health = 380;
}}; }};
salvo = new ItemTurret("salvo") {{ salvo = new ItemTurret("salvo") {{
@@ -139,11 +145,15 @@ public class TurretBlocks extends BlockList implements ContentList {
tile.drawy() + tr2.y + Angles.trnsy(rot, -offsetx, offsety), entity.rotation - 90); tile.drawy() + tr2.y + Angles.trnsy(rot, -offsetx, offsety), entity.rotation - 90);
} }
}; };
health = 430;
}}; }};
ripple = new ArtilleryTurret("ripple") {{ ripple = new ArtilleryTurret("ripple") {{
ammoTypes = new AmmoType[]{AmmoTypes.artilleryCarbide, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary, AmmoTypes.artilleryPlastic, AmmoTypes.artilleryThorium}; ammoTypes = new AmmoType[]{AmmoTypes.artilleryCarbide, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary, AmmoTypes.artilleryPlastic, AmmoTypes.artilleryThorium};
size = 3; size = 3;
health = 550;
}}; }};
cyclone = new ItemTurret("cyclone") {{ cyclone = new ItemTurret("cyclone") {{

View File

@@ -8,11 +8,11 @@ import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.blocks.units.*; import io.anuke.mindustry.world.blocks.units.*;
public class UnitBlocks extends BlockList implements ContentList { public class UnitBlocks extends BlockList implements ContentList {
public static Block resupplyPoint, repairPoint, droneFactory, dropPoint, reconstructor, overdriveProjector, shieldProjector; public static Block resupplyPoint, repairPoint, droneFactory, fabricatorFactory, dropPoint, reconstructor, overdriveProjector, shieldProjector;
@Override @Override
public void load() { public void load() {
droneFactory = new UnitFactory("dronefactory") {{ droneFactory = new UnitFactory("drone-factory") {{
type = UnitTypes.drone; type = UnitTypes.drone;
produceTime = 800; produceTime = 800;
size = 2; size = 2;
@@ -21,17 +21,27 @@ public class UnitBlocks extends BlockList implements ContentList {
}; };
}}; }};
resupplyPoint = new ResupplyPoint("resupplypoint") {{ fabricatorFactory = new UnitFactory("fabricator-factory") {{
type = UnitTypes.fabricator;
produceTime = 1600;
size = 2;
powerUse = 0.2f;
requirements = new ItemStack[]{
new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)
};
}};
resupplyPoint = new ResupplyPoint("resupply-point") {{
shadow = "shadow-round-1"; shadow = "shadow-round-1";
itemCapacity = 30; itemCapacity = 30;
}}; }};
dropPoint = new DropPoint("droppoint") {{ dropPoint = new DropPoint("drop-point") {{
shadow = "shadow-round-1"; shadow = "shadow-round-1";
itemCapacity = 40; itemCapacity = 40;
}}; }};
repairPoint = new RepairPoint("repairpoint") {{ repairPoint = new RepairPoint("repair-point") {{
shadow = "shadow-round-1"; shadow = "shadow-round-1";
repairSpeed = 0.1f; repairSpeed = 0.1f;
}}; }};
@@ -40,7 +50,7 @@ public class UnitBlocks extends BlockList implements ContentList {
size = 2; size = 2;
}}; }};
overdriveProjector = new OverdriveProjector("overdriveprojector") {{ overdriveProjector = new OverdriveProjector("overdrive-projector") {{
size = 2; size = 2;
}}; }};

View File

@@ -35,13 +35,13 @@ public class UnitType implements UnlockableContent{
public boolean isFlying; public boolean isFlying;
public float drag = 0.1f; public float drag = 0.1f;
public float maxVelocity = 5f; public float maxVelocity = 5f;
public float reload = 40f;
public float retreatPercent = 0.2f; public float retreatPercent = 0.2f;
public float armor = 0f; public float armor = 0f;
public float carryWeight = 1f; public float carryWeight = 1f;
public int ammoCapacity = 100; public int ammoCapacity = 100;
public int itemCapacity = 30; public int itemCapacity = 30;
public int mineLevel = 2; public int mineLevel = 2;
public float buildPower = 0.3f, minePower = 0.7f, healSpeed = 0.1f;
public Weapon weapon = Weapons.blaster; public Weapon weapon = Weapons.blaster;
public float weaponOffsetX, weaponOffsetY; public float weaponOffsetX, weaponOffsetY;

View File

@@ -41,7 +41,6 @@ import static io.anuke.mindustry.Vars.*;
public class Drone extends FlyingUnit implements BuilderTrait { public class Drone extends FlyingUnit implements BuilderTrait {
protected static ObjectSet<Item> toMine; protected static ObjectSet<Item> toMine;
protected static float healSpeed = 0.1f;
protected static float discoverRange = 120f; protected static float discoverRange = 120f;
protected static boolean initialized; protected static boolean initialized;
@@ -89,12 +88,12 @@ public class Drone extends FlyingUnit implements BuilderTrait {
@Override @Override
public float getBuildPower(Tile tile) { public float getBuildPower(Tile tile) {
return 0.3f; return type.buildPower;
} }
@Override @Override
public float getMinePower() { public float getMinePower() {
return 0.7f; return type.minePower;
} }
@Override @Override
@@ -292,7 +291,7 @@ public class Drone extends FlyingUnit implements BuilderTrait {
circle(type.range); circle(type.range);
}else{ }else{
TileEntity entity = (TileEntity) target; TileEntity entity = (TileEntity) target;
entity.health += healSpeed * Timers.delta(); entity.health += type.healSpeed * Timers.delta();
entity.health = Mathf.clamp(entity.health, 0, entity.tile.block().health); entity.health = Mathf.clamp(entity.health, 0, entity.tile.block().health);
} }
} }

View File

@@ -0,0 +1,5 @@
package io.anuke.mindustry.entities.units.types;
public class Fabricator extends Drone {
}

View File

@@ -2,7 +2,7 @@ package io.anuke.mindustry.game;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
/**Base interface for an unlockable content type.*/ /**Base interface for a content type that is loaded in {@link io.anuke.mindustry.core.ContentLoader}.*/
public interface Content { public interface Content {
/**Returns the type name of this piece of content. /**Returns the type name of this piece of content.
@@ -12,8 +12,7 @@ public interface Content {
/**Returns a list of all instances of this content.*/ /**Returns a list of all instances of this content.*/
Array<? extends Content> getAll(); Array<? extends Content> getAll();
/**Called after all content is created. Use for loading texture regions and other data. /**Called after all content is created. Do not use to load regions or texture data!*/
* Do not use to load regions!*/
default void init(){} default void init(){}
/**Called after all content is created, only on non-headless versions. /**Called after all content is created, only on non-headless versions.

View File

@@ -25,11 +25,13 @@ public class ContentDatabase {
return set.contains(content.getContentName()); return set.contains(content.getContentName());
} }
/**Makes this piece of content 'unlocked'. /**Makes this piece of content 'unlocked', if possible.
* If this piece of content is already unlocked, nothing changes. * If this piece of content is already unlocked or cannot be unlocked due to dependencies, nothing changes.
* Results are not saved until you call {@link #save()}. * Results are not saved until you call {@link #save()}.
* @return whether or not this content was newly unlocked.*/ * @return whether or not this content was newly unlocked.*/
public boolean unlockContent(UnlockableContent content){ public boolean unlockContent(UnlockableContent content){
if(!content.canBeUnlocked()) return false;
if(!unlocked.containsKey(content.getContentTypeName())){ if(!unlocked.containsKey(content.getContentTypeName())){
unlocked.put(content.getContentTypeName(), new ObjectSet<>()); unlocked.put(content.getContentTypeName(), new ObjectSet<>());
} }
@@ -38,6 +40,7 @@ public class ContentDatabase {
//fire unlock event so other classes can use it //fire unlock event so other classes can use it
if(ret){ if(ret){
content.onUnlock();
Events.fire(UnlockEvent.class, content); Events.fire(UnlockEvent.class, content);
dirty = true; dirty = true;
} }

View File

@@ -3,6 +3,8 @@ package io.anuke.mindustry.game;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.ucore.scene.ui.layout.Table; import io.anuke.ucore.scene.ui.layout.Table;
import static io.anuke.mindustry.Vars.control;
/**Base interface for an unlockable content type.*/ /**Base interface for an unlockable content type.*/
public interface UnlockableContent extends Content{ public interface UnlockableContent extends Content{
@@ -22,4 +24,29 @@ public interface UnlockableContent extends Content{
/**Called when this content is unlocked. Use this to unlock other related content.*/ /**Called when this content is unlocked. Use this to unlock other related content.*/
default void onUnlock(){} default void onUnlock(){}
/**Whether this content is always hidden in the content info dialog.*/
default boolean isHidden(){
return false;
}
/**Lists the content that must be unlocked in order for this specific content to become unlocked. May return null.*/
default UnlockableContent[] getDependencies(){
return null;
}
/**Returns whether dependencies are satisfied for unlocking this content.*/
default boolean canBeUnlocked(){
UnlockableContent[] depend = getDependencies();
if(depend == null){
return true;
}else{
for(UnlockableContent cont : depend){
if(!control.database().isUnlocked(cont)){
return false;
}
}
return true;
}
}
} }

View File

@@ -115,7 +115,7 @@ public class WaveCreator{
unitAmount = 4; unitAmount = 4;
groupAmount = 2; groupAmount = 2;
effect = StatusEffects.overdrive; effect = StatusEffects.overdrive;
items = new ItemStack(Items.thermite, 100); items = new ItemStack(Items.pyratite, 100);
end = 130; end = 130;
}}, }},
@@ -139,7 +139,7 @@ public class WaveCreator{
new SpawnGroup(UnitTypes.monsoon){{ new SpawnGroup(UnitTypes.monsoon){{
begin = 53; begin = 53;
ammoItem = Items.thermite; ammoItem = Items.pyratite;
unitAmount = 2; unitAmount = 2;
unitScaling = 3; unitScaling = 3;
spacing = 4; spacing = 4;

View File

@@ -34,6 +34,8 @@ public class Liquid implements UnlockableContent{
public StatusEffect effect = StatusEffects.none; public StatusEffect effect = StatusEffects.none;
/**Pump tier. Controls which pumps can use this liquid.*/ /**Pump tier. Controls which pumps can use this liquid.*/
public int tier; public int tier;
/**Displayed icon.*/
public TextureRegion iconRegion;
public Liquid(String name, Color color) { public Liquid(String name, Color color) {
this.name = name; this.name = name;
@@ -44,6 +46,11 @@ public class Liquid implements UnlockableContent{
Liquid.liquids.add(this); Liquid.liquids.add(this);
} }
@Override
public void load() {
iconRegion = Draw.region("icon-liquid-" + name);
}
@Override @Override
public void displayInfo(Table table) { public void displayInfo(Table table) {
ContentDisplay.displayLiquid(table, this); ContentDisplay.displayLiquid(table, this);
@@ -56,7 +63,7 @@ public class Liquid implements UnlockableContent{
@Override @Override
public TextureRegion getContentIcon() { public TextureRegion getContentIcon() {
return Draw.region("liquid-icon"); return iconRegion;
} }
@Override @Override

View File

@@ -36,6 +36,9 @@ public class Recipe implements UnlockableContent{
public boolean desktopOnly = false, debugOnly = false; public boolean desktopOnly = false, debugOnly = false;
private Block[] dependencies;
private Recipe[] recipeDependencies;
public Recipe(Category category, Block result, ItemStack... requirements){ public Recipe(Category category, Block result, ItemStack... requirements){
this.id = lastid ++; this.id = lastid ++;
this.result = result; this.result = result;
@@ -55,6 +58,11 @@ public class Recipe implements UnlockableContent{
recipeMap.put(result, this); recipeMap.put(result, this);
} }
public Recipe setDependencies(Block... blocks){
this.dependencies = blocks;
return this;
}
public Recipe setDesktop(){ public Recipe setDesktop(){
desktopOnly = true; desktopOnly = true;
return this; return this;
@@ -115,6 +123,19 @@ public class Recipe implements UnlockableContent{
} }
} }
@Override
public UnlockableContent[] getDependencies() {
if(dependencies == null){
return null;
}else if(recipeDependencies == null){
recipeDependencies = new Recipe[dependencies.length];
for (int i = 0; i < recipeDependencies.length; i++) {
recipeDependencies[i] = Recipe.getByResult(dependencies[i]);
}
}
return recipeDependencies;
}
@Override @Override
public Array<? extends Content> getAll() { public Array<? extends Content> getAll() {
return allRecipes; return allRecipes;

View File

@@ -32,8 +32,6 @@ public class UnlocksDialog extends FloatingDialog {
OrderedMap<String, Array<Content>> allContent = ContentLoader.getContentMap(); OrderedMap<String, Array<Content>> allContent = ContentLoader.getContentMap();
//allContent.orderedKeys().reverse();
for(String key : allContent.orderedKeys()){ for(String key : allContent.orderedKeys()){
Array<Content> array = allContent.get(key); Array<Content> array = allContent.get(key);
if(array.size == 0 || !(array.first() instanceof UnlockableContent)) continue; if(array.size == 0 || !(array.first() instanceof UnlockableContent)) continue;
@@ -48,9 +46,13 @@ public class UnlocksDialog extends FloatingDialog {
int maxWidth = 14; int maxWidth = 14;
int size = 8*6; int size = 8*6;
int count = 0;
for (int i = 0; i < array.size; i++) { for (int i = 0; i < array.size; i++) {
UnlockableContent unlock = (UnlockableContent)array.get(i); UnlockableContent unlock = (UnlockableContent)array.get(i);
if(unlock.isHidden()) continue;
Image image = control.database().isUnlocked(unlock) ? new Image(unlock.getContentIcon()) : new Image("icon-locked"); Image image = control.database().isUnlocked(unlock) ? new Image(unlock.getContentIcon()) : new Image("icon-locked");
list.add(image).size(size).pad(3); list.add(image).size(size).pad(3);
@@ -62,7 +64,7 @@ public class UnlocksDialog extends FloatingDialog {
}})); }}));
} }
if((i+1) % maxWidth == 0){ if((++count) % maxWidth == 0){
list.row(); list.row();
} }
} }

View File

@@ -69,7 +69,7 @@ public class Block extends BaseBlock implements Content{
/**whether this floor can be placed on.*/ /**whether this floor can be placed on.*/
public boolean placeableOn = true; public boolean placeableOn = true;
/**tile entity health*/ /**tile entity health*/
public int health = 40; public int health = -1;
/**base block explosiveness*/ /**base block explosiveness*/
public float baseExplosiveness = 0f; public float baseExplosiveness = 0f;
/**whether to display a different shadow per variant*/ /**whether to display a different shadow per variant*/
@@ -161,6 +161,11 @@ public class Block extends BaseBlock implements Content{
/**Called after all blocks are created.*/ /**Called after all blocks are created.*/
@Override @Override
public void init(){ public void init(){
//initialize default health based on size
if(health == -1){
health = size*size*40;
}
setStats(); setStats();
setBars(); setBars();
} }

View File

@@ -1,21 +1,50 @@
package io.anuke.mindustry.world.blocks.production; package io.anuke.mindustry.world.blocks.production;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.mindustry.content.Items;
import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.type.Liquid;
import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.meta.BlockStat;
import io.anuke.mindustry.world.meta.StatUnit;
import io.anuke.ucore.core.Timers; import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.Draw;
public class Fracker extends SolidPump { public class Fracker extends SolidPump {
protected Liquid inputLiquid; protected Liquid inputLiquid;
protected float inputLiquidUse; protected float inputLiquidUse;
protected float inputCapacity = 20f;
protected Item inputItem = Items.sand;
protected float itemUseTime = 100f;
protected TextureRegion liquidRegion;
protected TextureRegion rotatorRegion;
protected TextureRegion topRegion;
public Fracker(String name) { public Fracker(String name) {
super(name); super(name);
hasItems = true; hasItems = true;
} }
@Override
public void load() {
super.load();
liquidRegion = Draw.region(name + "-liquid");
rotatorRegion = Draw.region(name + "-rotator");
topRegion = Draw.region(name + "-top");
}
@Override
public void setStats() {
super.setStats();
stats.add(BlockStat.inputItem, inputItem);
stats.add(BlockStat.inputLiquid, inputLiquid);
stats.add(BlockStat.liquidUse, 60f *inputLiquidUse, StatUnit.liquidSecond);
}
@Override @Override
public void draw(Tile tile) { public void draw(Tile tile) {
FrackerEntity entity = tile.entity(); FrackerEntity entity = tile.entity();
@@ -24,11 +53,11 @@ public class Fracker extends SolidPump {
Draw.color(tile.entity.liquids.liquid.color); Draw.color(tile.entity.liquids.liquid.color);
Draw.alpha(tile.entity.liquids.amount/liquidCapacity); Draw.alpha(tile.entity.liquids.amount/liquidCapacity);
Draw.rect(name + "-liquid", tile.drawx(), tile.drawy()); Draw.rect(liquidRegion, tile.drawx(), tile.drawy());
Draw.color(); Draw.color();
Draw.rect(name + "-rotator", tile.drawx(), tile.drawy(), entity.pumpTime); Draw.rect(rotatorRegion, tile.drawx(), tile.drawy(), entity.pumpTime);
Draw.rect(name + "-top", tile.drawx(), tile.drawy()); Draw.rect(topRegion, tile.drawx(), tile.drawy());
} }
@Override @Override
@@ -40,31 +69,32 @@ public class Fracker extends SolidPump {
public void update(Tile tile) { public void update(Tile tile) {
FrackerEntity entity = tile.entity(); FrackerEntity entity = tile.entity();
if(entity.input >= inputLiquidUse * Timers.delta()){ while(entity.accumulator > itemUseTime && entity.items.hasItem(inputItem, 1)){
entity.items.removeItem(inputItem, 1);
entity.accumulator -= itemUseTime;
}
if(entity.input >= inputLiquidUse * Timers.delta() && entity.accumulator < itemUseTime){
super.update(tile); super.update(tile);
entity.input -= inputLiquidUse * Timers.delta(); entity.input -= inputLiquidUse * Timers.delta();
entity.accumulator += Timers.delta();
}else{ }else{
tryDumpLiquid(tile); tryDumpLiquid(tile);
} }
} }
@Override @Override
public void handleLiquid(Tile tile, Tile source, Liquid liquid, float amount) { public float handleAuxLiquid(Tile tile, Tile source, Liquid liquid, float amount) {
if(liquid != inputLiquid){ if(liquid != inputLiquid){
super.handleLiquid(tile, source, liquid, amount); return 0f;
}else{ }else{
FrackerEntity entity = tile.entity(); FrackerEntity entity = tile.entity();
entity.input += amount; float accepted = Math.min(inputCapacity - entity.input, amount);
entity.input += accepted;
return accepted;
} }
} }
@Override
public boolean acceptLiquid(Tile tile, Tile source, Liquid liquid, float amount) {
FrackerEntity entity = tile.entity();
return (liquid == inputLiquid && entity.input < inputLiquidUse) || super.acceptLiquid(tile, source, liquid, amount);
}
@Override @Override
public TileEntity getEntity() { public TileEntity getEntity() {
return new FrackerEntity(); return new FrackerEntity();
@@ -72,5 +102,6 @@ public class Fracker extends SolidPump {
public static class FrackerEntity extends SolidPumpEntity{ public static class FrackerEntity extends SolidPumpEntity{
public float input; public float input;
public float accumulator;
} }
} }

View File

@@ -6,6 +6,8 @@ import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.type.Liquid;
import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.LiquidBlock; import io.anuke.mindustry.world.blocks.LiquidBlock;
import io.anuke.mindustry.world.meta.BlockStat;
import io.anuke.mindustry.world.meta.StatUnit;
import io.anuke.ucore.core.Timers; import io.anuke.ucore.core.Timers;
public class LiquidMixer extends LiquidBlock{ public class LiquidMixer extends LiquidBlock{
@@ -24,6 +26,15 @@ public class LiquidMixer extends LiquidBlock{
solid = true; solid = true;
} }
@Override
public void setStats() {
super.setStats();
stats.add(BlockStat.liquidOutput, outputLiquid);
stats.add(BlockStat.powerUse, powerUse * 60f, StatUnit.powerSecond);
stats.add(BlockStat.inputItem, inputItem);
}
@Override @Override
public void update(Tile tile){ public void update(Tile tile){
float used = Math.min(Timers.delta() * powerUse, tile.entity.power.amount); float used = Math.min(Timers.delta() * powerUse, tile.entity.power.amount);

View File

@@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.mindustry.entities.units.UnitType; import io.anuke.mindustry.entities.units.UnitType;
import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.Liquid;
import io.anuke.mindustry.type.Mech; import io.anuke.mindustry.type.Mech;
import io.anuke.mindustry.type.Upgrade; import io.anuke.mindustry.type.Upgrade;
import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Block;
@@ -130,6 +131,12 @@ public class Generators {
} }
}); });
context.generate("liquid-icons", () -> {
for(Liquid liquid : Liquid.all()){
}
});
context.generate("ore-icons", () -> { context.generate("ore-icons", () -> {
for(Block block : Block.all()){ for(Block block : Block.all()){
if(!(block instanceof OreBlock)) continue; if(!(block instanceof OreBlock)) continue;