This commit is contained in:
Anuken
2019-01-07 21:22:06 -05:00
parent fed964e0f7
commit a6f7bd9099
7 changed files with 53 additions and 27 deletions

View File

@@ -28,24 +28,50 @@ import static io.anuke.mindustry.Vars.content;
public class Blocks implements ContentList{ public class Blocks implements ContentList{
public static Block public static Block
air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone, //environment
blackstone, dirt, sand, ice, snow, grass, shrub, rock, icerock, blackrock, smelter, siliconSmelter, air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone, blackstone, dirt, sand, ice, snow,
plastaniumCompressor, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidmixer, melter, separator, grass, shrub, rock, icerock, blackrock,
centrifuge, biomatterCompressor, pulverizer, incinerator, powerVoid, powerSource, itemSource, liquidSource,
itemVoid, copperWall, copperWallLarge, graphiteWall, graphiteWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, //crafting
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine, conveyor, smelter, siliconSmelter, plastaniumCompressor, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidmixer,
titaniumconveyor, distributor, junction, itemBridge, phaseConveyor, sorter, router, overflowGate, massDriver, mechanicalPump, melter, separator, centrifuge, biomatterCompressor, pulverizer, incinerator,
rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidtank, liquidJunction, bridgeConduit, phaseConduit,
//sandbox
powerVoid, powerSource, itemSource, liquidSource, itemVoid,
//defense
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine,
//transport
conveyor, titaniumconveyor, distributor, junction, itemBridge, phaseConveyor, sorter, router, overflowGate, massDriver,
//liquids
mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidtank, liquidJunction, bridgeConduit, phaseConduit,
//power
combustionGenerator, thermalGenerator, turbineGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor, combustionGenerator, thermalGenerator, turbineGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor,
fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge, mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge,
plasmaDrill, waterExtractor, oilExtractor, cultivator, core, vault, container, unloader, duo, scorch, hail, wave, lancer,
arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, spiritFactory, phantomFactory, wraithFactory, ghoulFactory, //production
revenantFactory, daggerFactory, titanFactory, fortressFactory, reconstructor, repairPoint, commandCenter, alphaPad, deltaPad, mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, plasmaDrill, waterExtractor, oilExtractor, cultivator,
tauPad, omegaPad, dartPad, javelinPad, tridentPad, glaivePad;
//storage
core, vault, container, unloader,
//turrets
duo, scorch, hail, wave, lancer, arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
//units
spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, titanFactory,
fortressFactory, reconstructor, repairPoint, commandCenter,
//upgrades
alphaPad, deltaPad, tauPad, omegaPad, dartPad, javelinPad, tridentPad, glaivePad;
@Override @Override
public void load(){ public void load(){
//region environment blocks //region environment
air = new Floor("air"){ air = new Floor("air"){
{ {
@@ -354,11 +380,11 @@ public class Blocks implements ContentList{
size = 2; size = 2;
}}; }};
graphiteWall = new Wall("dense-alloy-wall"){{ titaniumWall = new Wall("titanium-wall"){{
health = 110 * wallHealthMultiplier; health = 110 * wallHealthMultiplier;
}}; }};
graphiteWallLarge = new Wall("dense-alloy-wall-large"){{ titaniumWallLarge = new Wall("titanium-wall-large"){{
health = 110 * wallHealthMultiplier * 4; health = 110 * wallHealthMultiplier * 4;
size = 2; size = 2;
}}; }};

View File

@@ -476,7 +476,7 @@ public class Fx implements ContentList{
}); });
melting = new Effect(40f, e -> { melting = new Effect(40f, e -> {
Draw.color(Liquids.lava.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f)); Draw.color(Liquids.slag.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f));
Angles.randLenVectors(e.id, 2, 1f + e.fin() * 3f, (x, y) -> { Angles.randLenVectors(e.id, 2, 1f + e.fin() * 3f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f); Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f);

View File

@@ -25,8 +25,8 @@ public class Recipes implements ContentList{
new Recipe(defense, Blocks.copperWall, new ItemStack(Items.copper, 12)).setAlwaysUnlocked(true); new Recipe(defense, Blocks.copperWall, new ItemStack(Items.copper, 12)).setAlwaysUnlocked(true);
new Recipe(defense, Blocks.copperWallLarge, new ItemStack(Items.copper, 12 * 4)).setAlwaysUnlocked(true); new Recipe(defense, Blocks.copperWallLarge, new ItemStack(Items.copper, 12 * 4)).setAlwaysUnlocked(true);
new Recipe(defense, Blocks.denseAlloyWall, new ItemStack(Items.titanium, 12)); new Recipe(defense, Blocks.titaniumWall, new ItemStack(Items.titanium, 12));
new Recipe(defense, Blocks.denseAlloyWallLarge, new ItemStack(Items.titanium, 12 * 4)); new Recipe(defense, Blocks.titaniumWallLarge, new ItemStack(Items.titanium, 12 * 4));
new Recipe(defense, Blocks.door, new ItemStack(Items.titanium, 12), new ItemStack(Items.silicon, 8)); new Recipe(defense, Blocks.door, new ItemStack(Items.titanium, 12), new ItemStack(Items.silicon, 8));
new Recipe(defense, Blocks.doorLarge, new ItemStack(Items.titanium, 12 * 4), new ItemStack(Items.silicon, 8 * 4)); new Recipe(defense, Blocks.doorLarge, new ItemStack(Items.titanium, 12 * 4), new ItemStack(Items.silicon, 8 * 4));

View File

@@ -1,6 +1,5 @@
package io.anuke.mindustry.entities; package io.anuke.mindustry.entities;
import io.anuke.mindustry.content.Items;
import io.anuke.mindustry.entities.traits.Saveable; import io.anuke.mindustry.entities.traits.Saveable;
import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.type.ItemStack;
@@ -13,7 +12,7 @@ import static io.anuke.mindustry.Vars.content;
public class UnitInventory implements Saveable{ public class UnitInventory implements Saveable{
private final Unit unit; private final Unit unit;
private ItemStack item = new ItemStack(Items.stone, 0); private ItemStack item = new ItemStack(content.item(0), 0);
public UnitInventory(Unit unit){ public UnitInventory(Unit unit){
this.unit = unit; this.unit = unit;

View File

@@ -23,7 +23,7 @@ public class UnitDrops{
} }
if(dropTable == null){ if(dropTable == null){
dropTable = new Item[]{Items.densealloy, Items.silicon, Items.lead, Items.copper}; dropTable = new Item[]{Items.titanium, Items.silicon, Items.lead, Items.copper};
} }
for(int i = 0; i < 3; i++){ for(int i = 0; i < 3; i++){

View File

@@ -217,13 +217,13 @@ public class Sectors{
//set starter items //set starter items
if(sector.difficulty > 12){ //now with titanium if(sector.difficulty > 12){ //now with titanium
sector.startingItems = Array.with(new ItemStack(Items.copper, 1900), new ItemStack(Items.lead, 500), new ItemStack(Items.densealloy, 470), new ItemStack(Items.silicon, 460), new ItemStack(Items.titanium, 230)); sector.startingItems = Array.with(new ItemStack(Items.copper, 1900), new ItemStack(Items.lead, 500), new ItemStack(Items.graphite, 470), new ItemStack(Items.silicon, 460), new ItemStack(Items.titanium, 230));
}else if(sector.difficulty > 8){ //just more resources }else if(sector.difficulty > 8){ //just more resources
sector.startingItems = Array.with(new ItemStack(Items.copper, 1500), new ItemStack(Items.lead, 400), new ItemStack(Items.densealloy, 340), new ItemStack(Items.silicon, 250)); sector.startingItems = Array.with(new ItemStack(Items.copper, 1500), new ItemStack(Items.lead, 400), new ItemStack(Items.graphite, 340), new ItemStack(Items.silicon, 250));
}else if(sector.difficulty > 5){ //now with silicon }else if(sector.difficulty > 5){ //now with silicon
sector.startingItems = Array.with(new ItemStack(Items.copper, 950), new ItemStack(Items.lead, 300), new ItemStack(Items.densealloy, 190), new ItemStack(Items.silicon, 140)); sector.startingItems = Array.with(new ItemStack(Items.copper, 950), new ItemStack(Items.lead, 300), new ItemStack(Items.graphite, 190), new ItemStack(Items.silicon, 140));
}else if(sector.difficulty > 3){ //now with carbide }else if(sector.difficulty > 3){ //now with carbide
sector.startingItems = Array.with(new ItemStack(Items.copper, 700), new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 130)); sector.startingItems = Array.with(new ItemStack(Items.copper, 700), new ItemStack(Items.lead, 200), new ItemStack(Items.graphite, 130));
}else if(sector.difficulty > 2){ //more starter items for faster start }else if(sector.difficulty > 2){ //more starter items for faster start
sector.startingItems = Array.with(new ItemStack(Items.copper, 400), new ItemStack(Items.lead, 100)); sector.startingItems = Array.with(new ItemStack(Items.copper, 400), new ItemStack(Items.lead, 100));
}else{ //empty default }else{ //empty default

View File

@@ -5,6 +5,7 @@ import io.anuke.mindustry.type.Liquid;
import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.BlockStat;
import io.anuke.mindustry.world.meta.StatUnit; import io.anuke.mindustry.world.meta.StatUnit;
//TODO remove, as this is no longer a thing
public class LiquidHeatGenerator extends ItemLiquidGenerator{ public class LiquidHeatGenerator extends ItemLiquidGenerator{
public LiquidHeatGenerator(String name){ public LiquidHeatGenerator(String name){
@@ -17,7 +18,7 @@ public class LiquidHeatGenerator extends ItemLiquidGenerator{
stats.remove(BlockStat.basePowerGeneration); stats.remove(BlockStat.basePowerGeneration);
// Right now, Lava is the only thing that can be used. // Right now, Lava is the only thing that can be used.
stats.add(BlockStat.basePowerGeneration, powerProduction * getLiquidEfficiency(Liquids.lava) / maxLiquidGenerate * 60f, StatUnit.powerSecond); stats.add(BlockStat.basePowerGeneration, powerProduction * getLiquidEfficiency(Liquids.slag) / maxLiquidGenerate * 60f, StatUnit.powerSecond);
} }
@Override @Override