Moved bullet FX to ammo type, beginning of weapon rework

This commit is contained in:
Anuken
2018-04-23 21:35:40 -04:00
parent 19d058a644
commit 8581213126
16 changed files with 311 additions and 275 deletions
@@ -1,28 +1,40 @@
package io.anuke.mindustry.content;
import io.anuke.mindustry.content.bullets.TurretBullets;
import io.anuke.mindustry.content.fx.ShootFx;
import io.anuke.mindustry.resource.AmmoType;
public class AmmoTypes {
public static final AmmoType
basicIron = new AmmoType(Items.iron, TurretBullets.basicIron, 5, 0.9f),
basicIron = new AmmoType(Items.iron, TurretBullets.basicIron, 5){{
shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke;
}},
basicSteel = new AmmoType(Items.steel, TurretBullets.basicSteel, 5, 0.8f),
basicSteel = new AmmoType(Items.steel, TurretBullets.basicSteel, 5){{
shootEffect = ShootFx.shootBig;
smokeEffect = ShootFx.shootBigSmoke;
}},
basicFlame = new AmmoType(Liquids.oil, TurretBullets.basicFlame, 0.3f, 0.9f),
basicFlame = new AmmoType(Liquids.oil, TurretBullets.basicFlame, 0.3f){{
shootEffect = ShootFx.shootSmallFlame;
}},
basicLeadFrag = new AmmoType(Items.lead, TurretBullets.basicLeadFragShell, 1, 0.8f),
basicLeadFrag = new AmmoType(Items.lead, TurretBullets.basicLeadFragShell, 1){{
shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2;
}},
lancerLaser = new AmmoType(TurretBullets.lancerLaser),
lightning = new AmmoType(TurretBullets.lightning),
oil = new AmmoType(Liquids.oil, TurretBullets.oilShot, 0.3f, 1f),
oil = new AmmoType(Liquids.oil, TurretBullets.oilShot, 0.3f),
water = new AmmoType(Liquids.water, TurretBullets.waterShot, 0.3f, 1f),
water = new AmmoType(Liquids.water, TurretBullets.waterShot, 0.3f),
lava = new AmmoType(Liquids.lava, TurretBullets.lavaShot, 0.3f, 1f),
lava = new AmmoType(Liquids.lava, TurretBullets.lavaShot, 0.3f),
cryofluid = new AmmoType(Liquids.cryofluid, TurretBullets.cryoShot, 0.3f, 1f);
cryofluid = new AmmoType(Liquids.cryofluid, TurretBullets.cryoShot, 0.3f);
}
@@ -114,11 +114,11 @@ public class Recipes {
new Recipe(liquid, LiquidBlocks.pump, stack(Items.steel, 10)),
new Recipe(liquid, LiquidBlocks.fluxpump, stack(Items.steel, 10), stack(Items.densealloy, 5)),
new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
new Recipe(units, UnitBlocks.vtolFactory, stack(Items.steel, 10)),
new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
new Recipe(units, UnitBlocks.walkerFactory, stack(Items.steel, 10)),
//new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
//new Recipe(units, UnitBlocks.vtolFactory, stack(Items.steel, 10)),
//new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
//new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
//new Recipe(units, UnitBlocks.walkerFactory, stack(Items.steel, 10)),
new Recipe(units, DebugBlocks.itemSource, stack(Items.steel, 10)).setDebug(),
new Recipe(units, DebugBlocks.itemVoid, stack(Items.steel, 10)).setDebug(),
@@ -19,8 +19,6 @@ public class WeaponBlocks{
ammoTypes = new AmmoType[]{AmmoTypes.basicIron};
reload = 25f;
restitution = 0.03f;
shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke;
ammoUseEffect = ShootFx.shellEjectSmall;
}},
@@ -32,8 +30,6 @@ public class WeaponBlocks{
restitution = 0.03f;
recoil = 1.5f;
burstSpacing = 6f;
shootEffect = ShootFx.shootSmall;
smokeEffect = ShootFx.shootSmallSmoke;
ammoUseEffect = ShootFx.shellEjectSmall;
}},
@@ -42,7 +38,6 @@ public class WeaponBlocks{
recoil = 0f;
reload = 5f;
shootCone = 50f;
shootEffect = ShootFx.shootSmallFlame;
ammoUseEffect = ShootFx.shellEjectSmall;
drawer = (tile, entity) -> {
@@ -58,8 +53,6 @@ public class WeaponBlocks{
ammoEjectBack = 2f;
recoil = 3f;
shootShake = 2f;
shootEffect = ShootFx.shootBig;
smokeEffect = ShootFx.shootBigSmoke;
ammoUseEffect = ShootFx.shellEjectMedium;
}},
@@ -73,8 +66,6 @@ public class WeaponBlocks{
cooldown = 0.03f;
recoil = 3f;
shootShake = 2f;
shootEffect = ShootFx.shootBig2;
smokeEffect = ShootFx.shootBigSmoke2;
ammoUseEffect = ShootFx.shellEjectBig;
drawer = (tile, entity) -> {