Added entries for all new smelters

This commit is contained in:
Anuken
2018-06-15 18:47:53 -04:00
parent 11d2ada6b3
commit 09ebb7a01c
21 changed files with 875 additions and 834 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

View File

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

View File

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

View File

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 194 B

View File

Before

Width:  |  Height:  |  Size: 497 B

After

Width:  |  Height:  |  Size: 497 B

View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View File

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

@@ -57,7 +57,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootSmallSmoke; smokeEffect = ShootFx.shootSmallSmoke;
}}; }};
flakPlastic = new AmmoType(Items.plastic, FlakBullets.plastic, 5) {{ flakPlastic = new AmmoType(Items.plasteel, FlakBullets.plastic, 5) {{
shootEffect = ShootFx.shootSmall; shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke; smokeEffect = ShootFx.shootSmallSmoke;
}}; }};
@@ -79,7 +79,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
shellPlastic = new AmmoType(Items.plastic, ShellBullets.plastic, 1) {{ shellPlastic = new AmmoType(Items.plasteel, ShellBullets.plastic, 1) {{
shootEffect = ShootFx.shootBig2; shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
@@ -118,7 +118,7 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};
artilleryPlastic = new AmmoType(Items.plastic, ArtilleryBullets.plastic, 1) {{ artilleryPlastic = new AmmoType(Items.plasteel, ArtilleryBullets.plastic, 1) {{
shootEffect = ShootFx.shootBig2; shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2; smokeEffect = ShootFx.shootBigSmoke2;
}}; }};

View File

@@ -8,7 +8,7 @@ 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, iron, lead, coal, steel, titanium, thorium, silicon, plastic, surgealloy, biomatter, sand, blastCompound, thermite; public static Item stone, iron, lead, coal, steel, titanium, thorium, silicon, plasteel, phasematter, surgealloy, biomatter, sand, blastCompound, thermite;
@Override @Override
public void load() { public void load() {
@@ -53,12 +53,16 @@ public class Items implements ContentList{
type = ItemType.material; type = ItemType.material;
}}; }};
plastic = new Item("plastic", Color.valueOf("e9ead3")) {{ plasteel = new Item("plasteel", Color.valueOf("e9ead3")) {{
type = ItemType.material; type = ItemType.material;
flammability = 0.2f; flammability = 0.2f;
explosiveness = 0.1f; explosiveness = 0.1f;
}}; }};
phasematter = new Item("phase-matter", Color.valueOf("f4ba6e")) {{
type = ItemType.material;
}};
surgealloy = new Item("surge-alloy", Color.valueOf("b4d5c7")) {{ surgealloy = new Item("surge-alloy", Color.valueOf("b4d5c7")) {{
type = ItemType.material; type = ItemType.material;
}}; }};

View File

@@ -53,15 +53,18 @@ public class Recipes implements ContentList{
new Recipe(weapon, WeaponBlocks.meltdown, new ItemStack(Items.steel, 70), new ItemStack(Items.titanium, 50), new ItemStack(Items.surgealloy, 55)); new Recipe(weapon, WeaponBlocks.meltdown, new ItemStack(Items.steel, 70), new ItemStack(Items.titanium, 50), new ItemStack(Items.surgealloy, 55));
new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.iron, 40)); new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.iron, 40));
new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.iron, 40));
new Recipe(crafting, CraftingBlocks.alloysmelter, new ItemStack(Items.titanium, 50), new ItemStack(Items.steel, 50)); new Recipe(crafting, CraftingBlocks.alloysmelter, new ItemStack(Items.titanium, 50), new ItemStack(Items.steel, 50));
new Recipe(crafting, CraftingBlocks.powersmelter, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30)); new Recipe(crafting, CraftingBlocks.alloyfuser, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30));
new Recipe(crafting, CraftingBlocks.poweralloysmelter, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30));
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.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.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.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.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.biomatterCompressor, new ItemStack(Items.steel, 15), new ItemStack(Items.iron, 15));
new Recipe(crafting, CraftingBlocks.plasticFormer, new ItemStack(Items.steel, 30), new ItemStack(Items.titanium, 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.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.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.stoneFormer, new ItemStack(Items.steel, 10), new ItemStack(Items.iron, 10));

View File

@@ -11,7 +11,7 @@ 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, alloysmelter, siliconsmelter, poweralloysmelter, powersmelter, cryofluidmixer, melter, separator, centrifuge, plasticFormer, biomatterCompressor, pulverizer, oilRefinery, stoneFormer, weaponFactory, incinerator; public static Block smelter, arcsmelter, siliconsmelter, plasteelcompressor, phaseweaver, alloysmelter, alloyfuser, cryofluidmixer, melter, separator, centrifuge, biomatterCompressor, pulverizer, oilRefinery, stoneFormer, weaponFactory, incinerator;
@Override @Override
public void load() { public void load() {
@@ -20,42 +20,10 @@ public class CraftingBlocks extends BlockList implements ContentList {
inputs = new Item[]{Items.iron}; inputs = new Item[]{Items.iron};
fuel = Items.coal; fuel = Items.coal;
result = Items.steel; result = Items.steel;
craftTime = 25f;
}};
alloysmelter = new Smelter("alloysmelter") {{
health = 90;
inputs = new Item[]{Items.titanium, Items.steel};
fuel = Items.coal;
result = Items.surgealloy;
burnDuration = 45f;
craftTime = 25f;
flameColor = Color.valueOf("fd896e");
}};
siliconsmelter = new PowerSmelter("siliconsmelter") {{
health = 90;
craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)};
result = Items.silicon;
powerUse = 0.05f;
craftTime = 35f; craftTime = 35f;
size = 2;
hasLiquids = false;
flameColor = Color.valueOf("ffef99");
}}; }};
poweralloysmelter = new PowerSmelter("poweralloysmelter") {{ arcsmelter = new PowerSmelter("arc-smelter") {{
health = 90;
craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.titanium, 4), new ItemStack(Items.thorium, 4)};
result = Items.surgealloy;
powerUse = 0.3f;
craftTime = 25f;
size = 2;
}};
powersmelter = new PowerSmelter("powersmelter") {{
health = 90; health = 90;
craftEffect = BlockFx.smeltsmoke; craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.iron, 1)}; inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.iron, 1)};
@@ -65,6 +33,64 @@ public class CraftingBlocks extends BlockList implements ContentList {
size = 2; size = 2;
}}; }};
siliconsmelter = new PowerSmelter("silicon-smelter") {{
health = 90;
craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)};
result = Items.silicon;
powerUse = 0.05f;
craftTime = 40f;
size = 2;
hasLiquids = false;
flameColor = Color.valueOf("ffef99");
}};
plasteelcompressor = new PlasteelCompressor("plasteel-compressor") {{
inputLiquid = Liquids.oil;
inputItem = new ItemStack(Items.steel, 1);
liquidUse = 0.3f;
liquidCapacity = 60f;
powerUse = 0.5f;
craftTime = 80f;
output = Items.plasteel;
itemCapacity = 30;
size = 2;
health = 320;
hasPower = hasLiquids = true;
craftEffect = BlockFx.formsmoke;
updateEffect = BlockFx.plasticburn;
}};
phaseweaver = new PowerSmelter("phase-weaver") {{
health = 90;
craftEffect = BlockFx.smeltsmoke;
inputs = new ItemStack[]{new ItemStack(Items.thorium, 2), new ItemStack(Items.sand, 6)};
result = Items.phasematter;
powerUse = 0.4f;
craftTime = 100f;
size = 3;
}};
alloysmelter = new PowerSmelter("alloy-smelter") {{
health = 90;
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)};
result = Items.surgealloy;
powerUse = 0.3f;
craftTime = 50f;
size = 2;
}};
alloyfuser = new PowerSmelter("alloy-fuser") {{
health = 90;
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)};
result = Items.surgealloy;
powerUse = 0.4f;
craftTime = 30f;
size = 3;
}};
cryofluidmixer = new LiquidMixer("cryofluidmixer") {{ cryofluidmixer = new LiquidMixer("cryofluidmixer") {{
health = 200; health = 200;
inputLiquid = Liquids.water; inputLiquid = Liquids.water;
@@ -132,21 +158,6 @@ public class CraftingBlocks extends BlockList implements ContentList {
size = 2; size = 2;
}}; }};
plasticFormer = new PlasticFormer("plasticformer") {{
inputLiquid = Liquids.oil;
liquidUse = 0.3f;
liquidCapacity = 60f;
powerUse = 0.5f;
craftTime = 80f;
output = Items.plastic;
itemCapacity = 30;
size = 2;
health = 320;
hasPower = hasLiquids = true;
craftEffect = BlockFx.formsmoke;
updateEffect = BlockFx.plasticburn;
}};
biomatterCompressor = new Compressor("biomattercompressor") {{ biomatterCompressor = new Compressor("biomattercompressor") {{
input = new ItemStack(Items.biomatter, 1); input = new ItemStack(Items.biomatter, 1);
liquidCapacity = 60f; liquidCapacity = 60f;

View File

@@ -62,6 +62,7 @@ public class Control extends Module{
ContentLoader.initialize(Content::init); ContentLoader.initialize(Content::init);
Core.atlas = new Atlas("sprites.atlas"); Core.atlas = new Atlas("sprites.atlas");
Core.atlas.setErrorRegion("error");
ContentLoader.initialize(Content::load); ContentLoader.initialize(Content::load);
db.load(); db.load();

View File

@@ -4,9 +4,9 @@ import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Mathf;
public class PlasticFormer extends GenericCrafter { public class PlasteelCompressor extends GenericCrafter {
public PlasticFormer(String name) { public PlasteelCompressor(String name) {
super(name); super(name);
} }

View File

@@ -74,12 +74,15 @@ public class TextureGenerator {
} }
}; };
Core.atlas.setErrorRegion("error");
image = ImageIO.read(new File(spritesFolder + "/sprites.png")); image = ImageIO.read(new File(spritesFolder + "/sprites.png"));
graphics = image.createGraphics(); graphics = image.createGraphics();
generateBlocks(); generateBlocks();
} }
/**Generates full block icons for use in the editor.*/
static void generateBlocks() throws IOException { static void generateBlocks() throws IOException {
for(Block block : Block.all()){ for(Block block : Block.all()){
@@ -89,6 +92,11 @@ public class TextureGenerator {
continue; continue;
} }
if(regions[0] == null){
System.err.println("Error in block \"" + block.name + "\": null region!");
System.exit(-1);
}
BufferedImage target = new BufferedImage(regions[0].getRegionWidth(), regions[0].getRegionHeight(), BufferedImage.TYPE_INT_ARGB); BufferedImage target = new BufferedImage(regions[0].getRegionWidth(), regions[0].getRegionHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D tg = target.createGraphics(); Graphics2D tg = target.createGraphics();