Added core miner drone, massive amount of balancing/setup

This commit is contained in:
Anuken
2018-06-22 15:07:47 -04:00
parent 28e44d33c4
commit c24eb231ab
119 changed files with 1011 additions and 1104 deletions

View File

@@ -6,6 +6,7 @@ import com.badlogic.gdx.utils.IntMap;
import com.badlogic.gdx.utils.ObjectMap;
import com.badlogic.gdx.utils.ObjectSet;
import io.anuke.mindustry.content.Items;
import io.anuke.mindustry.content.blocks.Blocks;
import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.game.EventType.TileChangeEvent;
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
@@ -18,6 +19,7 @@ import io.anuke.ucore.core.Events;
import io.anuke.ucore.entities.trait.Entity;
import io.anuke.ucore.function.Predicate;
import io.anuke.ucore.util.EnumSet;
import io.anuke.ucore.util.Geometry;
import io.anuke.ucore.util.Mathf;
import static io.anuke.mindustry.Vars.*;
@@ -27,12 +29,12 @@ import static io.anuke.mindustry.Vars.*;
/**Class used for indexing special target blocks for AI.*/
public class BlockIndexer {
/**Size of one ore quadrant.*/
private final static int oreQuadrantSize = 12;
private final static int oreQuadrantSize = 20;
/**Size of one structure quadrant.*/
private final static int structQuadrantSize = 12;
/**Set of all ores that are being scanned.*/
private final ObjectSet<Item> scanOres = ObjectSet.with(Items.iron, Items.coal, Items.lead, Items.thorium, Items.titanium);
private final ObjectSet<Item> scanOres = ObjectSet.with(Items.tungsten, Items.coal, Items.lead, Items.thorium, Items.titanium);
/**Stores all ore quadtrants on the map.*/
private ObjectMap<Item, ObjectSet<Tile>> ores = new ObjectMap<>();
@@ -138,6 +140,24 @@ public class BlockIndexer {
return ores.get(item, emptyArray);
}
/**Find the closest ore block relative to a position.*/
public Tile findClosestOre(float xp, float yp, Item item){
Tile tile = Geometry.findClosest(xp, yp, world.indexer().getOrePositions(item));
if(tile == null) return null;
for (int x = Math.max(0, tile.x - oreQuadrantSize/2); x < tile.x + oreQuadrantSize/2 && x < world.width(); x++) {
for (int y = Math.max(0, tile.y - oreQuadrantSize/2); y < tile.y + oreQuadrantSize/2 && y < world.height(); y++) {
Tile res = world.tile(x, y);
if(res.block() == Blocks.air && res.floor().drops != null && res.floor().drops.item == item){
return res;
}
}
}
return null;
}
private void process(Tile tile){
if(tile.block().flags != null &&
tile.getTeam() != Team.none){
@@ -222,7 +242,7 @@ public class BlockIndexer {
Tile tile = world.tile(x, y);
//add position of quadrant to list when an ore is found
if(tile.floor().drops != null && scanOres.contains(tile.floor().drops.item)){
if(tile.floor().drops != null && scanOres.contains(tile.floor().drops.item) && tile.block() == Blocks.air){
ores.get(tile.floor().drops.item).add(world.tile(
//make sure to clamp quadrant middle position, since it might go off bounds
Mathf.clamp(qx * oreQuadrantSize + oreQuadrantSize /2, 0, world.width() - 1),

View File

@@ -8,14 +8,17 @@ import io.anuke.mindustry.type.AmmoType;
import io.anuke.mindustry.type.ContentList;
public class AmmoTypes implements ContentList {
public static AmmoType bulletIron, bulletLead, bulletSteel, bulletThorium, bulletSilicon, bulletThermite, flakLead, flakExplosive, flakPlastic, flakSurge, missileExplosive, missileIncindiary, missileSurge, artilleryLead, artilleryThorium, artilleryPlastic, artilleryHoming, artilleryIncindiary, basicFlame, lancerLaser, lightning, spectreLaser, meltdownLaser, fuseShotgun, oil, water, lava, cryofluid;
public static AmmoType bulletIron, bulletLead, bulletSteel, bulletThorium, bulletSilicon, bulletThermite,
flakLead, flakExplosive, flakPlastic, flakSurge, missileExplosive, missileIncindiary, missileSurge,
artilleryLead, artilleryThorium, artilleryPlastic, artilleryHoming, artilleryIncindiary,
basicFlame, lancerLaser, lightning, spectreLaser, meltdownLaser, fuseShotgun, oil, water, lava, cryofluid;
@Override
public void load() {
//bullets
bulletIron = new AmmoType(Items.iron, StandardBullets.iron, 3) {{
bulletIron = new AmmoType(Items.tungsten, StandardBullets.iron, 3) {{
shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke;
}};
@@ -25,7 +28,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootSmallSmoke;
}};
bulletSteel = new AmmoType(Items.steel, StandardBullets.steel, 3) {{
bulletSteel = new AmmoType(Items.carbide, StandardBullets.steel, 3) {{
shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke;
}};
@@ -127,7 +130,7 @@ public class AmmoTypes implements ContentList {
meltdownLaser = new AmmoType(TurretBullets.lancerLaser);
fuseShotgun = new AmmoType(Items.iron, TurretBullets.fuseShot, 0.1f);
fuseShotgun = new AmmoType(Items.tungsten, TurretBullets.fuseShot, 0.1f);
//liquid

View File

@@ -8,7 +8,8 @@ import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.ItemType;
public class Items implements ContentList{
public static Item stone, iron, lead, coal, steel, titanium, thorium, silicon, plasteel, phasematter, surgealloy, biomatter, sand, blastCompound, thermite;
public static Item stone, tungsten, lead, coal, carbide, titanium, thorium, silicon, plasteel, phasematter, surgealloy,
biomatter, sand, blastCompound, thermite;
@Override
public void load() {
@@ -17,7 +18,7 @@ public class Items implements ContentList{
hardness = 3;
}};
iron = new Item("iron", Color.valueOf("bc8271")) {{
tungsten = new Item("tungsten", Color.valueOf("a0b0c8")) {{
type = ItemType.material;
hardness = 1;
}};
@@ -33,7 +34,7 @@ public class Items implements ContentList{
hardness = 2;
}};
steel = new Item("steel", Color.valueOf("e2e2e2")) {{
carbide = new Item("carbide", Color.valueOf("e2e2e2")) {{
type = ItemType.material;
}};

View File

@@ -13,46 +13,77 @@ public class Recipes implements ContentList{
@Override
public void load (){
new Recipe(defense, DefenseBlocks.ironwall, new ItemStack(Items.iron, 12));
new Recipe(defense, DefenseBlocks.ironwalllarge, new ItemStack(Items.iron, 12*4));
//WALLS
new Recipe(defense, DefenseBlocks.tungstenWall, new ItemStack(Items.tungsten, 12));
new Recipe(defense, DefenseBlocks.tungstenWallLarge, new ItemStack(Items.tungsten, 12*4));
new Recipe(weapon, WeaponBlocks.duo, new ItemStack(Items.iron, 12));
new Recipe(weapon, WeaponBlocks.scatter, new ItemStack(Items.iron, 8), new ItemStack(Items.lead, 6));
new Recipe(weapon, WeaponBlocks.scorch, new ItemStack(Items.iron, 12), new ItemStack(Items.lead, 8));
new Recipe(weapon, WeaponBlocks.hail, new ItemStack(Items.iron, 12), new ItemStack(Items.lead, 12), new ItemStack(Items.steel, 6));
//TURRETS
new Recipe(weapon, WeaponBlocks.duo, new ItemStack(Items.tungsten, 20));
new Recipe(weapon, WeaponBlocks.scorch, new ItemStack(Items.tungsten, 25), new ItemStack(Items.carbide, 20));
new Recipe(weapon, WeaponBlocks.hail, new ItemStack(Items.tungsten, 25), new ItemStack(Items.carbide, 25));
new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.iron, 1));
new Recipe(distribution, DistributionBlocks.titaniumconveyor, new ItemStack(Items.iron, 2), new ItemStack(Items.titanium, 1));
new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 4));
new Recipe(distribution, DistributionBlocks.multiplexer, new ItemStack(Items.iron, 8), new ItemStack(Items.lead, 8));
new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.iron, 2));
new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.iron, 4), new ItemStack(Items.lead, 4));
new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 4));
new Recipe(distribution, DistributionBlocks.overflowgate, new ItemStack(Items.steel, 4));
new Recipe(distribution, DistributionBlocks.bridgeconveyor, new ItemStack(Items.steel, 8), new ItemStack(Items.iron, 8));
new Recipe(weapon, WeaponBlocks.lancer, new ItemStack(Items.tungsten, 25), new ItemStack(Items.lead, 25), new ItemStack(Items.silicon, 25));
new Recipe(weapon, WeaponBlocks.arc, new ItemStack(Items.tungsten, 25), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 30));
new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.iron, 40), new ItemStack(Items.lead, 30));
new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.iron, 60), new ItemStack(Items.steel, 60), new ItemStack(Items.lead, 50));
new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.iron, 60), new ItemStack(Items.steel, 60), new ItemStack(Items.lead, 50));
//DISTRIBUTION
new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.lead, 1));
new Recipe(power, PowerBlocks.powernode, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 6));
//new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.steel, 3), new ItemStack(Items.iron, 3));
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.iron, 8), new ItemStack(Items.lead, 30));
//new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.steel, 5), new ItemStack(Items.iron, 5));
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.iron, 30), new ItemStack(Items.lead, 30));
new Recipe(distribution, DistributionBlocks.titaniumconveyor, new ItemStack(Items.lead, 2), new ItemStack(Items.titanium, 1));
//new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.steel, 50));
//new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.steel, 50));
//new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.steel, 5));
//new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.steel, 5));
//starter tungsten transporation
new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.lead, 2));
new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.lead, 2));
new Recipe(production, ProductionBlocks.ironDrill, new ItemStack(Items.iron, 15));
new Recipe(production, ProductionBlocks.reinforcedDrill, new ItemStack(Items.iron, 20), new ItemStack(Items.lead, 20));
new Recipe(production, ProductionBlocks.steelDrill, new ItemStack(Items.iron, 40), new ItemStack(Items.lead, 25), new ItemStack(Items.steel, 25));
new Recipe(production, ProductionBlocks.titaniumDrill, new ItemStack(Items.iron, 40), new ItemStack(Items.titanium, 40), new ItemStack(Items.steel, 40));
//advanced carbide transporation
new Recipe(distribution, DistributionBlocks.router, 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.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.bridgeconveyor, new ItemStack(Items.carbide, 8), new ItemStack(Items.tungsten, 8));
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.iron, 50), new ItemStack(Items.lead, 50));
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 20), new ItemStack(Items.steel, 10));
//CRAFTING
new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.tungsten, 40));
new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50));
new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.carbide, 60), new ItemStack(Items.lead, 50));
new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 50));
//POWER
new Recipe(power, PowerBlocks.powernode, new ItemStack(Items.tungsten, 2), new ItemStack(Items.lead, 6));
new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.carbide, 5), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6));
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.tungsten, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4));
new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.carbide, 16), new ItemStack(Items.tungsten, 16), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 20));
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 30));
//new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.carbide, 50));
//new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.carbide, 50));
//new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.carbide, 5));
//new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.carbide, 5));
//DRILLS, PRODUCERS
new Recipe(production, ProductionBlocks.tungstenDrill, new ItemStack(Items.tungsten, 30));
new Recipe(production, ProductionBlocks.carbideDrill, new ItemStack(Items.tungsten, 40), new ItemStack(Items.carbide, 40));
new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 40));
//UNITS
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30));
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 20));
//LIQUIDS
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1));
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.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.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, 10), new ItemStack(Items.lead, 10), new ItemStack(Items.silicon, 10));
//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(production, ProductionBlocks.laserdrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
@@ -64,57 +95,56 @@ public class Recipes implements ContentList{
//new Recipe(distribution, DistributionBlocks.laserconveyor, new ItemStack(Items.steel, 5));
//new Recipe(distribution, DistributionBlocks.massdriver, new ItemStack(Items.steel, 1));
//new Recipe(distribution, DistributionBlocks.laserconveyor, new ItemStack(Items.carbide, 5));
//new Recipe(distribution, DistributionBlocks.massdriver, new ItemStack(Items.carbide, 1));
/*
new Recipe(defense, DefenseBlocks.steelwall, new ItemStack(Items.steel, 12));
new Recipe(defense, DefenseBlocks.steelwall, new ItemStack(Items.carbide, 12));
new Recipe(defense, DefenseBlocks.titaniumwall, new ItemStack(Items.titanium, 12));
new Recipe(defense, DefenseBlocks.diriumwall, new ItemStack(Items.surgealloy, 12));
new Recipe(defense, DefenseBlocks.steelwalllarge, new ItemStack(Items.steel, 12 * 4));
new Recipe(defense, DefenseBlocks.steelwalllarge, new ItemStack(Items.carbide, 12 * 4));
new Recipe(defense, DefenseBlocks.titaniumwalllarge, new ItemStack(Items.titanium, 12 * 4));
new Recipe(defense, DefenseBlocks.diriumwall, new ItemStack(Items.surgealloy, 12 * 4));
new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.steel, 3), new ItemStack(Items.iron, 3 * 4));
new Recipe(defense, DefenseBlocks.largedoor, new ItemStack(Items.steel, 3 * 4), new ItemStack(Items.iron, 3 * 4 * 4));
new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.carbide, 3), new ItemStack(Items.tungsten, 3 * 4));
new Recipe(defense, DefenseBlocks.largedoor, new ItemStack(Items.carbide, 3 * 4), new ItemStack(Items.tungsten, 3 * 4 * 4));
new Recipe(defense, DefenseBlocks.deflectorwall, new ItemStack(Items.titanium, 1));
new Recipe(defense, DefenseBlocks.deflectorwalllarge, new ItemStack(Items.titanium, 1));
new Recipe(defense, DefenseBlocks.phasewall, new ItemStack(Items.titanium, 1));
new Recipe(defense, DefenseBlocks.phasewalllarge, new ItemStack(Items.titanium, 1));
new Recipe(weapon, WeaponBlocks.wave, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.lancer, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.arc, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.swarmer, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.ripple, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.fuse, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.ripple, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.cyclone, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.spectre, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.meltdown, new ItemStack(Items.tungsten, 1));
new Recipe(weapon, WeaponBlocks.wave, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.lancer, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.arc, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.swarmer, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.ripple, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.fuse, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.ripple, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.cyclone, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.spectre, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.meltdown, new ItemStack(Items.iron, 1));
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.alloysmelter, new ItemStack(Items.titanium, 50), new ItemStack(Items.steel, 50));
new Recipe(crafting, CraftingBlocks.alloyfuser, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 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.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.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.plasteelcompressor, 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.stoneFormer, new ItemStack(Items.carbide, 10), new ItemStack(Items.tungsten, 10));
new Recipe(crafting, CraftingBlocks.melter, new ItemStack(Items.carbide, 30), new ItemStack(Items.titanium, 15));
new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.carbide, 60), new ItemStack(Items.tungsten, 60));
new Recipe(crafting, CraftingBlocks.phaseweaver, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30));
new Recipe(crafting, CraftingBlocks.separator, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30));
new Recipe(crafting, CraftingBlocks.centrifuge, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30));
new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30));
new Recipe(crafting, CraftingBlocks.oilRefinery, new ItemStack(Items.steel, 15), new ItemStack(Items.iron, 15));
new Recipe(crafting, CraftingBlocks.biomatterCompressor, new ItemStack(Items.steel, 15), new ItemStack(Items.iron, 15));
new Recipe(crafting, CraftingBlocks.plasteelcompressor, new ItemStack(Items.steel, 30), new ItemStack(Items.titanium, 15));
new Recipe(crafting, CraftingBlocks.cryofluidmixer, new ItemStack(Items.steel, 30), new ItemStack(Items.titanium, 15));
new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.steel, 10), new ItemStack(Items.iron, 10));
new Recipe(crafting, CraftingBlocks.stoneFormer, new ItemStack(Items.steel, 10), new ItemStack(Items.iron, 10));
new Recipe(crafting, CraftingBlocks.melter, new ItemStack(Items.steel, 30), new ItemStack(Items.titanium, 15));
new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.steel, 60), new ItemStack(Items.iron, 60));
new Recipe(production, ProductionBlocks.ironDrill, new ItemStack(Items.iron, 25));
new Recipe(production, ProductionBlocks.reinforcedDrill, new ItemStack(Items.iron, 25));
new Recipe(production, ProductionBlocks.steelDrill, new ItemStack(Items.iron, 25));
new Recipe(production, ProductionBlocks.titaniumDrill, new ItemStack(Items.iron, 25));
new Recipe(production, ProductionBlocks.tungstenDrill, new ItemStack(Items.tungsten, 25));
new Recipe(production, ProductionBlocks.reinforcedDrill, new ItemStack(Items.tungsten, 25));
new Recipe(production, ProductionBlocks.carbideDrill, new ItemStack(Items.tungsten, 25));
new Recipe(production, ProductionBlocks.titaniumDrill, new ItemStack(Items.tungsten, 25));
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.plasmadrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
@@ -122,56 +152,57 @@ public class Recipes implements ContentList{
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(power, PowerBlocks.powernode, new ItemStack(Items.steel, 3), new ItemStack(Items.iron, 3));
new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.steel, 3), new ItemStack(Items.iron, 3));
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.steel, 5), new ItemStack(Items.iron, 5));
new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.steel, 5), new ItemStack(Items.iron, 5));
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.iron, 1));
new Recipe(power, PowerBlocks.turbinegenerator, new ItemStack(Items.iron, 1));
new Recipe(power, PowerBlocks.thermalgenerator, new ItemStack(Items.steel, 1));
new Recipe(power, PowerBlocks.rtgenerator, new ItemStack(Items.titanium, 1), new ItemStack(Items.steel, 1));
new Recipe(power, PowerBlocks.solarpanel, new ItemStack(Items.iron, 30), new ItemStack(Items.silicon, 20));
new Recipe(power, PowerBlocks.largesolarpanel, new ItemStack(Items.iron, 30), new ItemStack(Items.silicon, 20));
new Recipe(power, PowerBlocks.nuclearReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.steel, 50));
new Recipe(power, PowerBlocks.fusionReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.steel, 50));
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.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.combustiongenerator, new ItemStack(Items.tungsten, 1));
new Recipe(distribution, PowerBlocks.warpgate, new ItemStack(Items.steel, 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.rtgenerator, 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.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.fusionReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.carbide, 50));
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.steel, 1));
new Recipe(liquid, LiquidBlocks.pulseconduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.steel, 1));
new Recipe(liquid, LiquidBlocks.liquidrouter, new ItemStack(Items.steel, 2));
new Recipe(liquid, LiquidBlocks.liquidtank, new ItemStack(Items.steel, 2));
new Recipe(liquid, LiquidBlocks.liquidjunction, new ItemStack(Items.steel, 2));
new Recipe(liquid, LiquidBlocks.bridgeconduit, new ItemStack(Items.titanium, 2), new ItemStack(Items.steel, 2));
new Recipe(liquid, LiquidBlocks.laserconduit, new ItemStack(Items.titanium, 2), new ItemStack(Items.steel, 2));
new Recipe(distribution, PowerBlocks.warpgate, new ItemStack(Items.carbide, 1));
new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.steel, 10));
new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.steel, 10), new ItemStack(Items.surgealloy, 5));
new Recipe(liquid, LiquidBlocks.thermalPump, new ItemStack(Items.steel, 10), new ItemStack(Items.surgealloy, 5));
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.liquidrouter, 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.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(units, UnitBlocks.repairPoint, new ItemStack(Items.steel, 10));
new Recipe(units, UnitBlocks.dropPoint, new ItemStack(Items.steel, 10));
new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.steel, 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.thermalPump, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5));
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.iron, 50));
new Recipe(units, UnitBlocks.reconstructor, new ItemStack(Items.iron, 1));
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.carbide, 10));
new Recipe(units, UnitBlocks.dropPoint, new ItemStack(Items.carbide, 10));
new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.carbide, 10));
new Recipe(units, UnitBlocks.overdriveProjector, new ItemStack(Items.iron, 1));
new Recipe(units, UnitBlocks.shieldProjector, new ItemStack(Items.iron, 1));
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 50));
new Recipe(units, UnitBlocks.reconstructor, new ItemStack(Items.tungsten, 1));
new Recipe(units, UpgradeBlocks.omegaFactory, new ItemStack(Items.iron, 1));
new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.iron, 1));
new Recipe(units, UpgradeBlocks.tauFactory, new ItemStack(Items.iron, 1));
new Recipe(units, UnitBlocks.overdriveProjector, new ItemStack(Items.tungsten, 1));
new Recipe(units, UnitBlocks.shieldProjector, new ItemStack(Items.tungsten, 1));
new Recipe(units, UpgradeBlocks.tridentFactory, new ItemStack(Items.iron, 1));
new Recipe(units, UpgradeBlocks.javelinFactory, new ItemStack(Items.iron, 1));
new Recipe(units, UpgradeBlocks.halberdFactory, new ItemStack(Items.iron, 1));
new Recipe(units, UpgradeBlocks.omegaFactory, new ItemStack(Items.tungsten, 1));
new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.tungsten, 1));
new Recipe(units, UpgradeBlocks.tauFactory, new ItemStack(Items.tungsten, 1));
new Recipe(units, DebugBlocks.itemSource, new ItemStack(Items.steel, 10)).setDebug();
new Recipe(units, DebugBlocks.itemVoid, new ItemStack(Items.steel, 10)).setDebug();
new Recipe(units, DebugBlocks.liquidSource, new ItemStack(Items.steel, 10)).setDebug();
new Recipe(units, DebugBlocks.powerVoid, new ItemStack(Items.steel, 10)).setDebug();
new Recipe(units, DebugBlocks.powerInfinite, new ItemStack(Items.steel, 10), new ItemStack(Items.surgealloy, 5)).setDebug();*/
new Recipe(units, UpgradeBlocks.tridentFactory, new ItemStack(Items.tungsten, 1));
new Recipe(units, UpgradeBlocks.javelinFactory, new ItemStack(Items.tungsten, 1));
new Recipe(units, UpgradeBlocks.halberdFactory, new ItemStack(Items.tungsten, 1));
new Recipe(units, DebugBlocks.itemSource, new ItemStack(Items.carbide, 10)).setDebug();
new Recipe(units, DebugBlocks.itemVoid, 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.powerInfinite, new ItemStack(Items.carbide, 10), new ItemStack(Items.surgealloy, 5)).setDebug();*/
}
@Override

View File

@@ -19,6 +19,7 @@ public class UnitTypes implements ContentList {
drag = 0.01f;
speed = 0.2f;
maxVelocity = 0.8f;
ammoCapacity = 0;
range = 50f;
}};

View File

@@ -101,8 +101,8 @@ public class Blocks extends BlockList implements ContentList{
drops = new ItemStack(Items.stone, 1);
}};
iron = new Ore("iron") {{
drops = new ItemStack(Items.iron, 1);
iron = new Ore("tungsten") {{
drops = new ItemStack(Items.tungsten, 1);
}};
lead = new Ore("lead") {{

View File

@@ -17,9 +17,9 @@ public class CraftingBlocks extends BlockList implements ContentList {
public void load() {
smelter = new Smelter("smelter") {{
health = 70;
inputs = new Item[]{Items.iron};
inputs = new Item[]{Items.tungsten};
fuel = Items.coal;
result = Items.steel;
result = Items.carbide;
craftTime = 35f;
useFlux = true;
}};
@@ -27,8 +27,8 @@ public class CraftingBlocks extends BlockList implements ContentList {
arcsmelter = new PowerSmelter("arc-smelter") {{
health = 90;
craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.iron, 1)};
result = Items.steel;
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.tungsten, 1)};
result = Items.carbide;
powerUse = 0.1f;
craftTime = 25f;
size = 2;
@@ -51,7 +51,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
plasteelcompressor = new PlasteelCompressor("plasteel-compressor") {{
inputLiquid = Liquids.oil;
inputItem = new ItemStack(Items.steel, 1);
inputItem = new ItemStack(Items.carbide, 1);
liquidUse = 0.3f;
liquidCapacity = 60f;
powerUse = 0.5f;
@@ -130,7 +130,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
null, null, null, null, null, null, null, null, null, null,
Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand,
Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone,
Items.iron, Items.iron, Items.iron, Items.iron,
Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten,
Items.lead, Items.lead,
Items.coal, Items.coal,
Items.titanium
@@ -148,7 +148,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
null, null, null, null, null, null, null, null, null, null, null, null, null,
Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand,
Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone,
Items.iron, Items.iron, Items.iron, Items.iron, Items.iron,
Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten,
Items.lead, Items.lead, Items.lead,
Items.coal, Items.coal, Items.coal,
Items.titanium, Items.titanium,

View File

@@ -9,46 +9,37 @@ import io.anuke.mindustry.world.blocks.defense.Door;
import io.anuke.mindustry.world.blocks.defense.PhaseWall;
public class DefenseBlocks extends BlockList implements ContentList {
public static Block ironwall, ironwalllarge, steelwall, titaniumwall, diriumwall, steelwalllarge, titaniumwalllarge, diriumwalllarge, door, largedoor, deflectorwall, deflectorwalllarge,
public static Block tungstenWall, tungstenWallLarge, carbideWall, carbideWallLarge, thoriumWall, thoriumWallLarge, door, largedoor, deflectorwall, deflectorwalllarge,
phasewall, phasewalllarge;
@Override
public void load() {
int wallHealthMultiplier = 4;
ironwall = new Wall("ironwall") {{
tungstenWall = new Wall("tungsten-wall") {{
health = 80 * wallHealthMultiplier;
}};
ironwalllarge = new Wall("ironwall-large") {{
tungstenWallLarge = new Wall("tungsten-wall-large") {{
health = 80 * 4 * wallHealthMultiplier;
size = 2;
}};
steelwall = new Wall("steelwall") {{
carbideWall = new Wall("carbide-wall") {{
health = 110 * wallHealthMultiplier;
}};
titaniumwall = new Wall("titaniumwall") {{
health = 150 * wallHealthMultiplier;
}};
diriumwall = new Wall("duriumwall") {{
health = 190 * wallHealthMultiplier;
}};
steelwalllarge = new Wall("steelwall-large") {{
health = 110 * 4 * wallHealthMultiplier;
carbideWallLarge = new Wall("carbide-wall-large") {{
health = 110 * wallHealthMultiplier*4;
size = 2;
}};
titaniumwalllarge = new Wall("titaniumwall-large") {{
health = 150 * 4 * wallHealthMultiplier;
size = 2;
thoriumWall = new Wall("thorium-wall") {{
health = 110 * wallHealthMultiplier;
}};
diriumwalllarge = new Wall("duriumwall-large") {{
health = 190 * 4 * wallHealthMultiplier;
thoriumWallLarge = new Wall("thorium-wall-large") {{
health = 110 * wallHealthMultiplier*4;
size = 2;
}};

View File

@@ -12,41 +12,31 @@ import io.anuke.mindustry.world.blocks.production.Fracker;
import io.anuke.mindustry.world.blocks.production.SolidPump;
public class ProductionBlocks extends BlockList implements ContentList {
public static Block ironDrill, reinforcedDrill, steelDrill, titaniumDrill, laserdrill, nucleardrill, plasmadrill, waterextractor, oilextractor, cultivator;
public static Block tungstenDrill, carbideDrill, laserdrill, blastdrill, plasmadrill, waterextractor, oilextractor, cultivator;
@Override
public void load() {
ironDrill = new Drill("irondrill") {{
tier = 1;
tungstenDrill = new Drill("tungsten-drill") {{
tier = 2;
drillTime = 360;
}};
reinforcedDrill = new Drill("reinforceddrill") {{
tier = 2;
drillTime = 320;
}};
steelDrill = new Drill("steeldrill") {{
carbideDrill = new Drill("carbide-drill") {{
tier = 3;
drillTime = 280;
}};
titaniumDrill = new Drill("titaniumdrill") {{
tier = 4;
drillTime = 240;
}};
laserdrill = new Drill("laserdrill") {{
laserdrill = new Drill("laser-drill") {{
drillTime = 180;
size = 2;
powerUse = 0.2f;
hasPower = true;
tier = 5;
tier = 4;
updateEffect = BlockFx.pulverizeMedium;
drillEffect = BlockFx.mineBig;
}};
nucleardrill = new Drill("nucleardrill") {{
blastdrill = new Drill("blast-drill") {{
drillTime = 120;
size = 3;
powerUse = 0.5f;
@@ -60,7 +50,7 @@ public class ProductionBlocks extends BlockList implements ContentList {
warmupSpeed = 0.01f;
}};
plasmadrill = new Drill("plasmadrill") {{
plasmadrill = new Drill("plasma-drill") {{
heatColor = Color.valueOf("ff461b");
drillTime = 90;
size = 4;
@@ -76,7 +66,7 @@ public class ProductionBlocks extends BlockList implements ContentList {
warmupSpeed = 0.005f;
}};
waterextractor = new SolidPump("waterextractor") {{
waterextractor = new SolidPump("water-extractor") {{
result = Liquids.water;
powerUse = 0.2f;
pumpAmount = 0.1f;
@@ -85,7 +75,7 @@ public class ProductionBlocks extends BlockList implements ContentList {
rotateSpeed = 1.4f;
}};
oilextractor = new Fracker("oilextractor") {{
oilextractor = new Fracker("oil-extractor") {{
result = Liquids.oil;
inputLiquid = Liquids.water;
updateEffect = BlockFx.pulverize;

View File

@@ -17,7 +17,7 @@ public class UnitBlocks extends BlockList implements ContentList {
produceTime = 300;
size = 2;
requirements = new ItemStack[]{
new ItemStack(Items.iron, 20)
new ItemStack(Items.tungsten, 20)
};
}};

View File

@@ -13,7 +13,7 @@ import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Strings;
public class WeaponBlocks extends BlockList implements ContentList {
public static Block duo, scatter, scorch, hail, wave, lancer, arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown;
public static Block duo, /*scatter,*/ scorch, hail, wave, lancer, arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown;
@Override
public void load() {
@@ -23,7 +23,7 @@ public class WeaponBlocks extends BlockList implements ContentList {
restitution = 0.03f;
ammoUseEffect = ShootFx.shellEjectSmall;
}};
/*
scatter = new BurstTurret("scatter") {{
ammoTypes = new AmmoType[]{AmmoTypes.flakLead, AmmoTypes.flakExplosive, AmmoTypes.flakPlastic};
ammoPerShot = 1;
@@ -34,23 +34,23 @@ public class WeaponBlocks extends BlockList implements ContentList {
burstSpacing = 1f;
inaccuracy = 7f;
ammoUseEffect = ShootFx.shellEjectSmall;
}};
scorch = new LiquidTurret("scorch") {{
ammoTypes = new AmmoType[]{AmmoTypes.basicFlame};
recoil = 0f;
reload = 5f;
shootCone = 50f;
ammoUseEffect = ShootFx.shellEjectSmall;
drawer = (tile, entity) -> Draw.rect(entity.target != null ? name + "-shoot" : name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
}};
}};*/
hail = new ItemTurret("hail") {{
ammoTypes = new AmmoType[]{AmmoTypes.artilleryLead, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary};
reload = 40f;
}};
scorch = new LiquidTurret("scorch") {{
ammoTypes = new AmmoType[]{AmmoTypes.basicFlame};
recoil = 0f;
reload = 5f;
shootCone = 50f;
ammoUseEffect = ShootFx.shellEjectSmall;
drawer = (tile, entity) -> Draw.rect(entity.target != null ? name + "-shoot" : name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
}};
wave = new LiquidTurret("wave") {{
ammoTypes = new AmmoType[]{AmmoTypes.water, AmmoTypes.lava, AmmoTypes.cryofluid, AmmoTypes.oil};
size = 2;

View File

@@ -74,7 +74,7 @@ public class TurretBullets extends BulletList implements ContentList {
}
};
basicFlame = new BulletType(2f, 0) {
basicFlame = new BulletType(2f, 5) {
{
hitsize = 7f;
lifetime = 30f;

View File

@@ -353,7 +353,7 @@ public class Control extends Module{
}
//check unlocks every 2 seconds
if(Timers.get("timerCheckUnlock", 120)){
if(!state.mode.infiniteResources && !state.mode.disableWaveTimer && Timers.get("timerCheckUnlock", 120)){
checkUnlockableBlocks();
//save if the db changed

View File

@@ -57,7 +57,8 @@ public class Logic extends Module {
}
}
}else{
tile.entity.items.addItem(Items.iron, 100);
tile.entity.items.addItem(Items.tungsten, 50);
tile.entity.items.addItem(Items.lead, 20);
}
}
}

View File

@@ -13,7 +13,7 @@ import io.anuke.mindustry.io.MapIO;
import io.anuke.mindustry.io.Maps;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.WorldGenerator;
import io.anuke.mindustry.world.mapgen.WorldGenerator;
import io.anuke.ucore.core.Events;
import io.anuke.ucore.entities.EntityPhysics;
import io.anuke.ucore.modules.Module;

View File

@@ -2,6 +2,7 @@ package io.anuke.mindustry.entities;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.Pools;
import com.badlogic.gdx.utils.Queue;
@@ -87,6 +88,12 @@ public class Player extends Unit implements BuilderTrait, CarryTrait {
//region unit and event overrides, utility methods
@Override
public TextureRegion getIconRegion() {
return mech.iconRegion;
}
@Override
public int getItemCapacity() {
return mech.itemCapacity;

View File

@@ -1,5 +1,6 @@
package io.anuke.mindustry.entities;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import io.anuke.mindustry.content.blocks.Blocks;
import io.anuke.mindustry.entities.traits.*;
@@ -287,6 +288,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
return false;
}
public abstract TextureRegion getIconRegion();
public abstract int getItemCapacity();
public abstract int getAmmoCapacity();
public abstract float getArmor();

View File

@@ -9,6 +9,8 @@ import io.anuke.mindustry.entities.Unit;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.net.In;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.EntityGroup;
import io.anuke.ucore.entities.impl.TimedEntity;
import io.anuke.ucore.entities.trait.DrawTrait;
@@ -42,6 +44,14 @@ public class ItemTransfer extends TimedEntity implements DrawTrait{
create(item, x, y, to, () -> {});
}
@Remote(in = In.entities, called = Loc.server)
public static void transferItemTo(Item item, int amount, float x, float y, Tile tile){
for (int i = 0; i < Mathf.clamp(amount/3, 1, 8); i++) {
Timers.run(i*3, () -> create(item, x, y, tile, () -> {}));
}
tile.entity.items.addItem(item, amount);
}
public static void create(Item item, float fromx, float fromy, PosTrait to, Callable done){
ItemTransfer tr = Pools.obtain(ItemTransfer.class);
tr.item = item;

View File

@@ -197,7 +197,9 @@ public interface BuilderTrait {
BuildEntity entity = tile.entity();
entity.addProgress(core.items, 1f / entity.recipe.cost * Timers.delta() * getBuildPower(tile));
entity.lastBuilder = (Player)unit;
if(unit instanceof Player){
entity.lastBuilder = (Player)unit;
}
unit.rotation = Mathf.slerpDelta(unit.rotation, unit.angleTo(entity), 0.4f);
getCurrentRequest().progress = entity.progress();
}
@@ -230,7 +232,7 @@ public interface BuilderTrait {
}
}
/**Draw placement effects for an entity.*/
/**Draw placement effects for an entity. This includes mining*/
default void drawBuilding(Unit unit){
if(!isBuilding()){
if(getMineTile() != null){
@@ -294,8 +296,11 @@ public interface BuilderTrait {
Draw.color(Color.LIGHT_GRAY, Color.WHITE, 1f-flashScl + Mathf.absin(Timers.time(), 0.5f, flashScl));
Shapes.laser("minelaser", "minelaser-end", px, py, ex, ey);
Draw.color(Palette.accent);
Lines.poly(tile.worldx(), tile.worldy(), 4, tilesize/2f * Mathf.sqrt2, Timers.time());
if(unit instanceof Player && ((Player) unit).isLocal) {
Draw.color(Palette.accent);
Lines.poly(tile.worldx(), tile.worldy(), 4, tilesize / 2f * Mathf.sqrt2, Timers.time());
}
Draw.color();
}

View File

@@ -1,5 +1,6 @@
package io.anuke.mindustry.entities.units;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.annotations.Annotations.Loc;
import io.anuke.annotations.Annotations.Remote;
import io.anuke.mindustry.content.fx.ExplosionFx;
@@ -19,6 +20,7 @@ import io.anuke.mindustry.world.meta.BlockFlag;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.EntityGroup;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Geometry;
import io.anuke.ucore.util.Mathf;
@@ -49,6 +51,10 @@ public abstract class BaseUnit extends Unit{
this.team = team;
}
public UnitType getType() {
return type;
}
/**internal constructor used for deserialization, DO NOT USE*/
public BaseUnit(){}
@@ -121,6 +127,11 @@ public abstract class BaseUnit extends Unit{
return null;
}
@Override
public TextureRegion getIconRegion() {
return Draw.region(type.name);
}
@Override
public int getItemCapacity() {
return type.itemCapacity;

View File

@@ -7,14 +7,12 @@ import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Trail;
import io.anuke.mindustry.type.AmmoType;
import io.anuke.mindustry.type.ItemStack;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.meta.BlockFlag;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Geometry;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Translator;
import io.anuke.ucore.util.*;
import static io.anuke.mindustry.Vars.world;
@@ -54,7 +52,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
public void update() {
super.update();
rotation = velocity.angle();
updateRotation();
trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness),
y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness));
}
@@ -65,6 +63,21 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
Draw.rect(type.name, x, y, rotation - 90);
float backTrns = 4f, itemSize = 5f;
if(inventory.hasItem()){
ItemStack stack = inventory.getItem();
int stored = Mathf.clamp(stack.amount / 6, 1, 8);
for(int i = 0; i < stored; i ++) {
float angT = i == 0 ? 0 : Mathf.randomSeedRange(i + 2, 60f);
float lenT = i == 0 ? 0 : Mathf.randomSeedRange(i + 3, 1f) - 1f;
Draw.rect(stack.item.region,
x + Angles.trnsx(rotation + 180f + angT, backTrns + lenT),
y + Angles.trnsy(rotation + 180f + angT, backTrns + lenT),
itemSize, itemSize, rotation);
}
}
Draw.alpha(1f);
}
@@ -107,14 +120,37 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
dropCarry();
}
protected void updateRotation(){
rotation = velocity.angle();
}
protected void circle(float circleLength){
circle(circleLength, type.speed);
}
protected void circle(float circleLength, float speed){
if(target == null) return;
vec.set(target.getX() - x, target.getY() - y);
if(vec.len() < circleLength){
vec.rotate((circleLength-vec.len())/circleLength * 180f);
}
vec.setLength(type.speed * Timers.delta());
vec.setLength(speed * Timers.delta());
velocity.add(vec);
}
protected void moveTo(float circleLength){
if(target == null) return;
vec.set(target.getX() - x, target.getY() - y);
float length = Mathf.clamp((distanceTo(target) - circleLength)/100f, -1f, 1f);
vec.setLength(type.speed * Timers.delta() * length);
if(length < 0) vec.rotate(180f);
velocity.add(vec);
}

View File

@@ -10,7 +10,7 @@ public class UnitDrops {
public static void dropItems(BaseUnit unit){
if(dropTable == null){
dropTable = new Item[]{Items.iron, Items.lead, Items.steel};
dropTable = new Item[]{Items.tungsten, Items.lead, Items.carbide};
}
for(Item item : dropTable){

View File

@@ -32,7 +32,8 @@ public class UnitType {
public float armor = 0f;
public float carryWeight = 1f;
public int ammoCapacity = 100;
public int itemCapacity = 100;
public int itemCapacity = 30;
public int mineLevel = 2;
public ObjectMap<Item, AmmoType> ammo = new ObjectMap<>();
public UnitType(String name, UnitCreator creator){

View File

@@ -12,7 +12,9 @@ import io.anuke.mindustry.entities.units.UnitState;
import io.anuke.mindustry.entities.units.UnitType;
import io.anuke.mindustry.game.EventType.BlockBuildEvent;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.gen.CallEntity;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.BuildBlock;
import io.anuke.mindustry.world.blocks.BuildBlock.BuildEntity;
@@ -22,10 +24,7 @@ import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.EntityGroup;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Shapes;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Geometry;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.ThreadQueue;
import io.anuke.ucore.util.*;
import static io.anuke.mindustry.Vars.unitGroups;
import static io.anuke.mindustry.Vars.world;
@@ -33,16 +32,22 @@ import static io.anuke.mindustry.Vars.world;
public class Drone extends FlyingUnit implements BuilderTrait {
public static int typeID = -1;
protected static Item[] toMine;
protected static float healSpeed = 0.1f;
protected static float discoverRange = 120f;
protected static boolean initialized;
protected Item targetItem;
protected Tile mineTile;
protected Queue<BuildRequest> placeQueue = new ThreadQueue<>();
/**Initialize placement event notifier system.
* Static initialization is to be avoided, thus, this is done lazily.*/
private static void initEvents(){
if(initialized) return;
toMine = new Item[]{Items.lead, Items.tungsten};
Events.on(BlockBuildEvent.class, (team, tile) -> {
EntityGroup<BaseUnit> group = unitGroups[team.ordinal()];
@@ -57,17 +62,15 @@ public class Drone extends FlyingUnit implements BuilderTrait {
});
}
{
initEvents();
}
public Drone(UnitType type, Team team) {
super(type, team);
if(!initialized){
initEvents();
initialized = true;
}
}
public Drone(){
}
private void notifyPlaced(BuildEntity entity){
@@ -107,24 +110,25 @@ public class Drone extends FlyingUnit implements BuilderTrait {
@Override
public void update() {
float rot = rotation;
super.update();
rotation = rot;
if(target != null && state.is(repair)){
rotation = Mathf.slerpDelta(rot, angleTo(target), 0.3f);
}else{
rotation = Mathf.slerpDelta(rot, velocity.angle(), 0.3f);
}
x += Mathf.sin(Timers.time() + id * 999, 25f, 0.07f);
y += Mathf.cos(Timers.time() + id * 999, 25f, 0.07f);
updateBuilding(this);
}
@Override
protected void updateRotation() {
if(target != null && (state.is(repair) || state.is(mine))){
rotation = Mathf.slerpDelta(rotation, angleTo(target), 0.3f);
}else{
rotation = Mathf.slerpDelta(rotation, velocity.angle(), 0.3f);
}
if(velocity.len() <= 0.2f && !(state.is(repair) && target != null)){
rotation += Mathf.sin(Timers.time() + id * 99, 10f, 5f);
}
updateBuilding(this);
}
@Override
@@ -162,6 +166,14 @@ public class Drone extends FlyingUnit implements BuilderTrait {
return isBuilding() ? placeDistance*2f : 30f;
}
protected void findItem(){
TileEntity entity = getClosestCore();
if(entity == null){
return;
}
targetItem = Mathf.findMin(toMine, (a, b) -> -Integer.compare(entity.items.getItem(a), entity.items.getItem(b)));
}
public final UnitState
build = new UnitState(){
@@ -211,19 +223,66 @@ public class Drone extends FlyingUnit implements BuilderTrait {
}
},
mine = new UnitState() {
public void entered() {
setMineTile(null);
}
public void update() {
if(targetItem == null) {
findItem();
}
//if inventory is full, drop it off.
if(inventory.isFull()){
setState(drop);
}else{
//only mines iron for now
retarget(() -> target = Geometry.findClosest(x, y, world.indexer().getOrePositions(Items.iron)));
//only mines tungsten for now
retarget(() -> {
if(getMineTile() == null){
findItem();
}
if(targetItem == null) return;
target = world.indexer().findClosestOre(x, y, targetItem);
});
if(target != null) {
moveTo(type.range/1.5f);
if (distanceTo(target) < type.range) {
setMineTile((Tile)target);
}
}
}
}
public void exited() {
setMineTile(null);
}
},
drop = new UnitState() {
public void update() {
public void update() {
if(inventory.isEmpty()){
setState(mine);
return;
}
target = getClosestCore();
if(target == null) return;
TileEntity tile = (TileEntity)target;
if(distanceTo(target) < type.range
&& tile.tile.block().acceptStack(inventory.getItem().item, inventory.getItem().amount, tile.tile, Drone.this) == inventory.getItem().amount){
CallEntity.transferItemTo(inventory.getItem().item, inventory.getItem().amount, x, y, tile.tile);
inventory.clearItem();
setState(repair);
}
circle(type.range/1.8f);
}
},
retreat = new UnitState() {

View File

@@ -10,7 +10,7 @@ import io.anuke.mindustry.io.Map;
import io.anuke.mindustry.io.MapMeta;
import io.anuke.mindustry.io.MapTileData;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.WorldGenerator;
import io.anuke.mindustry.world.mapgen.WorldGenerator;
import io.anuke.mindustry.world.mapgen.ProcGen;
import io.anuke.ucore.core.Settings;
import io.anuke.ucore.core.Timers;
@@ -145,7 +145,7 @@ public class LevelDialog extends FloatingDialog{
EntityPhysics.resizeTree(0, 0, width * tilesize, height * tilesize);
WorldGenerator.generate(tiles, data, true, 0);
WorldGenerator.generate(tiles, data, true, Mathf.random(9999999));
world.endMapLoad();

View File

@@ -111,13 +111,6 @@ public class BlockInventoryFragment implements Fragment {
image.tapped(() -> {
if(!canPick.get() || items[f] == 0) return;
int amount = Math.min(Inputs.keyDown("item_withdraw") ? items[f] : 1, player.inventory.itemCapacityUsed(item));
/* tile.block().removeStack(tile, item, amount);
player.inventory.addItem(item, amount);
for(int j = 0; j < Mathf.clamp(amount/3, 1, 8); j ++){
Timers.run(j*3f, () -> ItemTransfer.create(item, tile.drawx(), tile.drawy(), player, () -> {}));
}*/
CallBlocks.requestItem(player, tile, item, amount);
});

View File

@@ -33,7 +33,7 @@ public class ColorMapper{
"6e501e", pair(Blocks.dirt),
"ed5334", pair(Blocks.lava),
"292929", pair(Blocks.oil),
"c3a490", pair(Blocks.iron),
"a0b0c8", pair(Blocks.iron),
"161616", pair(Blocks.coal),
"6277bc", pair(Blocks.titanium),
"c594dc", pair(Blocks.thorium),

View File

@@ -140,6 +140,10 @@ public class Tile implements PosTrait, TargetTrait {
return Team.values()[team];
}
public byte getTeamID(){
return team;
}
public void setTeam(Team team){
this.team = (byte)team.ordinal();
}

View File

@@ -115,7 +115,7 @@ public class Sorter extends Block implements SelectionTrait{
}
public static class SorterEntity extends TileEntity{
public Item sortItem = Items.iron;
public Item sortItem = Items.tungsten;
@Override
public void write(DataOutputStream stream) throws IOException{

View File

@@ -5,11 +5,14 @@ import com.badlogic.gdx.math.Rectangle;
import io.anuke.annotations.Annotations.Loc;
import io.anuke.annotations.Annotations.Remote;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.content.UnitTypes;
import io.anuke.mindustry.content.fx.Fx;
import io.anuke.mindustry.entities.Player;
import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.entities.Unit;
import io.anuke.mindustry.entities.Units;
import io.anuke.mindustry.entities.units.BaseUnit;
import io.anuke.mindustry.entities.units.UnitType;
import io.anuke.mindustry.gen.CallBlocks;
import io.anuke.mindustry.gen.CallEntity;
import io.anuke.mindustry.graphics.Palette;
@@ -32,8 +35,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import static io.anuke.mindustry.Vars.debug;
import static io.anuke.mindustry.Vars.state;
import static io.anuke.mindustry.Vars.*;
public class CoreBlock extends StorageBlock {
private static Rectangle rect = new Rectangle();
@@ -42,6 +44,7 @@ public class CoreBlock extends StorageBlock {
protected float supplyRadius = 50f;
protected float supplyInterval = 5f;
protected UnitType droneType = UnitTypes.drone;
public CoreBlock(String name) {
super(name);
@@ -71,10 +74,10 @@ public class CoreBlock extends StorageBlock {
Draw.rect(name + "-top", tile.drawx(), tile.drawy());
Draw.color();
if(entity.currentPlayer != null) {
Player player = entity.currentPlayer;
if(entity.currentUnit != null) {
Unit player = entity.currentUnit;
TextureRegion region = player.mech.iconRegion;
TextureRegion region = player.getIconRegion();
Shaders.build.region = region;
Shaders.build.progress = entity.progress;
@@ -149,7 +152,7 @@ public class CoreBlock extends StorageBlock {
CallBlocks.setCoreSolid(tile, true);
}
if(entity.currentPlayer != null){
if(entity.currentUnit != null){
entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f);
entity.time += Timers.delta();
entity.progress += 1f / Vars.respawnduration;
@@ -160,9 +163,31 @@ public class CoreBlock extends StorageBlock {
}
if(entity.progress >= 1f){
CallBlocks.onPlayerRespawn(tile, entity.currentPlayer);
CallBlocks.onUnitRespawn(tile, entity.currentUnit);
}
}else{
entity.warmup += Timers.delta();
if(entity.solid && entity.warmup > 10f && unitGroups[tile.getTeamID()].getByID(entity.droneID) == null && !Net.client()){
boolean found = false;
for(BaseUnit unit : unitGroups[tile.getTeamID()].all()){
if(unit.getType().id == droneType.id){
entity.droneID = unit.id;
found = true;
break;
}
}
if(!found) {
BaseUnit unit = droneType.create(tile.getTeam());
entity.droneID = unit.id;
unit.setDead(true);
CallBlocks.onCoreUnitSet(tile, unit);
}
}
entity.heat = Mathf.lerpDelta(entity.heat, 0f, 0.1f);
}
@@ -191,27 +216,34 @@ public class CoreBlock extends StorageBlock {
}
@Remote(called = Loc.server, in = In.blocks)
public static void onPlayerRespawn(Tile tile, Player player){
public static void onUnitRespawn(Tile tile, Unit player){
CoreEntity entity = tile.entity();
Effects.effect(Fx.spawn, entity);
entity.solid = false;
entity.progress = 0;
entity.currentPlayer = player;
entity.currentPlayer.heal();
entity.currentPlayer.rotation = 90f;
entity.currentPlayer.baseRotation = 90f;
entity.currentPlayer.setNet(tile.drawx(), tile.drawy());
entity.currentPlayer.add();
entity.currentPlayer = null;
entity.currentUnit = player;
entity.currentUnit.heal();
entity.currentUnit.rotation = 90f;
entity.currentUnit.setNet(tile.drawx(), tile.drawy());
entity.currentUnit.add();
if(entity.currentUnit instanceof Player){
((Player) entity.currentUnit).baseRotation = 90f;
}
entity.currentUnit = null;
}
@Remote(called = Loc.server, in = In.blocks)
public static void onCorePlayerSet(Tile tile, Player player){
public static void onCoreUnitSet(Tile tile, Unit player){
CoreEntity entity = tile.entity();
entity.currentPlayer = player;
entity.currentUnit = player;
entity.progress = 0f;
player.set(tile.drawx(), tile.drawy());
player.setRespawning();
if(player instanceof Player){
((Player) player).setRespawning(true);
}
}
@Remote(called = Loc.server, in = In.blocks)
@@ -221,26 +253,30 @@ public class CoreBlock extends StorageBlock {
}
public class CoreEntity extends TileEntity{
Player currentPlayer;
Unit currentUnit;
int droneID = -1;
boolean solid = true;
float warmup;
float progress;
float time;
float heat;
public void trySetPlayer(Player player){
if(currentPlayer == null){
CallBlocks.onCorePlayerSet(tile, player);
if(currentUnit == null){
CallBlocks.onCoreUnitSet(tile, player);
}
}
@Override
public void write(DataOutputStream stream) throws IOException {
stream.writeBoolean(solid);
stream.writeInt(droneID);
}
@Override
public void read(DataInputStream stream) throws IOException {
solid = stream.readBoolean();
droneID = stream.readInt();
}
}
}

View File

@@ -73,7 +73,7 @@ public class SortedUnloader extends Unloader implements SelectionTrait{
}
public static class SortedUnloaderEntity extends TileEntity{
public Item sortItem = Items.iron;
public Item sortItem = Items.tungsten;
@Override
public void write(DataOutputStream stream) throws IOException {

View File

@@ -7,20 +7,17 @@ import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.io.MapTileData;
import io.anuke.mindustry.io.MapTileData.DataPosition;
import io.anuke.mindustry.io.MapTileData.TileDataMarker;
import io.anuke.ucore.noise.RidgedPerlin;
import io.anuke.ucore.noise.Simplex;
import io.anuke.ucore.util.Bits;
import io.anuke.ucore.util.Mathf;
public class ProcGen {
private RidgedPerlin rid = new RidgedPerlin(1, 1);
private Simplex sim = new Simplex();
private Simplex sim2 = new Simplex();
public MapTileData generate(GenProperties props){
sim.setSeed(Mathf.random(9999));
sim2.setSeed(Mathf.random(9999));
rid = new RidgedPerlin(Mathf.random(9999), 1);
sim.setSeed(Mathf.random(99999));
sim2.setSeed(Mathf.random(99999));
MapTileData data = new MapTileData(300, 300);
TileDataMarker marker = data.newDataMarker();

View File

@@ -1,4 +1,4 @@
package io.anuke.mindustry.world;
package io.anuke.mindustry.world.mapgen;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.IntArray;
@@ -7,6 +7,8 @@ import io.anuke.mindustry.content.blocks.StorageBlocks;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.io.MapTileData;
import io.anuke.mindustry.io.MapTileData.TileDataMarker;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.noise.RidgedPerlin;
import io.anuke.ucore.noise.Simplex;
@@ -22,11 +24,11 @@ public class WorldGenerator {
oreIndex = 0;
Array<OreEntry> ores = Array.with(
new OreEntry(Blocks.iron, 0.3f, seed),
new OreEntry(Blocks.coal, 0.284f, seed),
new OreEntry(Blocks.lead, 0.28f, seed),
new OreEntry(Blocks.titanium, 0.27f, seed),
new OreEntry(Blocks.thorium, 0.26f, seed)
new OreEntry(Blocks.iron, 0.3f, seed),
new OreEntry(Blocks.coal, 0.284f, seed),
new OreEntry(Blocks.lead, 0.28f, seed),
new OreEntry(Blocks.titanium, 0.27f, seed),
new OreEntry(Blocks.thorium, 0.26f, seed)
);
IntArray multiblocks = new IntArray();