Merge branches 'master' and 'new-map-format' of https://github.com/Anuken/Mindustry

This commit is contained in:
Anuken
2019-03-12 13:50:48 -04:00
56 changed files with 2757 additions and 4253 deletions
+16 -24
View File
@@ -7,7 +7,6 @@ import io.anuke.arc.graphics.g2d.TextureRegion;
import io.anuke.mindustry.game.ContentList;
import io.anuke.mindustry.graphics.CacheLayer;
import io.anuke.mindustry.type.Category;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.ItemStack;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
@@ -28,7 +27,8 @@ import io.anuke.mindustry.world.blocks.units.UnitFactory;
import io.anuke.mindustry.world.consumers.ConsumeItemFilter;
import io.anuke.mindustry.world.consumers.ConsumeLiquidFilter;
import static io.anuke.mindustry.Vars.*;
import static io.anuke.mindustry.Vars.state;
import static io.anuke.mindustry.Vars.world;
public class Blocks implements ContentList{
public static Block
@@ -39,6 +39,9 @@ public class Blocks implements ContentList{
iceSnow, sandWater, duneRocks, sandRocks, stainedRocks, moss, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder, grass, salt,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks,
//ores
oreCopper, oreLead, oreScrap, oreCoal, oreTitanium, oreThorium,
//crafting
siliconSmelter, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
melter, separator, sporePress, pulverizer, incinerator,
@@ -145,7 +148,7 @@ public class Blocks implements ContentList{
}};
stone = new Floor("stone"){{
hasOres = true;
}};
craters = new Floor("craters"){{
@@ -170,12 +173,10 @@ public class Blocks implements ContentList{
sand = new Floor("sand"){{
itemDrop = Items.sand;
hasOres = true;
playerUnmineable = true;
}};
holostone = new Floor("holostone"){{
hasOres = true;
edgeStyle = "blocky";
}};
@@ -226,7 +227,6 @@ public class Blocks implements ContentList{
}};
pine = new StaticWall("pine"){{
//fillsTile = false;
variants = 0;
}};
@@ -253,7 +253,6 @@ public class Blocks implements ContentList{
}};
stainedStoneRed = new Floor("stained-stone-red"){{
hasOres = true;
variants = 1;
}};
@@ -308,6 +307,16 @@ public class Blocks implements ContentList{
blendGroup = ignarock;
}};
//endregion
//region ore
oreCopper = new OreBlock(Items.copper);
oreLead = new OreBlock(Items.lead);
oreScrap = new OreBlock(Items.scrap);
oreCoal = new OreBlock(Items.coal);
oreTitanium = new OreBlock(Items.titanium);
oreThorium = new OreBlock(Items.thorium);
//endregion
//region crafting
@@ -1418,23 +1427,6 @@ public class Blocks implements ContentList{
consumes.powerBuffered(120f);
}};
//endregion
//region ores
//create ores for every floor and item combination necessary
for(Item item : content.items()){
if(!item.genOre) continue;
for(Block block : content.blocks()){
if(block instanceof Floor && ((Floor) block).hasOres){
new OreBlock(item, (Floor) block);
}
}
}
//special variants
new OreBlock(Items.scrap, (Floor)snow);
//endregion
}
}
@@ -15,7 +15,6 @@ public class Items implements ContentList{
type = ItemType.material;
hardness = 1;
cost = 0.6f;
genOre = true;
alwaysUnlocked = true;
}};
@@ -23,7 +22,6 @@ public class Items implements ContentList{
type = ItemType.material;
hardness = 1;
cost = 0.9f;
genOre = true;
}};
metaglass = new Item("metaglass", Color.valueOf("ebeef5")){{
@@ -40,14 +38,12 @@ public class Items implements ContentList{
explosiveness = 0.4f;
flammability = 1f;
hardness = 2;
genOre = true;
}};
titanium = new Item("titanium", Color.valueOf("8da1e3")){{
type = ItemType.material;
hardness = 3;
cost = 1.1f;
genOre = true;
}};
thorium = new Item("thorium", Color.valueOf("f9a3c7")){{
@@ -56,11 +52,10 @@ public class Items implements ContentList{
hardness = 4;
radioactivity = 1f;
cost = 1.4f;
genOre = true;
}};
scrap = new Item("scrap", Color.valueOf("777777")){{
genOre = true;
}};
silicon = new Item("silicon", Color.valueOf("53565c")){{