Implemented smelting with flux

This commit is contained in:
Anuken
2018-06-18 17:20:23 -04:00
parent c31a710aa7
commit 354c6e17c0
10 changed files with 106 additions and 176 deletions

View File

@@ -8,7 +8,7 @@ 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, shellLead, shellExplosive, shellPlastic, shellThorium, 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() {
@@ -67,28 +67,6 @@ public class AmmoTypes implements ContentList {
smokeEffect = ShootFx.shootSmallSmoke;
}};
//shells
shellLead = new AmmoType(Items.lead, ShellBullets.lead, 1) {{
shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2;
}};
shellExplosive = new AmmoType(Items.blastCompound, ShellBullets.explosive, 1) {{
shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2;
}};
shellPlastic = new AmmoType(Items.plasteel, ShellBullets.plastic, 1) {{
shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2;
}};
shellThorium = new AmmoType(Items.thorium, ShellBullets.thorium, 1) {{
shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2;
}};
//missiles
missileExplosive = new AmmoType(Items.blastCompound, MissileBullets.explosive, 1) {{

View File

@@ -30,7 +30,6 @@ public class Items implements ContentList{
coal = new Item("coal", Color.valueOf("272727")) {{
explosiveness = 0.2f;
flammability = 0.5f;
fluxiness = 0.3f;
hardness = 2;
}};

View File

@@ -21,6 +21,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
fuel = Items.coal;
result = Items.steel;
craftTime = 35f;
useFlux = true;
}};
arcsmelter = new PowerSmelter("arc-smelter") {{
@@ -31,6 +32,9 @@ public class CraftingBlocks extends BlockList implements ContentList {
powerUse = 0.1f;
craftTime = 25f;
size = 2;
useFlux = true;
fluxNeeded = 2;
}};
siliconsmelter = new PowerSmelter("silicon-smelter") {{
@@ -79,6 +83,9 @@ public class CraftingBlocks extends BlockList implements ContentList {
powerUse = 0.3f;
craftTime = 50f;
size = 2;
useFlux = true;
fluxNeeded = 4;
}};
alloyfuser = new PowerSmelter("alloy-fuser") {{
@@ -89,6 +96,9 @@ public class CraftingBlocks extends BlockList implements ContentList {
powerUse = 0.4f;
craftTime = 30f;
size = 3;
useFlux = true;
fluxNeeded = 4;
}};
cryofluidmixer = new LiquidMixer("cryofluidmixer") {{

View File

@@ -109,7 +109,7 @@ public class WeaponBlocks extends BlockList implements ContentList {
salvo = new ItemTurret("salvo") {{
size = 2;
range = 100f;
ammoTypes = new AmmoType[]{AmmoTypes.shellExplosive, AmmoTypes.shellLead, AmmoTypes.shellPlastic, AmmoTypes.shellThorium};
ammoTypes = new AmmoType[]{AmmoTypes.bulletIron, AmmoTypes.bulletLead, AmmoTypes.bulletSteel, AmmoTypes.bulletThermite, AmmoTypes.bulletThorium, AmmoTypes.bulletSilicon};
reload = 70f;
restitution = 0.03f;
ammoEjectBack = 3f;

View File

@@ -1,127 +0,0 @@
package io.anuke.mindustry.content.bullets;
import io.anuke.mindustry.content.fx.BulletFx;
import io.anuke.mindustry.content.fx.Fx;
import io.anuke.mindustry.entities.bullet.BasicBulletType;
import io.anuke.mindustry.entities.bullet.BulletType;
import io.anuke.mindustry.type.ContentList;
public class ShellBullets extends BulletList implements ContentList {
public static BulletType lead, leadShard, thorium, thoriumShard, plastic, plasticShard, explosive, explosiveShard, incindiary;
@Override
public void load() {
lead = new BasicBulletType(3f, 0, "shell") {
{
hiteffect = BulletFx.flakExplosion;
knockback = 0.8f;
lifetime = 90f;
drag = 0.01f;
bulletWidth = bulletHeight = 9f;
fragBullet = leadShard;
bulletShrink = 0.1f;
}
};
leadShard = new BasicBulletType(3f, 0, "shell") {
{
drag = 0.1f;
hiteffect = Fx.none;
despawneffect = Fx.none;
hitsize = 4;
lifetime = 20f;
bulletWidth = 9f;
bulletHeight = 11f;
bulletShrink = 1f;
}
};
thorium = new BasicBulletType(3f, 0, "shell") {
{
hiteffect = BulletFx.flakExplosion;
knockback = 0.8f;
lifetime = 90f;
drag = 0.01f;
bulletWidth = bulletHeight = 9f;
fragBullet = leadShard;
bulletShrink = 0.1f;
}
};
thoriumShard = new BasicBulletType(3f, 0, "shell") {
{
drag = 0.1f;
hiteffect = Fx.none;
despawneffect = Fx.none;
hitsize = 4;
lifetime = 20f;
bulletWidth = 9f;
bulletHeight = 11f;
bulletShrink = 1f;
}
};
plastic = new BasicBulletType(3f, 0, "shell") {
{
hiteffect = BulletFx.flakExplosion;
knockback = 0.8f;
lifetime = 90f;
drag = 0.01f;
bulletWidth = bulletHeight = 9f;
fragBullet = leadShard;
bulletShrink = 0.1f;
}
};
plasticShard = new BasicBulletType(3f, 0, "shell") {
{
drag = 0.1f;
hiteffect = Fx.none;
despawneffect = Fx.none;
hitsize = 4;
lifetime = 20f;
bulletWidth = 9f;
bulletHeight = 11f;
bulletShrink = 1f;
}
};
explosive = new BasicBulletType(3f, 0, "shell") {
{
hiteffect = BulletFx.flakExplosion;
knockback = 0.8f;
lifetime = 90f;
drag = 0.01f;
bulletWidth = bulletHeight = 9f;
fragBullet = leadShard;
bulletShrink = 0.1f;
}
};
explosiveShard = new BasicBulletType(3f, 0, "shell") {
{
drag = 0.1f;
hiteffect = Fx.none;
despawneffect = Fx.none;
hitsize = 4;
lifetime = 20f;
bulletWidth = 9f;
bulletHeight = 11f;
bulletShrink = 1f;
}
};
incindiary = new BasicBulletType(3f, 0, "shell") {
{
hiteffect = BulletFx.flakExplosion;
knockback = 0.8f;
lifetime = 90f;
drag = 0.01f;
bulletWidth = bulletHeight = 9f;
fragBullet = leadShard;
bulletShrink = 0.1f;
}
};
}
}