From de02061b5e48fa18a9a37c3c54f8b1a5be73778f Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jan 2019 12:25:54 -0500 Subject: [PATCH 1/6] Removed dependency on old BulletEntity/BaseBulletType classes --- .gitignore | 2 - .../src/io/anuke/mindustry/content/Mechs.java | 8 +- .../content/bullets/ArtilleryBullets.java | 14 +- .../content/bullets/FlakBullets.java | 2 +- .../content/bullets/MissileBullets.java | 22 +-- .../content/bullets/StandardBullets.java | 2 +- .../content/bullets/TurretBullets.java | 93 ++++++----- .../content/bullets/WeaponBullets.java | 8 +- .../io/anuke/mindustry/core/NetClient.java | 2 +- .../io/anuke/mindustry/core/NetServer.java | 2 +- .../io/anuke/mindustry/entities/Damage.java | 6 +- .../io/anuke/mindustry/entities/Player.java | 16 +- .../anuke/mindustry/entities/TileEntity.java | 2 +- .../src/io/anuke/mindustry/entities/Unit.java | 12 +- .../io/anuke/mindustry/entities/Units.java | 4 +- .../entities/bullet/ArtilleryBulletType.java | 4 +- .../entities/bullet/BasicBulletType.java | 6 +- .../mindustry/entities/bullet/Bullet.java | 149 +++++++++++++----- .../mindustry/entities/bullet/BulletType.java | 82 +++------- .../entities/bullet/FlakBulletType.java | 2 +- .../entities/bullet/LiquidBulletType.java | 6 +- .../mindustry/entities/effect/Puddle.java | 8 +- .../entities/traits/AbsorbTrait.java | 2 +- .../entities/traits/TargetTrait.java | 4 +- .../mindustry/entities/units/BaseUnit.java | 10 +- .../io/anuke/mindustry/input/MobileInput.java | 2 +- .../io/anuke/mindustry/type/AmmoEntry.java | 3 +- core/src/io/anuke/mindustry/type/Weapon.java | 2 +- core/src/io/anuke/mindustry/world/Block.java | 2 +- core/src/io/anuke/mindustry/world/Tile.java | 2 +- .../world/blocks/defense/DeflectorWall.java | 10 +- .../world/blocks/defense/SurgeWall.java | 2 +- .../blocks/defense/turrets/LaserTurret.java | 4 +- .../world/blocks/distribution/Conveyor.java | 2 +- .../world/blocks/units/UnitFactory.java | 2 +- 35 files changed, 268 insertions(+), 231 deletions(-) diff --git a/.gitignore b/.gitignore index 62ef5bbfad..b33484f175 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -##Packr, build stuff - logs/ /core/assets/mindustry-saves/ /core/assets/mindustry-maps/ diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index bb3f266f65..5ec66db65c 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -160,7 +160,7 @@ public class Mechs implements ContentList{ @Override public void updateAlt(Player player){ float scl = 1f - player.shootHeat/2f; - player.getVelocity().scl(scl); + player.velocity().scl(scl); } @Override @@ -230,7 +230,7 @@ public class Mechs implements ContentList{ if(Mathf.chance(Time.delta() * (0.15*scl))){ Effects.effect(BulletFx.hitLancer, Palette.lancerLaser, player.x, player.y); Lightning.create(player.getTeam(), Palette.lancerLaser, 10f, - player.x + player.getVelocity().x, player.y + player.getVelocity().y, player.rotation, 14); + player.x + player.velocity().x, player.y + player.velocity().y, player.rotation, 14); } } @@ -251,7 +251,7 @@ public class Mechs implements ContentList{ } float scld(Player player){ - return Mathf.clamp((player.getVelocity().len() - minV) / (maxV - minV)); + return Mathf.clamp((player.velocity().len() - minV) / (maxV - minV)); } }; @@ -271,7 +271,7 @@ public class Mechs implements ContentList{ @Override public boolean canShoot(Player player){ - return player.getVelocity().len() > 1.2f; + return player.velocity().len() > 1.2f; } }; diff --git a/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java b/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java index 0bb8857f22..92b3b242ca 100644 --- a/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java @@ -16,7 +16,7 @@ public class ArtilleryBullets extends BulletList implements ContentList{ dense = new ArtilleryBulletType(3f, 0, "shell"){ { - hiteffect = BulletFx.flakExplosion; + hitEffect = BulletFx.flakExplosion; knockback = 0.8f; lifetime = 50f; bulletWidth = bulletHeight = 11f; @@ -34,13 +34,13 @@ public class ArtilleryBullets extends BulletList implements ContentList{ lifetime = 15f; backColor = Palette.plastaniumBack; frontColor = Palette.plastaniumFront; - despawneffect = Fx.none; + despawnEffect = Fx.none; } }; plastic = new ArtilleryBulletType(3.3f, 0, "shell"){ { - hiteffect = BulletFx.plasticExplosion; + hitEffect = BulletFx.plasticExplosion; knockback = 1f; lifetime = 55f; bulletWidth = bulletHeight = 13f; @@ -56,7 +56,7 @@ public class ArtilleryBullets extends BulletList implements ContentList{ homing = new ArtilleryBulletType(3f, 0, "shell"){ { - hiteffect = BulletFx.flakExplosion; + hitEffect = BulletFx.flakExplosion; knockback = 0.8f; lifetime = 45f; bulletWidth = bulletHeight = 11f; @@ -70,7 +70,7 @@ public class ArtilleryBullets extends BulletList implements ContentList{ incindiary = new ArtilleryBulletType(3f, 0, "shell"){ { - hiteffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; knockback = 0.8f; lifetime = 60f; bulletWidth = bulletHeight = 13f; @@ -87,7 +87,7 @@ public class ArtilleryBullets extends BulletList implements ContentList{ explosive = new ArtilleryBulletType(2f, 0, "shell"){ { - hiteffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; knockback = 0.8f; lifetime = 70f; bulletWidth = bulletHeight = 14f; @@ -101,7 +101,7 @@ public class ArtilleryBullets extends BulletList implements ContentList{ unit = new ArtilleryBulletType(2f, 0, "shell"){ { - hiteffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; knockback = 0.8f; lifetime = 90f; bulletWidth = bulletHeight = 14f; diff --git a/core/src/io/anuke/mindustry/content/bullets/FlakBullets.java b/core/src/io/anuke/mindustry/content/bullets/FlakBullets.java index c13a5b8409..d312640e35 100644 --- a/core/src/io/anuke/mindustry/content/bullets/FlakBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/FlakBullets.java @@ -21,7 +21,7 @@ public class FlakBullets extends BulletList implements ContentList{ splashDamageRadius = 40f; fragBullet = ArtilleryBullets.plasticFrag; fragBullets = 4; - hiteffect = BulletFx.plasticExplosion; + hitEffect = BulletFx.plasticExplosion; frontColor = Palette.plastaniumFront; backColor = Palette.plastaniumBack; } diff --git a/core/src/io/anuke/mindustry/content/bullets/MissileBullets.java b/core/src/io/anuke/mindustry/content/bullets/MissileBullets.java index a61a98c401..f3a3d9092c 100644 --- a/core/src/io/anuke/mindustry/content/bullets/MissileBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/MissileBullets.java @@ -26,8 +26,8 @@ public class MissileBullets extends BulletList implements ContentList{ splashDamageRadius = 30f; splashDamage = 30f; lifetime = 150f; - hiteffect = BulletFx.blastExplosion; - despawneffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; } }; @@ -43,7 +43,7 @@ public class MissileBullets extends BulletList implements ContentList{ splashDamageRadius = 10f; splashDamage = 10f; lifetime = 160f; - hiteffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; incendSpread = 10f; incendAmount = 3; } @@ -58,8 +58,8 @@ public class MissileBullets extends BulletList implements ContentList{ splashDamageRadius = 30f; splashDamage = 22f; lifetime = 150f; - hiteffect = BulletFx.blastExplosion; - despawneffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; } @Override @@ -83,8 +83,8 @@ public class MissileBullets extends BulletList implements ContentList{ splashDamage = 1f; lifetime = 90f; trailColor = Color.valueOf("b6c6fd"); - hiteffect = BulletFx.blastExplosion; - despawneffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; backColor = Palette.bulletYellowBack; frontColor = Palette.bulletYellow; } @@ -92,7 +92,7 @@ public class MissileBullets extends BulletList implements ContentList{ @Override public void update(Bullet b){ super.update(b); - b.getVelocity().rotate(Mathf.sin(Time.time() + b.id * 4422, 8f, 2f)); + b.velocity().rotate(Mathf.sin(Time.time() + b.id * 4422, 8f, 2f)); } }; @@ -110,14 +110,14 @@ public class MissileBullets extends BulletList implements ContentList{ trailColor = Color.GRAY; backColor = Palette.bulletYellowBack; frontColor = Palette.bulletYellow; - hiteffect = BulletFx.blastExplosion; - despawneffect = BulletFx.blastExplosion; + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; } @Override public void update(Bullet b){ super.update(b); - b.getVelocity().rotate(Mathf.sin(Time.time() + b.id * 4422, 8f, 2f)); + b.velocity().rotate(Mathf.sin(Time.time() + b.id * 4422, 8f, 2f)); } }; } diff --git a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java b/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java index b67425b83e..fa6559fb10 100644 --- a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java @@ -73,7 +73,7 @@ public class StandardBullets extends BulletList implements ContentList{ bulletWidth = 11f; bulletHeight = 14f; lifetime = 40f; - despawneffect = BulletFx.hitBulletSmall; + despawnEffect = BulletFx.hitBulletSmall; } }; diff --git a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java index 1bce07f371..bbc3d6336d 100644 --- a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java @@ -9,6 +9,7 @@ import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; +import io.anuke.arc.util.Tmp; import io.anuke.mindustry.content.Liquids; import io.anuke.mindustry.content.StatusEffects; import io.anuke.mindustry.content.fx.BlockFx; @@ -41,8 +42,8 @@ public class TurretBullets extends BulletList implements ContentList{ damageLightning = new BulletType(0.0001f, 0f){ { lifetime = Lightning.lifetime; - hiteffect = BulletFx.hitLancer; - despawneffect = Fx.none; + hitEffect = BulletFx.hitLancer; + despawnEffect = Fx.none; status = StatusEffects.shocked; statusIntensity = 1f; } @@ -52,8 +53,8 @@ public class TurretBullets extends BulletList implements ContentList{ float healPercent = 3f; { - hiteffect = BulletFx.hitLaser; - despawneffect = BulletFx.hitLaser; + hitEffect = BulletFx.hitLaser; + despawnEffect = BulletFx.hitLaser; collidesTeam = true; } @@ -66,9 +67,9 @@ public class TurretBullets extends BulletList implements ContentList{ public void draw(Bullet b){ Draw.color(Palette.heal); Lines.stroke(2f); - Lines.lineAngleCenter(b.x, b.y, b.angle(), 7f); + Lines.lineAngleCenter(b.x, b.y, b.rot(), 7f); Draw.color(Color.WHITE); - Lines.lineAngleCenter(b.x, b.y, b.angle(), 3f); + Lines.lineAngleCenter(b.x, b.y, b.rot(), 3f); Draw.reset(); } @@ -91,12 +92,12 @@ public class TurretBullets extends BulletList implements ContentList{ collides = false; collidesTiles = false; drag = 0.03f; - hiteffect = despawneffect = Fx.none; + hitEffect = despawnEffect = Fx.none; } @Override public void init(Bullet b){ - b.getVelocity().setLength(0.6f + Mathf.random(2f)); + b.velocity().setLength(0.6f + Mathf.random(2f)); } @Override @@ -128,12 +129,12 @@ public class TurretBullets extends BulletList implements ContentList{ basicFlame = new BulletType(2.3f, 5){ { - hitsize = 7f; + hitSize = 7f; lifetime = 35f; pierce = true; drag = 0.05f; - hiteffect = BulletFx.hitFlameSmall; - despawneffect = Fx.none; + hitEffect = BulletFx.hitFlameSmall; + despawnEffect = Fx.none; status = StatusEffects.burning; } @@ -149,16 +150,16 @@ public class TurretBullets extends BulletList implements ContentList{ float length = 100f; { - hiteffect = BulletFx.hitLancer; - despawneffect = Fx.none; - hitsize = 4; + hitEffect = BulletFx.hitLancer; + despawnEffect = Fx.none; + hitSize = 4; lifetime = 16f; pierce = true; } @Override public void init(Bullet b){ - Damage.collideLine(b, b.getTeam(), hiteffect, b.x, b.y, b.angle(), length); + Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), length); } @Override @@ -166,12 +167,12 @@ public class TurretBullets extends BulletList implements ContentList{ float f = Mathf.curve(b.fin(), 0f, 0.2f); float baseLen = length * f; - Lines.lineAngle(b.x, b.y, b.angle(), baseLen); + Lines.lineAngle(b.x, b.y, b.rot(), baseLen); for(int s = 0; s < 3; s++){ Draw.color(colors[s]); for(int i = 0; i < tscales.length; i++){ Lines.stroke(7f * b.fout() * (s == 0 ? 1.5f : s == 1 ? 1f : 0.3f) * tscales[i]); - Lines.lineAngle(b.x, b.y, b.angle(), baseLen * lenscales[i]); + Lines.lineAngle(b.x, b.y, b.rot(), baseLen * lenscales[i]); } } Draw.reset(); @@ -187,9 +188,9 @@ public class TurretBullets extends BulletList implements ContentList{ float length = 200f; { - hiteffect = BulletFx.hitMeltdown; - despawneffect = Fx.none; - hitsize = 4; + hitEffect = BulletFx.hitMeltdown; + despawnEffect = Fx.none; + hitSize = 4; drawSize = 420f; lifetime = 16f; pierce = true; @@ -198,14 +199,14 @@ public class TurretBullets extends BulletList implements ContentList{ @Override public void update(Bullet b){ if(b.timer.get(1, 5f)){ - Damage.collideLine(b, b.getTeam(), hiteffect, b.x, b.y, b.angle(), length); + Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), length); } Effects.shake(1f, 1f, b.x, b.y); } @Override public void hit(Bullet b, float hitx, float hity){ - Effects.effect(hiteffect, colors[2], hitx, hity); + Effects.effect(hitEffect, colors[2], hitx, hity); if(Mathf.chance(0.4)){ Fire.create(world.tileWorld(hitx+Mathf.range(5f), hity+Mathf.range(5f))); } @@ -215,13 +216,13 @@ public class TurretBullets extends BulletList implements ContentList{ public void draw(Bullet b){ float baseLen = (length) * b.fout(); - Lines.lineAngle(b.x, b.y, b.angle(), baseLen); + Lines.lineAngle(b.x, b.y, b.rot(), baseLen); for(int s = 0; s < colors.length; s++){ Draw.color(tmpColor.set(colors[s]).mul(1f + Mathf.absin(Time.time(), 1f, 0.1f))); for(int i = 0; i < tscales.length; i++){ - vector.trns(b.angle() + 180f, (lenscales[i] - 1f) * 35f); + Tmp.v1.trns(b.rot() + 180f, (lenscales[i] - 1f) * 35f); Lines.stroke((9f + Mathf.absin(Time.time(), 0.8f, 1.5f)) * b.fout() * strokes[s] * tscales[i]); - Lines.lineAngle(b.x + vector.x, b.y + vector.y, b.angle(), baseLen * lenscales[i], CapStyle.none); + Lines.lineAngle(b.x + Tmp.v1.x, b.y + Tmp.v1.y, b.rot(), baseLen * lenscales[i], CapStyle.none); } } Draw.reset(); @@ -233,18 +234,16 @@ public class TurretBullets extends BulletList implements ContentList{ float raySpace = 2f; float rayLength = 80f; { - hiteffect = BulletFx.hitFuse; + hitEffect = BulletFx.hitFuse; lifetime = 13f; - despawneffect = Fx.none; + despawnEffect = Fx.none; pierce = true; } @Override public void init(Bullet b) { for (int i = 0; i < rays; i++) { - float offset = (i-rays/2)*raySpace; - vector.trns(b.angle(), 0.01f, offset); - Damage.collideLine(b, b.getTeam(), hiteffect, b.x, b.y, b.angle(), rayLength - Math.abs(i - (rays/2))*20f); + Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays/2))*20f); } } @@ -253,17 +252,15 @@ public class TurretBullets extends BulletList implements ContentList{ super.draw(b); Draw.color(Color.WHITE, Palette.surge, b.fin()); for(int i = 0; i < 7; i++){ - vector.trns(b.angle(), i * 8f); + Tmp.v1.trns(b.rot(), i * 8f); float sl = Mathf.clamp(b.fout()-0.5f) * (80f - i *10); - Shapes.tri(b.x + vector.x, b.y + vector.y, 4f, sl, b.angle() + 90); - Shapes.tri(b.x + vector.x, b.y + vector.y, 4f, sl, b.angle() - 90); + Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() + 90); + Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() - 90); } - Shapes.tri(b.x, b.y, 13f, (rayLength+50) * b.fout(), b.angle()); - Shapes.tri(b.x, b.y, 13f, 10f * b.fout(), b.angle() + 180f); + Shapes.tri(b.x, b.y, 13f, (rayLength+50) * b.fout(), b.rot()); + Shapes.tri(b.x, b.y, 13f, 10f * b.fout(), b.rot() + 180f); Draw.reset(); } - - //TODO }; waterShot = new LiquidBulletType(Liquids.water){ @@ -300,8 +297,8 @@ public class TurretBullets extends BulletList implements ContentList{ lightning = new BulletType(0.001f, 12f){ { lifetime = 1f; - despawneffect = Fx.none; - hiteffect = BulletFx.hitLancer; + despawnEffect = Fx.none; + hitEffect = BulletFx.hitLancer; keepVelocity = false; } @@ -311,15 +308,15 @@ public class TurretBullets extends BulletList implements ContentList{ @Override public void init(Bullet b){ - Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.angle(), 30); + Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.rot(), 30); } }; arc = new BulletType(0.001f, 26){ { lifetime = 1; - despawneffect = Fx.none; - hiteffect = BulletFx.hitLancer; + despawnEffect = Fx.none; + hitEffect = BulletFx.hitLancer; } @Override @@ -328,7 +325,7 @@ public class TurretBullets extends BulletList implements ContentList{ @Override public void init(Bullet b){ - Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.angle(), 36); + Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.rot(), 36); } }; @@ -336,8 +333,8 @@ public class TurretBullets extends BulletList implements ContentList{ { collidesTiles = false; lifetime = 200f; - despawneffect = BlockFx.smeltsmoke; - hiteffect = BulletFx.hitBulletBig; + despawnEffect = BlockFx.smeltsmoke; + hitEffect = BulletFx.hitBulletBig; drag = 0.005f; } @@ -346,10 +343,10 @@ public class TurretBullets extends BulletList implements ContentList{ float w = 11f, h = 13f; Draw.color(Palette.bulletYellowBack); - Draw.rect("shell-back", b.x, b.y, w, h, b.angle() + 90); + Draw.rect("shell-back", b.x, b.y, w, h, b.rot() + 90); Draw.color(Palette.bulletYellow); - Draw.rect("shell", b.x, b.y, w, h, b.angle() + 90); + Draw.rect("shell", b.x, b.y, w, h, b.rot() + 90); Draw.reset(); } @@ -412,7 +409,7 @@ public class TurretBullets extends BulletList implements ContentList{ for(int i = 0; i < data.items.length; i++){ int amountDropped = Mathf.random(0, data.items[i]); if(amountDropped > 0){ - float angle = b.angle() + Mathf.range(100f); + float angle = b.rot() + Mathf.range(100f); Effects.effect(EnvironmentFx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i)); } } diff --git a/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java b/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java index 86adce6b55..6052ee1b6b 100644 --- a/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java @@ -35,7 +35,7 @@ public class WeaponBullets extends BulletList{ { bulletWidth = 9f; bulletHeight = 13f; - hiteffect = BulletFx.flakExplosion; + hitEffect = BulletFx.flakExplosion; } }; @@ -43,7 +43,7 @@ public class WeaponBullets extends BulletList{ { bulletWidth = 8f; bulletHeight = 12f; - hiteffect = BulletFx.flakExplosion; + hitEffect = BulletFx.flakExplosion; backColor = Palette.lightOrange; frontColor = Palette.lightishOrange; } @@ -67,7 +67,7 @@ public class WeaponBullets extends BulletList{ { bulletWidth = 8f; bulletHeight = 12f; - hiteffect = BlockFx.pulverize; + hitEffect = BlockFx.pulverize; backColor = new Color(0x4f4f4fff); frontColor = Color.GRAY; } @@ -91,7 +91,7 @@ public class WeaponBullets extends BulletList{ lifetime = 40f; drag = 0.025f; fragBullets = 5; - hiteffect = BulletFx.flakExplosion; + hitEffect = BulletFx.flakExplosion; fragBullet = tungstenShotgun; } }; diff --git a/core/src/io/anuke/mindustry/core/NetClient.java b/core/src/io/anuke/mindustry/core/NetClient.java index e3e70da110..71c8d9caef 100644 --- a/core/src/io/anuke/mindustry/core/NetClient.java +++ b/core/src/io/anuke/mindustry/core/NetClient.java @@ -347,7 +347,7 @@ public class NetClient implements ApplicationListener{ Call.onClientShapshot(lastSent++, Time.millis(), player.x, player.y, player.pointerX, player.pointerY, player.rotation, player.baseRotation, - player.getVelocity().x, player.getVelocity().y, + player.velocity().x, player.velocity().y, player.getMineTile(), player.isBoosting, player.isShooting, requests, Core.camera.position.x, Core.camera.position.y, diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index 4987df27c4..16f0b1185c 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -329,7 +329,7 @@ public class NetServer implements ApplicationListener{ //set interpolator target to *new* position so it moves toward it player.getInterpolator().read(player.x, player.y, newx, newy, sent, rotation, baseRotation); - player.getVelocity().set(xVelocity, yVelocity); //only for visual calculation purposes, doesn't actually update the player + player.velocity().set(xVelocity, yVelocity); //only for visual calculation purposes, doesn't actually update the player connection.lastRecievedClientSnapshot = snapshotID; connection.lastRecievedClientTime = Time.millis(); diff --git a/core/src/io/anuke/mindustry/entities/Damage.java b/core/src/io/anuke/mindustry/entities/Damage.java index 7df2455bc6..27713c81ea 100644 --- a/core/src/io/anuke/mindustry/entities/Damage.java +++ b/core/src/io/anuke/mindustry/entities/Damage.java @@ -110,7 +110,7 @@ public class Damage{ rect.height += expand * 2; Consumer cons = e -> { - e.getHitbox(hitrect); + e.hitbox(hitrect); Rectangle other = hitrect; other.y -= expand; other.x -= expand; @@ -134,7 +134,7 @@ public class Damage{ Consumer cons = entity -> { if(!predicate.test(entity)) return; - entity.getHitbox(hitrect); + entity.hitbox(hitrect); if(!hitrect.overlaps(rect)){ return; } @@ -165,7 +165,7 @@ public class Damage{ entity.damage(amount); //TODO better velocity displacement float dst = tr.set(entity.x - x, entity.y - y).len(); - entity.getVelocity().add(tr.setLength((1f - dst / radius) * 2f)); + entity.velocity().add(tr.setLength((1f - dst / radius) * 2f)); }; rect.setSize(radius * 2).setCenter(x, y); diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index a6c073c61e..7380ae0ea9 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -100,17 +100,17 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra } @Override - public void getHitbox(Rectangle rectangle){ + public void hitbox(Rectangle rectangle){ rectangle.setSize(mech.hitsize).setCenter(x, y); } @Override - public void getHitboxTile(Rectangle rectangle){ + public void hitboxTile(Rectangle rectangle){ rectangle.setSize(mech.hitsize * 2f / 3f).setCenter(x, y); } @Override - public float getDrag(){ + public float drag(){ return mech.drag; } @@ -208,7 +208,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra } @Override - public float getMass(){ + public float mass(){ return mech.mass; } @@ -241,7 +241,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra } @Override - public float getMaxVelocity(){ + public float maxVelocity(){ return mech.maxSpeed; } @@ -571,7 +571,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra }else if(getCarry() != null){ dropCarry(); }else{ - Unit unit = Units.getClosest(team, x, y, 8f, u -> !u.isFlying() && u.getMass() <= mech.carryWeight); + Unit unit = Units.getClosest(team, x, y, 8f, u -> !u.isFlying() && u.mass() <= mech.carryWeight); if(unit != null){ carry(unit); @@ -675,7 +675,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra float expansion = 3f; - getHitbox(rect); + hitbox(rect); rect.x -= expansion; rect.y -= expansion; rect.width += expansion * 2f; @@ -732,7 +732,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra } Vector2 intercept = - Predict.intercept(x, y, target.getX(), target.getY(), target.getVelocity().x - velocity.x, target.getVelocity().y - velocity.y, getWeapon().getAmmo().bullet.speed); + Predict.intercept(x, y, target.getX(), target.getY(), target.velocity().x - velocity.x, target.velocity().y - velocity.y, getWeapon().getAmmo().bullet.speed); pointerX = intercept.x; pointerY = intercept.y; diff --git a/core/src/io/anuke/mindustry/entities/TileEntity.java b/core/src/io/anuke/mindustry/entities/TileEntity.java index c3dc293f95..a48defd085 100644 --- a/core/src/io/anuke/mindustry/entities/TileEntity.java +++ b/core/src/io/anuke/mindustry/entities/TileEntity.java @@ -257,7 +257,7 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{ } @Override - public Vector2 getVelocity(){ + public Vector2 velocity(){ return Vector2.ZERO; } diff --git a/core/src/io/anuke/mindustry/entities/Unit.java b/core/src/io/anuke/mindustry/entities/Unit.java index 1c3d4c6660..de4427b37a 100644 --- a/core/src/io/anuke/mindustry/entities/Unit.java +++ b/core/src/io/anuke/mindustry/entities/Unit.java @@ -124,7 +124,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ } @Override - public Vector2 getVelocity(){ + public Vector2 velocity(){ return velocity; } @@ -190,7 +190,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ } public void avoidOthers(float scaling){ - getHitbox(queryRect); + hitbox(queryRect); queryRect.setSize(queryRect.getWidth() * scaling); Units.getNearby(queryRect, t -> { @@ -228,7 +228,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ if(isCarried()){ //carried units do not take into account velocity normally set(carrier.getX(), carrier.getY()); - velocity.set(carrier.getVelocity()); + velocity.set(carrier.velocity()); return; } @@ -236,7 +236,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ status.update(this); - velocity.limit(getMaxVelocity()).scl(1f + (status.getSpeedMultiplier()-1f) * Time.delta()); + velocity.limit(maxVelocity()).scl(1f + (status.getSpeedMultiplier()-1f) * Time.delta()); if(isFlying()){ x += velocity.x * Time.delta(); @@ -289,7 +289,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ if(Math.abs(py - y) <= 0.0001f) velocity.y = 0f; } - velocity.scl(Mathf.clamp(1f - getDrag() * (isFlying() ? 1f : floor.dragMultiplier) * Time.delta())); + velocity.scl(Mathf.clamp(1f - drag() * (isFlying() ? 1f : floor.dragMultiplier) * Time.delta())); } public void applyEffect(StatusEffect effect, float intensity){ @@ -355,7 +355,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ public abstract float getArmor(); - public abstract float getMass(); + public abstract float mass(); public abstract boolean isFlying(); diff --git a/core/src/io/anuke/mindustry/entities/Units.java b/core/src/io/anuke/mindustry/entities/Units.java index 95e16842da..4b2e984f42 100644 --- a/core/src/io/anuke/mindustry/entities/Units.java +++ b/core/src/io/anuke/mindustry/entities/Units.java @@ -67,7 +67,7 @@ public class Units{ Units.getNearby(rect, unit -> { if(boolResult) return; if(!unit.isFlying()){ - unit.getHitbox(hitrect); + unit.hitbox(hitrect); if(hitrect.overlaps(rect)){ boolResult = true; @@ -89,7 +89,7 @@ public class Units{ Units.getNearby(rect, unit -> { if(value[0] || !pred.test(unit) || unit.isDead()) return; if(!unit.isFlying()){ - unit.getHitbox(hitrect); + unit.hitbox(hitrect); if(hitrect.overlaps(rect)){ value[0] = true; diff --git a/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java index 6a317f0882..ed25df2f5d 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java @@ -34,9 +34,9 @@ public class ArtilleryBulletType extends BasicBulletType{ float height = bulletHeight * ((1f - bulletShrink) + bulletShrink * b.fout()); Draw.color(backColor); - Draw.rect(backRegion, b.x, b.y, bulletWidth * scale, height * scale, b.angle() - 90); + Draw.rect(backRegion, b.x, b.y, bulletWidth * scale, height * scale, b.rot() - 90); Draw.color(frontColor); - Draw.rect(frontRegion, b.x, b.y, bulletWidth * scale, height * scale, b.angle() - 90); + Draw.rect(frontRegion, b.x, b.y, bulletWidth * scale, height * scale, b.rot() - 90); Draw.color(); } } diff --git a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java index 7f3ca88aeb..8264736a92 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java @@ -57,9 +57,9 @@ public class BasicBulletType extends BulletType{ float height = bulletHeight * ((1f - bulletShrink) + bulletShrink * b.fout()); Draw.color(backColor); - Draw.rect(backRegion, b.x, b.y, bulletWidth, height, b.angle() - 90); + Draw.rect(backRegion, b.x, b.y, bulletWidth, height, b.rot() - 90); Draw.color(frontColor); - Draw.rect(frontRegion, b.x, b.y, bulletWidth, height, b.angle() - 90); + Draw.rect(frontRegion, b.x, b.y, bulletWidth, height, b.rot() - 90); Draw.color(); } @@ -70,7 +70,7 @@ public class BasicBulletType extends BulletType{ if(homingPower > 0.0001f){ TargetTrait target = Units.getClosestTarget(b.getTeam(), b.x, b.y, homingRange); if(target != null){ - b.getVelocity().setAngle(Angles.moveToward(b.getVelocity().angle(), b.angleTo(target), homingPower * Time.delta())); + b.velocity().setAngle(Angles.moveToward(b.velocity().angle(), b.angleTo(target), homingPower * Time.delta())); } } } diff --git a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java index b2d10aeac6..3bd1fe6ad7 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java +++ b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java @@ -3,14 +3,15 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Remote; import io.anuke.arc.entities.EntityGroup; -import io.anuke.arc.entities.impl.BulletEntity; -import io.anuke.arc.entities.trait.Entity; -import io.anuke.arc.entities.trait.SolidTrait; -import io.anuke.arc.entities.trait.VelocityTrait; +import io.anuke.arc.entities.impl.SolidEntity; +import io.anuke.arc.entities.trait.*; import io.anuke.arc.math.Mathf; +import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Interval; import io.anuke.arc.util.Time; +import io.anuke.arc.util.Tmp; +import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.effect.Lightning; @@ -26,14 +27,18 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; -public class Bullet extends BulletEntity implements TeamTrait, SyncTrait, AbsorbTrait{ - private static Vector2 vector = new Vector2(); +public class Bullet extends SolidEntity implements DamageTrait, ScaleTrait, Poolable, DrawTrait, VelocityTrait, TimeTrait, TeamTrait, SyncTrait, AbsorbTrait{ public Interval timer = new Interval(3); + private float lifeScl; private Team team; private Object data; private boolean supressCollision, supressOnce, initialized; + protected BulletType type; + protected Entity owner; + protected float time; + /**Internal use only!*/ public Bullet(){ } @@ -62,7 +67,7 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT bullet.velocity.set(0, type.speed).setAngle(angle).scl(velocityScl); if(type.keepVelocity){ - bullet.velocity.add(owner instanceof VelocityTrait ? ((VelocityTrait) owner).getVelocity() : Vector2.ZERO); + bullet.velocity.add(owner instanceof VelocityTrait ? ((VelocityTrait) owner).velocity() : Vector2.ZERO); } bullet.team = team; @@ -83,6 +88,7 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT return create(type, parent.owner, parent.team, x, y, angle, velocityScl); } + /**Internal use only.*/ @Remote(called = Loc.server) public static void createBullet(BulletType type, float x, float y, float angle){ create(type, null, Team.none, x, y, angle); @@ -97,12 +103,6 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT supressOnce = true; } - @Override - public void absorb(){ - supressCollision = true; - remove(); - } - public BulletType getBulletType(){ return type; } @@ -124,22 +124,29 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT this.data = data; } + @Override + public void absorb(){ + supressCollision = true; + remove(); + } + @Override public float drawSize(){ return type.drawSize; } @Override - public float getDamage(){ + public float damage(){ + //todo hacky way to get damage, refactor if(owner instanceof Unit){ - return super.getDamage() * ((Unit) owner).getDamageMultipler(); + return type.damage * ((Unit) owner).getDamageMultipler(); } if(owner instanceof Lightning && data instanceof Float){ return (Float)data; } - return super.getDamage(); + return type.damage; } @Override @@ -172,35 +179,44 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT return team; } - @Override - public void draw(){ - type.draw(this); - } - @Override public float getShieldDamage(){ - return Math.max(getDamage(), type.splashDamage); + return Math.max(damage(), type.splashDamage); } @Override public boolean collides(SolidTrait other){ - return type.collides && super.collides(other) && !supressCollision && !(other instanceof Unit && ((Unit) other).isFlying() && !type.collidesAir); + return type.collides && (other != owner && !(other instanceof DamageTrait)) && !supressCollision && !(other instanceof Unit && ((Unit) other).isFlying() && !type.collidesAir); } @Override public void collision(SolidTrait other, float x, float y){ - super.collision(other, x, y); + if(!type.pierce) remove(); + type.hit(this, x, y); if(other instanceof Unit){ Unit unit = (Unit) other; - unit.getVelocity().add(vector.set(other.getX(), other.getY()).sub(x, y).setLength(type.knockback / unit.getMass())); + unit.velocity().add(Tmp.v3.set(other.getX(), other.getY()).sub(x, y).setLength(type.knockback / unit.mass())); unit.applyEffect(type.status, type.statusIntensity); } } @Override public void update(){ - super.update(); + type.update(this); + + x += velocity.x * Time.delta(); + y += velocity.y * Time.delta(); + + velocity.scl(Mathf.clamp(1f - type.drag * Time.delta())); + + time += Time.delta() * 1f/(lifeScl); + time = Mathf.clamp(time, 0, type.lifetime); + + if(time >= type.lifetime){ + if(!supressCollision) type.despawned(this); + remove(); + } if(type.hitTiles && collidesTiles() && !supressCollision && initialized){ world.raycastEach(world.toTile(lastPosition().x), world.toTile(lastPosition().y), world.toTile(x), world.toTile(y), (x, y) -> { @@ -234,20 +250,12 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT initialized = true; } - @Override - protected void updateLife(){ - time += Time.delta() * 1f/(lifeScl); - time = Mathf.clamp(time, 0, type.lifetime()); - - if(time >= type.lifetime){ - if(!supressCollision) type.despawned(this); - remove(); - } - } - @Override public void reset(){ - super.reset(); + type = null; + owner = null; + velocity.setZero(); + time = 0f; timer.clear(); lifeScl = 1f; team = null; @@ -257,6 +265,31 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT initialized = false; } + @Override + public void hitbox(Rectangle rectangle){ + rectangle.setSize(type.hitSize).setCenter(x, y); + } + + @Override + public void hitboxTile(Rectangle rectangle){ + rectangle.setSize(type.hitSize).setCenter(x, y); + } + + @Override + public float lifetime(){ + return type.lifetime; + } + + @Override + public void time(float time){ + this.time = time; + } + + @Override + public float time(){ + return time; + } + @Override public void removed(){ Pools.free(this); @@ -266,4 +299,44 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT public EntityGroup targetGroup(){ return bulletGroup; } + + @Override + public void added(){ + type.init(this); + } + + @Override + public void draw(){ + type.draw(this); + } + + @Override + public float fin(){ + return time / type.lifetime; + } + + @Override + public Vector2 velocity(){ + return velocity; + } + + public void velocity(float speed, float angle){ + velocity.set(0, speed).setAngle(angle); + } + + public void limit(float f){ + velocity.limit(f); + } + + /** Sets the bullet's rotation in degrees.*/ + public void rot(float angle){ + velocity.setAngle(angle); + } + + /** @return the bullet's rotation.*/ + public float rot(){ + float angle = Mathf.atan2(velocity.x, velocity.y) * Mathf.radiansToDegrees; + if(angle < 0) angle += 360; + return angle; + } } diff --git a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java index 0c2cbc7c94..69adf8d54e 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java @@ -2,24 +2,28 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.entities.impl.BaseBulletType; -import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.content.StatusEffects; import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.StatusEffect; import io.anuke.mindustry.world.Tile; -public abstract class BulletType extends Content implements BaseBulletType{ +public abstract class BulletType extends Content{ public float lifetime; public float speed; public float damage; - public float hitsize = 4; - public float drawSize = 20f; + public float hitSize = 4; + public float drawSize = 40f; public float drag = 0f; public boolean pierce; - public Effect hiteffect, despawneffect; + public Effect hitEffect, despawnEffect; + + /**Effect created when shooting.*/ + public Effect shootEffect = Fx.none; + /**Extra smoke effect created when shooting.*/ + public Effect smokeEffect = Fx.none; public float splashDamage = 0f; /**Knockback in velocity.*/ @@ -45,14 +49,12 @@ public abstract class BulletType extends Content implements BaseBulletType { if(unit.isFlying()) return; - unit.getHitbox(rect2); + unit.hitbox(rect2); if(!rect.overlaps(rect2)) return; unit.applyEffect(liquid.effect, 0.5f); - if(unit.getVelocity().len() > 0.1){ + if(unit.velocity().len() > 0.1){ Effects.effect(BlockFx.ripple, liquid.color, unit.x, unit.y); } }); diff --git a/core/src/io/anuke/mindustry/entities/traits/AbsorbTrait.java b/core/src/io/anuke/mindustry/entities/traits/AbsorbTrait.java index 7c6520364c..dedffc5203 100644 --- a/core/src/io/anuke/mindustry/entities/traits/AbsorbTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/AbsorbTrait.java @@ -11,6 +11,6 @@ public interface AbsorbTrait extends Entity, TeamTrait, DamageTrait{ } default float getShieldDamage(){ - return getDamage(); + return damage(); } } diff --git a/core/src/io/anuke/mindustry/entities/traits/TargetTrait.java b/core/src/io/anuke/mindustry/entities/traits/TargetTrait.java index 68eac61412..f59ed37091 100644 --- a/core/src/io/anuke/mindustry/entities/traits/TargetTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/TargetTrait.java @@ -18,14 +18,14 @@ public interface TargetTrait extends Position, VelocityTrait{ if(this instanceof SolidTrait){ return ((SolidTrait) this).getDeltaX(); } - return getVelocity().x; + return velocity().x; } default float getTargetVelocityY(){ if(this instanceof SolidTrait){ return ((SolidTrait) this).getDeltaY(); } - return getVelocity().y; + return velocity().y; } /** diff --git a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java index 840aaf19de..c139aedf4b 100644 --- a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java @@ -85,7 +85,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{ } @Override - public float getDrag(){ + public float drag(){ return type.drag; } @@ -275,7 +275,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{ } @Override - public float getMass(){ + public float mass(){ return type.mass; } @@ -326,7 +326,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{ } @Override - public float getMaxVelocity(){ + public float maxVelocity(){ return type.maxVelocity; } @@ -357,12 +357,12 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{ } @Override - public void getHitbox(Rectangle rectangle){ + public void hitbox(Rectangle rectangle){ rectangle.setSize(type.hitsize).setCenter(x, y); } @Override - public void getHitboxTile(Rectangle rectangle){ + public void hitboxTile(Rectangle rectangle){ rectangle.setSize(type.hitsizeTile).setCenter(x, y); } diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index 4ac8d2f761..b613415c2f 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -559,7 +559,7 @@ public class MobileInput extends InputHandler implements GestureListener{ consumed = true; player.dropCarry(); //drop off unit }else{ - Unit unit = Units.getClosest(player.getTeam(), Core.input.mouseWorld(x, y).x, Core.input.mouseWorld(x, y).y, 4f, u -> !u.isFlying() && u.getMass() <= player.mech.carryWeight); + Unit unit = Units.getClosest(player.getTeam(), Core.input.mouseWorld(x, y).x, Core.input.mouseWorld(x, y).y, 4f, u -> !u.isFlying() && u.mass() <= player.mech.carryWeight); if(unit != null){ consumed = true; diff --git a/core/src/io/anuke/mindustry/type/AmmoEntry.java b/core/src/io/anuke/mindustry/type/AmmoEntry.java index d92c7963e5..f0ef1c0c6d 100644 --- a/core/src/io/anuke/mindustry/type/AmmoEntry.java +++ b/core/src/io/anuke/mindustry/type/AmmoEntry.java @@ -1,6 +1,7 @@ package io.anuke.mindustry.type; -/**Used to store ammo amounts in turrets.*/ +/**Used to store ammo amounts in turrets. + * TODO move inside turret class?*/ public class AmmoEntry{ public AmmoType type; public int amount; diff --git a/core/src/io/anuke/mindustry/type/Weapon.java b/core/src/io/anuke/mindustry/type/Weapon.java index d15ef9a3ae..107946661f 100644 --- a/core/src/io/anuke/mindustry/type/Weapon.java +++ b/core/src/io/anuke/mindustry/type/Weapon.java @@ -85,7 +85,7 @@ public class Weapon extends Content{ weapon.tr.trns(rotation + 180f, ammo.recoil); - shooter.getVelocity().add(weapon.tr); + shooter.velocity().add(weapon.tr); weapon.tr.trns(rotation, 3f); diff --git a/core/src/io/anuke/mindustry/world/Block.java b/core/src/io/anuke/mindustry/world/Block.java index 561eb9e90e..2070fff452 100644 --- a/core/src/io/anuke/mindustry/world/Block.java +++ b/core/src/io/anuke/mindustry/world/Block.java @@ -352,7 +352,7 @@ public class Block extends BaseBlock { } public void handleBulletHit(TileEntity entity, Bullet bullet){ - entity.damage(bullet.getDamage()); + entity.damage(bullet.damage()); } public void update(Tile tile){ diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index f579d3b683..976b0f0310 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -421,7 +421,7 @@ public class Tile implements Position, TargetTrait{ } @Override - public Vector2 getVelocity(){ + public Vector2 velocity(){ return Vector2.ZERO; } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java b/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java index 5a857f18e9..08392d7d32 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java @@ -49,13 +49,13 @@ public class DeflectorWall extends Wall{ super.handleBulletHit(entity, bullet); //doesn't reflect powerful bullets - if(bullet.getDamage() > maxDamageDeflect) return; + if(bullet.damage() > maxDamageDeflect) return; float penX = Math.abs(entity.x - bullet.x), penY = Math.abs(entity.y - bullet.y); - bullet.getHitbox(rect2); + bullet.hitbox(rect2); - Vector2 position = Geometry.raycastRect(bullet.x, bullet.y, bullet.x + bullet.getVelocity().x, bullet.y + bullet.getVelocity().y, + Vector2 position = Geometry.raycastRect(bullet.x, bullet.y, bullet.x + bullet.velocity().x, bullet.y + bullet.velocity().y, rect.setCenter(entity.x, entity.y).setSize(size * tilesize + rect2.width + rect2.height)); if(position != null){ @@ -63,9 +63,9 @@ public class DeflectorWall extends Wall{ } if(penX > penY){ - bullet.getVelocity().x *= -1; + bullet.velocity().x *= -1; }else{ - bullet.getVelocity().y *= -1; + bullet.velocity().y *= -1; } bullet.updateVelocity(); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/SurgeWall.java b/core/src/io/anuke/mindustry/world/blocks/defense/SurgeWall.java index 307afd4425..5316227bfc 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/SurgeWall.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/SurgeWall.java @@ -19,7 +19,7 @@ public class SurgeWall extends Wall{ public void handleBulletHit(TileEntity entity, Bullet bullet){ super.handleBulletHit(entity, bullet); if(Mathf.chance(lightningChance)){ - Lightning.create(entity.getTeam(), Palette.surge, lightningDamage, bullet.x, bullet.y, bullet.angle() + 180f, lightningLength); + Lightning.create(entity.getTeam(), Palette.surge, lightningDamage, bullet.x, bullet.y, bullet.rot() + 180f, lightningLength); } } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java index 938b9e3eb8..295208554c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java @@ -33,8 +33,8 @@ public class LaserTurret extends PowerTurret{ LaserTurretEntity entity = tile.entity(); if(entity.bulletLife > 0 && entity.bullet != null){ - tr.trns(entity.rotation, size * tilesize / 2, 0f); - entity.bullet.setRotation(entity.rotation); + tr.trns(entity.rotation, size * tilesize / 2f, 0f); + entity.bullet.rot(entity.rotation); entity.bullet.set(tile.drawx() + tr.x, tile.drawy() + tr.y); entity.bullet.time(0f); entity.heat = 1f; diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index cb639260c4..8af44e10c7 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -177,7 +177,7 @@ public class Conveyor extends Block{ } if(entity.convey.size * itemSpace < 0.9f){ - unit.getVelocity().add((tx * speed + centerx) * entity.delta(), (ty * speed + centery) * entity.delta()); + unit.velocity().add((tx * speed + centerx) * entity.delta(), (ty * speed + centery) * entity.delta()); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java index 72fa6e0939..b29ecab1b0 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java @@ -71,7 +71,7 @@ public class UnitFactory extends Block{ unit.setSpawner(tile); unit.set(tile.drawx() + Mathf.range(4), tile.drawy() + Mathf.range(4)); unit.add(); - unit.getVelocity().y = factory.launchVelocity; + unit.velocity().y = factory.launchVelocity; } } From 5743d3085189848c297193bef6d7f040d9795608 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jan 2019 16:01:27 -0500 Subject: [PATCH 2/6] Removed AmmoType class completely --- .../io/anuke/mindustry/content/AmmoTypes.java | 254 ------------------ .../io/anuke/mindustry/content/Bullets.java | 17 ++ .../io/anuke/mindustry/content/Weapons.java | 45 ++-- .../content/blocks/TurretBlocks.java | 158 ++++++----- .../content/bullets/ArtilleryBullets.java | 182 ++++++------- .../content/bullets/StandardBullets.java | 159 ++++++----- .../anuke/mindustry/core/ContentLoader.java | 4 - .../io/anuke/mindustry/entities/Player.java | 10 +- .../io/anuke/mindustry/entities/Units.java | 2 +- .../entities/bullet/BasicBulletType.java | 4 +- .../mindustry/entities/bullet/BulletType.java | 19 +- .../mindustry/entities/units/BaseUnit.java | 2 +- .../mindustry/entities/units/FlyingUnit.java | 10 +- .../mindustry/entities/units/GroundUnit.java | 12 +- core/src/io/anuke/mindustry/io/TypeIO.java | 10 - .../maps/generation/FortressGenerator.java | 10 +- .../io/anuke/mindustry/type/AmmoEntry.java | 13 - .../src/io/anuke/mindustry/type/AmmoType.java | 75 ------ .../io/anuke/mindustry/type/ContentType.java | 1 - core/src/io/anuke/mindustry/type/Weapon.java | 11 +- .../defense/turrets/ArtilleryTurret.java | 14 +- .../blocks/defense/turrets/BurstTurret.java | 10 +- .../blocks/defense/turrets/ChargeTurret.java | 14 +- .../blocks/defense/turrets/DoubleTurret.java | 8 +- .../blocks/defense/turrets/ItemTurret.java | 81 ++++-- .../blocks/defense/turrets/LaserTurret.java | 11 +- .../blocks/defense/turrets/LiquidTurret.java | 93 ++++--- .../blocks/defense/turrets/PowerTurret.java | 8 +- .../world/blocks/defense/turrets/Turret.java | 54 ++-- 29 files changed, 480 insertions(+), 811 deletions(-) delete mode 100644 core/src/io/anuke/mindustry/content/AmmoTypes.java create mode 100644 core/src/io/anuke/mindustry/content/Bullets.java delete mode 100644 core/src/io/anuke/mindustry/type/AmmoEntry.java delete mode 100644 core/src/io/anuke/mindustry/type/AmmoType.java diff --git a/core/src/io/anuke/mindustry/content/AmmoTypes.java b/core/src/io/anuke/mindustry/content/AmmoTypes.java deleted file mode 100644 index cd96e8344b..0000000000 --- a/core/src/io/anuke/mindustry/content/AmmoTypes.java +++ /dev/null @@ -1,254 +0,0 @@ -package io.anuke.mindustry.content; - -import io.anuke.mindustry.content.bullets.*; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.content.fx.ShootFx; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.AmmoType; -import io.anuke.mindustry.type.ContentType; - -public class AmmoTypes implements ContentList{ - public static AmmoType - bulletCopper, bulletDense, bulletThorium, bulletSilicon, bulletPyratite, - bulletDenseBig, bulletPyratiteBig, bulletThoriumBig, - shock, bombExplosive, bombIncendiary, bombOil, shellCarbide, flamerThermite, weaponMissile, weaponMissileSwarm, bulletMech, - healBlaster, bulletGlaive, - flakExplosive, flakPlastic, flakSurge, - missileExplosive, missileIncindiary, missileSurge, - artilleryDense, artilleryPlastic, artilleryHoming, artilleryIncindiary, artilleryExplosive, unitArtillery, - basicFlame, lancerLaser, lightning, meltdownLaser, burstLaser, - fuseShotgun, oil, water, lava, cryofluid, arc; - - @Override - public void load(){ - - //weapon specific - - bulletMech = new AmmoType(StandardBullets.mechSmall){{ - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; - reloadMultiplier = 1f; - inaccuracy = 5f; - }}; - - bulletGlaive = new AmmoType(Items.pyratite, StandardBullets.glaive, 3){{ - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; - inaccuracy = 3f; - }}; - - healBlaster = new AmmoType(TurretBullets.healBullet){{ - shootEffect = ShootFx.shootHeal; - smokeEffect = BulletFx.hitLaser; - reloadMultiplier = 1f; - inaccuracy = 2f; - }}; - - shock = new AmmoType(TurretBullets.lightning){{ - shootEffect = BulletFx.hitLancer; - smokeEffect = Fx.none; - }}; - - shellCarbide = new AmmoType(WeaponBullets.shellCarbide){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - }}; - - bombExplosive = new AmmoType(WeaponBullets.bombExplosive){{ - shootEffect = Fx.none; - smokeEffect = Fx.none; - }}; - - bombIncendiary = new AmmoType(WeaponBullets.bombIncendiary){{ - shootEffect = Fx.none; - smokeEffect = Fx.none; - }}; - - bombOil = new AmmoType(WeaponBullets.bombOil){{ - shootEffect = Fx.none; - smokeEffect = Fx.none; - }}; - - flamerThermite = new AmmoType(TurretBullets.basicFlame){{ - shootEffect = ShootFx.shootSmallFlame; - }}; - - weaponMissile = new AmmoType(MissileBullets.javelin){{ - shootEffect = BulletFx.hitBulletSmall; - smokeEffect = Fx.none; - reloadMultiplier = 1.2f; - }}; - - weaponMissileSwarm = new AmmoType(MissileBullets.swarm){{ - shootEffect = BulletFx.hitBulletSmall; - smokeEffect = ShootFx.shootSmallSmoke; - reloadMultiplier = 1.2f; - }}; - - //bullets - - bulletCopper = new AmmoType(Items.copper, StandardBullets.copper, 5){{ - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; - reloadMultiplier = 1f; - inaccuracy = 5f; - }}; - - bulletDense = new AmmoType(Items.densealloy, StandardBullets.dense, 2){{ - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; - reloadMultiplier = 0.6f; - }}; - - bulletThorium = new AmmoType(Items.thorium, StandardBullets.thorium, 2){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - }}; - - bulletSilicon = new AmmoType(Items.silicon, StandardBullets.homing, 5){{ - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; - reloadMultiplier = 1.4f; - }}; - - bulletPyratite = new AmmoType(Items.pyratite, StandardBullets.tracer, 3){{ - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; - inaccuracy = 3f; - }}; - - bulletDenseBig = new AmmoType(Items.densealloy, StandardBullets.denseBig, 1){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - }}; - - bulletThoriumBig = new AmmoType(Items.thorium, StandardBullets.thoriumBig, 1){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - }}; - - bulletPyratiteBig = new AmmoType(Items.pyratite, StandardBullets.tracerBig, 2){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - inaccuracy = 3f; - }}; - - //flak - - flakExplosive = new AmmoType(Items.blastCompound, FlakBullets.explosive, 5){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - }}; - - flakPlastic = new AmmoType(Items.plastanium, FlakBullets.plastic, 5){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - }}; - - flakSurge = new AmmoType(Items.surgealloy, FlakBullets.surge, 5){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - reloadMultiplier = 1/2f; - }}; - - //missiles - - missileExplosive = new AmmoType(Items.blastCompound, MissileBullets.explosive, 1){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 1.2f; - }}; - - missileIncindiary = new AmmoType(Items.pyratite, MissileBullets.incindiary, 1){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 1.0f; - }}; - - missileSurge = new AmmoType(Items.surgealloy, MissileBullets.surge, 1){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 1.1f; - }}; - - //artillery - - artilleryDense = new AmmoType(Items.densealloy, ArtilleryBullets.dense, 2){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - }}; - - artilleryPlastic = new AmmoType(Items.plastanium, ArtilleryBullets.plastic, 2){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 1.4f; - }}; - - artilleryHoming = new AmmoType(Items.silicon, ArtilleryBullets.homing, 1){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 0.9f; - }}; - - artilleryIncindiary = new AmmoType(Items.pyratite, ArtilleryBullets.incindiary, 2){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 1.2f; - }}; - - artilleryExplosive = new AmmoType(Items.blastCompound, ArtilleryBullets.explosive, 1){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 1.6f; - }}; - - unitArtillery = new AmmoType(Items.blastCompound, ArtilleryBullets.unit, 1){{ - shootEffect = ShootFx.shootBig2; - smokeEffect = ShootFx.shootBigSmoke2; - reloadMultiplier = 1.6f; - }}; - - - //flame - - basicFlame = new AmmoType(Liquids.oil, TurretBullets.basicFlame, 0.3f){{ - shootEffect = ShootFx.shootSmallFlame; - }}; - - //power - - lancerLaser = new AmmoType(TurretBullets.lancerLaser); - - burstLaser = new AmmoType(TurretBullets.burstLaser){{ - range = 60f; - }}; - - lightning = new AmmoType(TurretBullets.lightning); - - arc = new AmmoType(TurretBullets.arc); - - meltdownLaser = new AmmoType(TurretBullets.meltdownLaser); - - fuseShotgun = new AmmoType(Items.densealloy, TurretBullets.fuseShot, 1f){{ - shootEffect = Fx.none; - smokeEffect = ShootFx.shootBigSmoke2; - }}; - - //liquid - - oil = new AmmoType(Liquids.oil, TurretBullets.oilShot, 0.3f); - - water = new AmmoType(Liquids.water, TurretBullets.waterShot, 0.3f); - - lava = new AmmoType(Liquids.lava, TurretBullets.lavaShot, 0.3f); - - cryofluid = new AmmoType(Liquids.cryofluid, TurretBullets.cryoShot, 0.3f); - - } - - @Override - public ContentType type(){ - return ContentType.ammo; - } -} diff --git a/core/src/io/anuke/mindustry/content/Bullets.java b/core/src/io/anuke/mindustry/content/Bullets.java new file mode 100644 index 0000000000..6e5137a433 --- /dev/null +++ b/core/src/io/anuke/mindustry/content/Bullets.java @@ -0,0 +1,17 @@ +package io.anuke.mindustry.content; + +import io.anuke.mindustry.game.ContentList; +import io.anuke.mindustry.type.ContentType; + +public class Bullets implements ContentList{ + + @Override + public void load(){ + + } + + @Override + public ContentType type(){ + return ContentType.bullet; + } +} diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index 480c8988bf..f979f23cb6 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -1,5 +1,6 @@ package io.anuke.mindustry.content; +import io.anuke.mindustry.content.bullets.*; import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.ContentList; @@ -8,7 +9,7 @@ import io.anuke.mindustry.type.Weapon; public class Weapons implements ContentList{ public static Weapon blaster, blasterSmall, glaiveBlaster, droneBlaster, healBlaster, healBlasterDrone, chainBlaster, shockgun, - sapper, swarmer, bomber, bomberTrident, flakgun, flamethrower, missiles, artillery, laserBurster, healBlasterDrone2; + swarmer, bomber, bomberTrident, flakgun, flamethrower, missiles, artillery, laserBurster, healBlasterDrone2; @Override public void load(){ @@ -18,7 +19,7 @@ public class Weapons implements ContentList{ reload = 14f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = AmmoTypes.bulletMech; + ammo = StandardBullets.mechSmall; }}; blasterSmall = new Weapon("blaster"){{ @@ -26,7 +27,7 @@ public class Weapons implements ContentList{ reload = 15f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = AmmoTypes.bulletCopper; + ammo = StandardBullets.copper; }}; glaiveBlaster = new Weapon("bomber"){{ @@ -34,7 +35,7 @@ public class Weapons implements ContentList{ reload = 10f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = AmmoTypes.bulletGlaive; + ammo = StandardBullets.glaive; }}; droneBlaster = new Weapon("blaster"){{ @@ -43,7 +44,7 @@ public class Weapons implements ContentList{ width = 1f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = AmmoTypes.bulletCopper; + ammo = StandardBullets.copper; }}; healBlaster = new Weapon("heal-blaster"){{ @@ -52,7 +53,7 @@ public class Weapons implements ContentList{ roundrobin = false; ejectEffect = Fx.none; recoil = 2f; - ammo = AmmoTypes.healBlaster; + ammo = TurretBullets.healBullet; }}; missiles = new Weapon("missiles"){{ @@ -64,7 +65,7 @@ public class Weapons implements ContentList{ ejectEffect = Fx.none; velocityRnd = 0.2f; spacing = 1f; - ammo = AmmoTypes.weaponMissile; + ammo = MissileBullets.javelin; }}; swarmer = new Weapon("swarmer"){{ @@ -77,7 +78,7 @@ public class Weapons implements ContentList{ roundrobin = true; ejectEffect = Fx.none; shake = 3f; - ammo = AmmoTypes.weaponMissileSwarm; + ammo = MissileBullets.swarm; }}; chainBlaster = new Weapon("chain-blaster"){{ @@ -85,7 +86,7 @@ public class Weapons implements ContentList{ reload = 28f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = AmmoTypes.bulletCopper; + ammo = StandardBullets.copper; }}; shockgun = new Weapon("shockgun"){{ @@ -96,7 +97,7 @@ public class Weapons implements ContentList{ inaccuracy = 0f; velocityRnd = 0.2f; ejectEffect = Fx.none; - ammo = AmmoTypes.shock; + ammo = TurretBullets.lightning; }}; flakgun = new Weapon("flakgun"){{ @@ -108,7 +109,7 @@ public class Weapons implements ContentList{ recoil = 3f; velocityRnd = 0.1f; ejectEffect = ShootFx.shellEjectMedium; - ammo = AmmoTypes.shellCarbide; + ammo = ArtilleryBullets.dense; }}; flamethrower = new Weapon("flamethrower"){{ @@ -117,7 +118,7 @@ public class Weapons implements ContentList{ roundrobin = true; recoil = 1f; ejectEffect = Fx.none; - ammo = AmmoTypes.flamerThermite; + ammo = TurretBullets.basicFlame; }}; artillery = new Weapon("artillery"){{ @@ -127,15 +128,7 @@ public class Weapons implements ContentList{ recoil = 5f; shake = 2f; ejectEffect = ShootFx.shellEjectMedium; - ammo = AmmoTypes.unitArtillery; - }}; - - sapper = new Weapon("sapper"){{ - length = 1.5f; - reload = 12f; - roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; - ammo = AmmoTypes.bulletDense; + ammo = ArtilleryBullets.unit; }}; bomber = new Weapon("bomber"){{ @@ -146,7 +139,7 @@ public class Weapons implements ContentList{ ejectEffect = Fx.none; velocityRnd = 1f; inaccuracy = 40f; - ammo = AmmoTypes.bombExplosive; + ammo = WeaponBullets.bombExplosive; }}; bomberTrident = new Weapon("bomber"){{ @@ -158,7 +151,7 @@ public class Weapons implements ContentList{ ejectEffect = Fx.none; velocityRnd = 1f; inaccuracy = 40f; - ammo = AmmoTypes.bombExplosive; + ammo = WeaponBullets.bombExplosive; }}; laserBurster = new Weapon("bomber"){{ @@ -167,7 +160,7 @@ public class Weapons implements ContentList{ width = 0f; roundrobin = true; ejectEffect = Fx.none; - ammo = AmmoTypes.lancerLaser; + ammo = TurretBullets.lancerLaser; }}; healBlasterDrone = new Weapon("heal-blaster"){{ @@ -177,7 +170,7 @@ public class Weapons implements ContentList{ roundrobin = true; ejectEffect = Fx.none; recoil = 2f; - ammo = AmmoTypes.healBlaster; + ammo = TurretBullets.healBullet; }}; healBlasterDrone2 = new Weapon("heal-blaster"){{ @@ -187,7 +180,7 @@ public class Weapons implements ContentList{ roundrobin = true; ejectEffect = Fx.none; recoil = 2f; - ammo = AmmoTypes.healBlaster; + ammo = TurretBullets.healBullet; }}; } diff --git a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java index 1652a4bff6..813f7624b0 100644 --- a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java @@ -1,17 +1,14 @@ package io.anuke.mindustry.content.blocks; -import io.anuke.arc.Core; import io.anuke.arc.graphics.Color; -import io.anuke.arc.graphics.g2d.TextureRegion; -import io.anuke.mindustry.content.AmmoTypes; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.mindustry.content.Items; +import io.anuke.mindustry.content.Liquids; +import io.anuke.mindustry.content.bullets.*; import io.anuke.mindustry.content.fx.ShootFx; -import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.defense.turrets.*; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; public class TurretBlocks extends BlockList implements ContentList{ public static Block duo, /*scatter,*/ @@ -20,7 +17,12 @@ public class TurretBlocks extends BlockList implements ContentList{ @Override public void load(){ duo = new DoubleTurret("duo"){{ - ammoTypes = new AmmoType[]{AmmoTypes.bulletCopper, AmmoTypes.bulletDense, AmmoTypes.bulletPyratite, AmmoTypes.bulletSilicon}; + ammo( + Items.copper, StandardBullets.copper, + Items.densealloy, StandardBullets.dense, + Items.pyratite, StandardBullets.tracer, + Items.silicon, StandardBullets.homing + ); reload = 25f; restitution = 0.03f; range = 90f; @@ -32,7 +34,11 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; hail = new ArtilleryTurret("hail"){{ - ammoTypes = new AmmoType[]{AmmoTypes.artilleryDense, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary}; + ammo( + Items.densealloy, ArtilleryBullets.dense, + Items.silicon, ArtilleryBullets.homing, + Items.pyratite, ArtilleryBullets.incendiary + ); reload = 60f; recoil = 2f; range = 230f; @@ -41,29 +47,22 @@ public class TurretBlocks extends BlockList implements ContentList{ health = 120; }}; - scorch = new LiquidTurret("scorch"){ - protected TextureRegion shootRegion; - - @Override - public void load(){ - super.load(); - shootRegion = Core.atlas.find(name + "-shoot"); - } - - { - ammoTypes = new AmmoType[]{AmmoTypes.basicFlame}; - recoil = 0f; - reload = 4f; - shootCone = 50f; - ammoUseEffect = ShootFx.shellEjectSmall; - health = 160; - - drawer = (tile, entity) -> Draw.rect(entity.target != null ? shootRegion : region, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); - } - }; + scorch = new LiquidTurret("scorch"){{ + ammo(Liquids.oil, TurretBullets.basicFlame); + recoil = 0f; + reload = 4f; + shootCone = 50f; + ammoUseEffect = ShootFx.shellEjectSmall; + health = 160; + }}; wave = new LiquidTurret("wave"){{ - ammoTypes = new AmmoType[]{AmmoTypes.water, AmmoTypes.lava, AmmoTypes.cryofluid, AmmoTypes.oil}; + ammo( + Liquids.water, TurretBullets.waterShot, + Liquids.lava, TurretBullets.lavaShot, + Liquids.cryofluid, TurretBullets.cryoShot, + Liquids.oil, TurretBullets.oilShot + ); size = 2; recoil = 0f; reload = 4f; @@ -88,7 +87,7 @@ public class TurretBlocks extends BlockList implements ContentList{ chargeTime = 60f; chargeMaxDelay = 30f; chargeEffects = 7; - shootType = AmmoTypes.lancerLaser; + shootType = TurretBullets.lancerLaser; recoil = 2f; reload = 100f; cooldown = 0.03f; @@ -106,7 +105,7 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; arc = new PowerTurret("arc"){{ - shootType = AmmoTypes.arc; + shootType = TurretBullets.arc; reload = 85f; shootShake = 1f; shootCone = 40f; @@ -121,7 +120,11 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; swarmer = new BurstTurret("swarmer"){{ - ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge}; + ammo( + Items.blastCompound, MissileBullets.explosive, + Items.pyratite, MissileBullets.incindiary, + Items.surgealloy, MissileBullets.surge + ); reload = 50f; shots = 4; burstSpacing = 5; @@ -132,54 +135,37 @@ public class TurretBlocks extends BlockList implements ContentList{ health = 380; }}; - salvo = new BurstTurret("salvo"){ - TextureRegion[] panels = new TextureRegion[2]; + salvo = new BurstTurret("salvo"){{ + ammo( + Items.copper, StandardBullets.copper, + Items.densealloy, StandardBullets.dense, + Items.pyratite, StandardBullets.tracer, + Items.silicon, StandardBullets.homing, + Items.thorium, StandardBullets.thorium + ); - @Override - public void load() { - super.load(); - panels[0] = Core.atlas.find(name + "-panel-left"); - panels[1] = Core.atlas.find(name + "-panel-right"); - } - - { - size = 2; - range = 120f; - ammoTypes = new AmmoType[]{AmmoTypes.bulletCopper, AmmoTypes.bulletDense, AmmoTypes.bulletPyratite, AmmoTypes.bulletThorium, AmmoTypes.bulletSilicon}; - reload = 35f; - restitution = 0.03f; - ammoEjectBack = 3f; - cooldown = 0.03f; - recoil = 3f; - shootShake = 2f; - burstSpacing = 4; - shots = 3; - ammoUseEffect = ShootFx.shellEjectBig; - - drawer = (tile, entity) -> { - Draw.rect(region, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); - float offsetx = (int) (abscurve(Mathf.curve(entity.reload / reload, 0.3f, 0.2f)) * 3f); - float offsety = -(int) (abscurve(Mathf.curve(entity.reload / reload, 0.3f, 0.2f)) * 2f); - - for(int i : Mathf.signs){ - float rot = entity.rotation + 90 * i; - Draw.rect(panels[i == -1 ? 0 : 1], - tile.drawx() + tr2.x + Angles.trnsx(rot, offsetx, offsety), - tile.drawy() + tr2.y + Angles.trnsy(rot, -offsetx, offsety), entity.rotation - 90); - } - }; - - health = 360; - } - - /** Converts a value range from 0-1 to a value range 0-1-0. */ - float abscurve(float f){ - return 1f - Math.abs(f - 0.5f) * 2f; - } - }; + size = 2; + range = 120f; + reload = 35f; + restitution = 0.03f; + ammoEjectBack = 3f; + cooldown = 0.03f; + recoil = 3f; + shootShake = 2f; + burstSpacing = 4; + shots = 3; + ammoUseEffect = ShootFx.shellEjectBig; + health = 360; + }}; ripple = new ArtilleryTurret("ripple"){{ - ammoTypes = new AmmoType[]{AmmoTypes.artilleryDense, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary, AmmoTypes.artilleryExplosive, AmmoTypes.artilleryPlastic}; + ammo( + Items.densealloy, ArtilleryBullets.dense, + Items.silicon, ArtilleryBullets.homing, + Items.pyratite, ArtilleryBullets.incendiary, + Items.blastCompound, ArtilleryBullets.explosive, + Items.plastanium, ArtilleryBullets.plastic + ); size = 3; shots = 4; inaccuracy = 12f; @@ -197,7 +183,11 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; cyclone = new ItemTurret("cyclone"){{ - ammoTypes = new AmmoType[]{AmmoTypes.flakExplosive, AmmoTypes.flakPlastic, AmmoTypes.flakSurge}; + ammo( + Items.blastCompound, FlakBullets.explosive, + Items.plastanium, FlakBullets.plastic, + Items.surgealloy, FlakBullets.surge + ); xRand = 4f; reload = 8f; range = 145f; @@ -211,7 +201,7 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; fuse = new ItemTurret("fuse"){{ - ammoTypes = new AmmoType[]{AmmoTypes.fuseShotgun}; + ammo(Items.densealloy, TurretBullets.fuseShot); reload = 50f; shootShake = 4f; range = 80f; @@ -223,7 +213,11 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; spectre = new DoubleTurret("spectre"){{ - ammoTypes = new AmmoType[]{AmmoTypes.bulletDenseBig, AmmoTypes.bulletPyratiteBig, AmmoTypes.bulletThoriumBig}; + ammo( + Items.densealloy, StandardBullets.denseBig, + Items.pyratite, StandardBullets.tracerBig, + Items.thorium, StandardBullets.thoriumBig + ); reload = 6f; coolantMultiplier = 0.5f; maxCoolantUsed = 1.5f; @@ -243,7 +237,7 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; meltdown = new LaserTurret("meltdown"){{ - shootType = AmmoTypes.meltdownLaser; + shootType = TurretBullets.meltdownLaser; shootEffect = ShootFx.shootBigSmoke2; shootCone = 40f; recoil = 4f; diff --git a/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java b/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java index 92b3b242ca..25169fca0f 100644 --- a/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java @@ -9,115 +9,99 @@ import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.game.ContentList; public class ArtilleryBullets extends BulletList implements ContentList{ - public static BulletType dense, plastic, plasticFrag, homing, incindiary, explosive, surge, unit; + public static BulletType dense, plastic, plasticFrag, homing, incendiary, explosive, surge, unit; @Override public void load(){ - dense = new ArtilleryBulletType(3f, 0, "shell"){ - { - hitEffect = BulletFx.flakExplosion; - knockback = 0.8f; - lifetime = 50f; - bulletWidth = bulletHeight = 11f; - collidesTiles = false; - splashDamageRadius = 25f; - splashDamage = 33f; - } - }; + dense = new ArtilleryBulletType(3f, 0, "shell"){{ + hitEffect = BulletFx.flakExplosion; + knockback = 0.8f; + lifetime = 50f; + bulletWidth = bulletHeight = 11f; + collidesTiles = false; + splashDamageRadius = 25f; + splashDamage = 33f; + }}; - plasticFrag = new BasicBulletType(2.5f, 6, "bullet"){ - { - bulletWidth = 10f; - bulletHeight = 12f; - bulletShrink = 1f; - lifetime = 15f; - backColor = Palette.plastaniumBack; - frontColor = Palette.plastaniumFront; - despawnEffect = Fx.none; - } - }; + plasticFrag = new BasicBulletType(2.5f, 6, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 12f; + bulletShrink = 1f; + lifetime = 15f; + backColor = Palette.plastaniumBack; + frontColor = Palette.plastaniumFront; + despawnEffect = Fx.none; + }}; - plastic = new ArtilleryBulletType(3.3f, 0, "shell"){ - { - hitEffect = BulletFx.plasticExplosion; - knockback = 1f; - lifetime = 55f; - bulletWidth = bulletHeight = 13f; - collidesTiles = false; - splashDamageRadius = 35f; - splashDamage = 35f; - fragBullet = plasticFrag; - fragBullets = 9; - backColor = Palette.plastaniumBack; - frontColor = Palette.plastaniumFront; - } - }; + plastic = new ArtilleryBulletType(3.3f, 0, "shell"){{ + hitEffect = BulletFx.plasticExplosion; + knockback = 1f; + lifetime = 55f; + bulletWidth = bulletHeight = 13f; + collidesTiles = false; + splashDamageRadius = 35f; + splashDamage = 35f; + fragBullet = plasticFrag; + fragBullets = 9; + backColor = Palette.plastaniumBack; + frontColor = Palette.plastaniumFront; + }}; - homing = new ArtilleryBulletType(3f, 0, "shell"){ - { - hitEffect = BulletFx.flakExplosion; - knockback = 0.8f; - lifetime = 45f; - bulletWidth = bulletHeight = 11f; - collidesTiles = false; - splashDamageRadius = 25f; - splashDamage = 33f; - homingPower = 2f; - homingRange = 50f; - } - }; + homing = new ArtilleryBulletType(3f, 0, "shell"){{ + hitEffect = BulletFx.flakExplosion; + knockback = 0.8f; + lifetime = 45f; + bulletWidth = bulletHeight = 11f; + collidesTiles = false; + splashDamageRadius = 25f; + splashDamage = 33f; + homingPower = 2f; + homingRange = 50f; + }}; - incindiary = new ArtilleryBulletType(3f, 0, "shell"){ - { - hitEffect = BulletFx.blastExplosion; - knockback = 0.8f; - lifetime = 60f; - bulletWidth = bulletHeight = 13f; - collidesTiles = false; - splashDamageRadius = 25f; - splashDamage = 30f; - incendAmount = 4; - incendSpread = 11f; - frontColor = Palette.lightishOrange; - backColor = Palette.lightOrange; - trailEffect = BulletFx.incendTrail; - } - }; + incendiary = new ArtilleryBulletType(3f, 0, "shell"){{ + hitEffect = BulletFx.blastExplosion; + knockback = 0.8f; + lifetime = 60f; + bulletWidth = bulletHeight = 13f; + collidesTiles = false; + splashDamageRadius = 25f; + splashDamage = 30f; + incendAmount = 4; + incendSpread = 11f; + frontColor = Palette.lightishOrange; + backColor = Palette.lightOrange; + trailEffect = BulletFx.incendTrail; + }}; - explosive = new ArtilleryBulletType(2f, 0, "shell"){ - { - hitEffect = BulletFx.blastExplosion; - knockback = 0.8f; - lifetime = 70f; - bulletWidth = bulletHeight = 14f; - collidesTiles = false; - splashDamageRadius = 45f; - splashDamage = 50f; - backColor = Palette.missileYellowBack; - frontColor = Palette.missileYellow; - } - }; + explosive = new ArtilleryBulletType(2f, 0, "shell"){{ + hitEffect = BulletFx.blastExplosion; + knockback = 0.8f; + lifetime = 70f; + bulletWidth = bulletHeight = 14f; + collidesTiles = false; + splashDamageRadius = 45f; + splashDamage = 50f; + backColor = Palette.missileYellowBack; + frontColor = Palette.missileYellow; + }}; - unit = new ArtilleryBulletType(2f, 0, "shell"){ - { - hitEffect = BulletFx.blastExplosion; - knockback = 0.8f; - lifetime = 90f; - bulletWidth = bulletHeight = 14f; - collides = true; - collidesTiles = true; - splashDamageRadius = 45f; - splashDamage = 50f; - backColor = Palette.bulletYellowBack; - frontColor = Palette.bulletYellow; - } - }; + unit = new ArtilleryBulletType(2f, 0, "shell"){{ + hitEffect = BulletFx.blastExplosion; + knockback = 0.8f; + lifetime = 90f; + bulletWidth = bulletHeight = 14f; + collides = true; + collidesTiles = true; + splashDamageRadius = 45f; + splashDamage = 50f; + backColor = Palette.bulletYellowBack; + frontColor = Palette.bulletYellow; + }}; - surge = new ArtilleryBulletType(3f, 0, "shell"){ - { - //TODO - } - }; + surge = new ArtilleryBulletType(3f, 0, "shell"){{ + //TODO + }}; } } diff --git a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java b/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java index fa6559fb10..54670e3484 100644 --- a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java @@ -2,10 +2,11 @@ package io.anuke.mindustry.content.bullets; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.entities.bullet.BasicBulletType; import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.game.ContentList; +import io.anuke.mindustry.graphics.Palette; public class StandardBullets extends BulletList implements ContentList{ public static BulletType copper, dense, thorium, homing, tracer, mechSmall, glaive, denseBig, thoriumBig, tracerBig; @@ -13,96 +14,88 @@ public class StandardBullets extends BulletList implements ContentList{ @Override public void load(){ - copper = new BasicBulletType(2.5f, 7, "bullet"){ - { - bulletWidth = 7f; - bulletHeight = 9f; - } - }; + copper = new BasicBulletType(2.5f, 7, "bullet"){{ + bulletWidth = 7f; + bulletHeight = 9f; + shootEffect = ShootFx.shootSmall; + smokeEffect = ShootFx.shootSmallSmoke; + ammoMultiplier = 5; + }}; - dense = new BasicBulletType(3.5f, 18, "bullet"){ - { - bulletWidth = 9f; - bulletHeight = 12f; - armorPierce = 0.2f; - } - }; + dense = new BasicBulletType(3.5f, 18, "bullet"){{ + bulletWidth = 9f; + bulletHeight = 12f; + armorPierce = 0.2f; + reloadMultiplier = 0.6f; + ammoMultiplier = 2; + }}; - thorium = new BasicBulletType(4f, 29, "bullet"){ - { - bulletWidth = 10f; - bulletHeight = 13f; - armorPierce = 0.5f; - } - }; + thorium = new BasicBulletType(4f, 29, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 13f; + armorPierce = 0.5f; + shootEffect = ShootFx.shootBig; + smokeEffect = ShootFx.shootBigSmoke; + ammoMultiplier = 2; + }}; - homing = new BasicBulletType(3f, 9, "bullet"){ - { - bulletWidth = 7f; - bulletHeight = 9f; - homingPower = 5f; - } - }; + homing = new BasicBulletType(3f, 9, "bullet"){{ + bulletWidth = 7f; + bulletHeight = 9f; + homingPower = 5f; + reloadMultiplier = 1.4f; + ammoMultiplier = 5; + }}; - tracer = new BasicBulletType(3.2f, 11, "bullet"){ - { - bulletWidth = 10f; - bulletHeight = 12f; - frontColor = Palette.lightishOrange; - backColor = Palette.lightOrange; - incendSpread = 3f; - incendAmount = 1; - incendChance = 0.3f; - } - }; + tracer = new BasicBulletType(3.2f, 11, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 12f; + frontColor = Palette.lightishOrange; + backColor = Palette.lightOrange; + incendSpread = 3f; + incendAmount = 1; + incendChance = 0.3f; + inaccuracy = 3f; + }}; - glaive = new BasicBulletType(4f, 7.5f, "bullet"){ - { - bulletWidth = 10f; - bulletHeight = 12f; - frontColor = Color.valueOf("feb380"); - backColor = Color.valueOf("ea8878"); - incendSpread = 3f; - incendAmount = 1; - incendChance = 0.3f; - } - }; + glaive = new BasicBulletType(4f, 7.5f, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 12f; + frontColor = Color.valueOf("feb380"); + backColor = Color.valueOf("ea8878"); + incendSpread = 3f; + incendAmount = 1; + incendChance = 0.3f; + }}; - mechSmall = new BasicBulletType(4f, 9, "bullet"){ - { - bulletWidth = 11f; - bulletHeight = 14f; - lifetime = 40f; - despawnEffect = BulletFx.hitBulletSmall; - } - }; + mechSmall = new BasicBulletType(4f, 9, "bullet"){{ + bulletWidth = 11f; + bulletHeight = 14f; + lifetime = 40f; + inaccuracy = 5f; + despawnEffect = BulletFx.hitBulletSmall; + }}; - denseBig = new BasicBulletType(7f, 42, "bullet"){ - { - bulletWidth = 15f; - bulletHeight = 21f; - armorPierce = 0.2f; - } - }; + denseBig = new BasicBulletType(7f, 42, "bullet"){{ + bulletWidth = 15f; + bulletHeight = 21f; + armorPierce = 0.2f; + }}; - thoriumBig = new BasicBulletType(8f, 65, "bullet"){ - { - bulletWidth = 16f; - bulletHeight = 23f; - armorPierce = 0.5f; - } - }; + thoriumBig = new BasicBulletType(8f, 65, "bullet"){{ + bulletWidth = 16f; + bulletHeight = 23f; + armorPierce = 0.5f; + }}; - tracerBig = new BasicBulletType(7f, 38, "bullet"){ - { - bulletWidth = 16f; - bulletHeight = 21f; - frontColor = Palette.lightishOrange; - backColor = Palette.lightOrange; - incendSpread = 3f; - incendAmount = 2; - incendChance = 0.3f; - } - }; + tracerBig = new BasicBulletType(7f, 38, "bullet"){{ + bulletWidth = 16f; + bulletHeight = 21f; + frontColor = Palette.lightishOrange; + backColor = Palette.lightOrange; + incendSpread = 3f; + incendAmount = 2; + incendChance = 0.3f; + }}; } } diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index dfd6091b00..8cbb87673c 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -67,10 +67,6 @@ public class ContentLoader{ new TurretBullets(), new WeaponBullets(), - - //ammotypes - new AmmoTypes(), - //weapons new Weapons(), diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 7380ae0ea9..2410644da8 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -629,7 +629,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra protected void updateFlying(){ if(Units.invalidateTarget(target, this) && !(target instanceof TileEntity && ((TileEntity) target).damaged() && target.getTeam() == team && - mech.canHeal && dst(target) < getWeapon().getAmmo().getRange())){ + mech.canHeal && dst(target) < getWeapon().getAmmo().range())){ target = null; } @@ -709,11 +709,11 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra if(target == null){ isShooting = false; if(Core.settings.getBool("autotarget")){ - target = Units.getClosestTarget(team, x, y, getWeapon().getAmmo().getRange()); + target = Units.getClosestTarget(team, x, y, getWeapon().getAmmo().range()); if(mech.canHeal && target == null){ target = Geometry.findClosest(x, y, world.indexer.getDamaged(Team.blue)); - if(target != null && dst(target) > getWeapon().getAmmo().getRange()){ + if(target != null && dst(target) > getWeapon().getAmmo().range()){ target = null; }else if(target != null){ target = ((Tile) target).entity; @@ -725,14 +725,14 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra } } }else if(target.isValid() || (target instanceof TileEntity && ((TileEntity) target).damaged() && target.getTeam() == team && - mech.canHeal && dst(target) < getWeapon().getAmmo().getRange())){ + mech.canHeal && dst(target) < getWeapon().getAmmo().range())){ //rotate toward and shoot the target if(mech.turnCursor){ rotation = Mathf.slerpDelta(rotation, angleTo(target), 0.2f); } Vector2 intercept = - Predict.intercept(x, y, target.getX(), target.getY(), target.velocity().x - velocity.x, target.velocity().y - velocity.y, getWeapon().getAmmo().bullet.speed); + Predict.intercept(x, y, target.getX(), target.getY(), target.velocity().x - velocity.x, target.velocity().y - velocity.y, getWeapon().getAmmo().speed); pointerX = intercept.x; pointerY = intercept.y; diff --git a/core/src/io/anuke/mindustry/entities/Units.java b/core/src/io/anuke/mindustry/entities/Units.java index 4b2e984f42..a265a9bcd0 100644 --- a/core/src/io/anuke/mindustry/entities/Units.java +++ b/core/src/io/anuke/mindustry/entities/Units.java @@ -48,7 +48,7 @@ public class Units{ /**See {@link #invalidateTarget(TargetTrait, Team, float, float, float)}*/ public static boolean invalidateTarget(TargetTrait target, Unit targeter){ - return invalidateTarget(target, targeter.team, targeter.x, targeter.y, targeter.getWeapon().getAmmo().getRange()); + return invalidateTarget(target, targeter.team, targeter.x, targeter.y, targeter.getWeapon().getAmmo().range()); } /**Returns whether there are any entities on this tile.*/ diff --git a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java index 8264736a92..7f044fbcd5 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java @@ -13,9 +13,7 @@ import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.traits.TargetTrait; import io.anuke.mindustry.graphics.Palette; -/** - * A BulletType for most ammo-based bullets shot from turrets and units. - */ +/**An extended BulletType for most ammo-based bullets shot from turrets and units.*/ public class BasicBulletType extends BulletType{ public Color backColor = Palette.bulletYellowBack, frontColor = Palette.bulletYellow; public float bulletWidth = 5f, bulletHeight = 7f; diff --git a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java index 69adf8d54e..3ac82c565b 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java @@ -4,7 +4,7 @@ import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; import io.anuke.mindustry.content.StatusEffects; import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.StatusEffect; @@ -21,9 +21,17 @@ public abstract class BulletType extends Content{ public Effect hitEffect, despawnEffect; /**Effect created when shooting.*/ - public Effect shootEffect = Fx.none; + public Effect shootEffect = ShootFx.shootSmall; /**Extra smoke effect created when shooting.*/ - public Effect smokeEffect = Fx.none; + public Effect smokeEffect = ShootFx.shootSmallSmoke; + /**Extra inaccuracy when firing.*/ + public float inaccuracy = 0f; + /**How many bullets get created per ammo item/liquid.*/ + public float ammoMultiplier = 1f; + /**Multiplied by turret reload speed to get final shoot speed.*/ + public float reloadMultiplier = 1f; + /**Recoil from shooter entities.*/ + public float recoil; public float splashDamage = 0f; /**Knockback in velocity.*/ @@ -57,6 +65,11 @@ public abstract class BulletType extends Content{ despawnEffect = BulletFx.hitBulletSmall; } + /**Returns maximum distance the bullet this bullet type has can travel.*/ + public float range(){ + return speed * lifetime; + } + public boolean collides(Bullet bullet, Tile tile){ return true; } diff --git a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java index c139aedf4b..4d5eb7c956 100644 --- a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java @@ -184,7 +184,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{ } public void targetClosest(){ - target = Units.getClosestTarget(team, x, y, Math.max(getWeapon().getAmmo().getRange(), type.range), u -> type.targetAir || !u.isFlying()); + target = Units.getClosestTarget(team, x, y, Math.max(getWeapon().getAmmo().range(), type.range), u -> type.targetAir || !u.isFlying()); } public TileEntity getClosestEnemyCore(){ diff --git a/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java b/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java index f2b00660d9..bc46c97b7b 100644 --- a/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java @@ -8,10 +8,10 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.entities.Predict; import io.anuke.mindustry.entities.Units; +import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.entities.traits.CarriableTrait; import io.anuke.mindustry.entities.traits.CarryTrait; import io.anuke.mindustry.net.Net; -import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.meta.BlockFlag; @@ -74,11 +74,11 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{ }else{ attack(150f); - if((Angles.near(angleTo(target), rotation, 15f) || !getWeapon().getAmmo().bullet.keepVelocity) //bombers don't care about rotation - && dst(target) < Math.max(getWeapon().getAmmo().getRange(), type.range)){ - AmmoType ammo = getWeapon().getAmmo(); + if((Angles.near(angleTo(target), rotation, 15f) || !getWeapon().getAmmo().keepVelocity) //bombers don't care about rotation + && dst(target) < Math.max(getWeapon().getAmmo().range(), type.range)){ + BulletType ammo = getWeapon().getAmmo(); - Vector2 to = Predict.intercept(FlyingUnit.this, target, ammo.bullet.speed); + Vector2 to = Predict.intercept(FlyingUnit.this, target, ammo.speed); getWeapon().update(FlyingUnit.this, to.x, to.y); } diff --git a/core/src/io/anuke/mindustry/entities/units/GroundUnit.java b/core/src/io/anuke/mindustry/entities/units/GroundUnit.java index ba73b95f43..b330373b8d 100644 --- a/core/src/io/anuke/mindustry/entities/units/GroundUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/GroundUnit.java @@ -10,8 +10,8 @@ import io.anuke.mindustry.Vars; import io.anuke.mindustry.entities.Predict; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Units; +import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.game.Team; -import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Weapon; import io.anuke.mindustry.world.Tile; @@ -43,11 +43,11 @@ public abstract class GroundUnit extends BaseUnit{ TileEntity core = getClosestEnemyCore(); float dst = core == null ? 0 : dst(core); - if(core != null && dst < getWeapon().getAmmo().getRange() / 1.1f){ + if(core != null && dst < getWeapon().getAmmo().range() / 1.1f){ target = core; } - if(dst > getWeapon().getAmmo().getRange() * 0.5f){ + if(dst > getWeapon().getAmmo().range() * 0.5f){ moveToCore(); } } @@ -187,13 +187,13 @@ public abstract class GroundUnit extends BaseUnit{ } if(!Units.invalidateTarget(target, this)){ - if(dst(target) < getWeapon().getAmmo().getRange()){ + if(dst(target) < getWeapon().getAmmo().range()){ rotate(angleTo(target)); if(Angles.near(angleTo(target), rotation, 13f)){ - AmmoType ammo = getWeapon().getAmmo(); + BulletType ammo = getWeapon().getAmmo(); - Vector2 to = Predict.intercept(GroundUnit.this, target, ammo.bullet.speed); + Vector2 to = Predict.intercept(GroundUnit.this, target, ammo.speed); getWeapon().update(GroundUnit.this, to.x, to.y); } diff --git a/core/src/io/anuke/mindustry/io/TypeIO.java b/core/src/io/anuke/mindustry/io/TypeIO.java index d2bcbb1270..5ae705a176 100644 --- a/core/src/io/anuke/mindustry/io/TypeIO.java +++ b/core/src/io/anuke/mindustry/io/TypeIO.java @@ -292,16 +292,6 @@ public class TypeIO{ return content.liquid(buffer.get()); } - @WriteClass(AmmoType.class) - public static void writeAmmo(ByteBuffer buffer, AmmoType type){ - buffer.put(type.id); - } - - @ReadClass(AmmoType.class) - public static AmmoType readAmmo(ByteBuffer buffer){ - return content.getByID(ContentType.weapon, buffer.get()); - } - @WriteClass(BulletType.class) public static void writeBulletType(ByteBuffer buffer, BulletType type){ buffer.put(type.id); diff --git a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java index 0b122d1f36..2c3449ca0e 100644 --- a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java @@ -13,7 +13,6 @@ import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; import io.anuke.mindustry.content.blocks.*; import io.anuke.mindustry.game.Team; -import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Edges; @@ -74,12 +73,14 @@ public class FortressGenerator{ float placeChance = difficultyScl*0.75f+0.25f; IntIntMap ammoPerType = new IntIntMap(); + //todo implement + /* for(Block turret : turrets){ if(!(turret instanceof ItemTurret)) continue; ItemTurret t = (ItemTurret)turret; int size = t.getAmmoTypes().length; ammoPerType.put(t.id, Mathf.clamp((int)(size* difficultyScl) + gen.random.range(1), 0, size - 1)); - } + }*/ TriFunction, Boolean> checker = (current, block, pred) -> { for(Point2 point : Edges.getEdges(block.size)){ @@ -181,11 +182,12 @@ public class FortressGenerator{ if(block instanceof PowerTurret){ tile.entity.power.satisfaction = 1.0f; - }else if(block instanceof ItemTurret){ + //todo implement + /*}else if(block instanceof ItemTurret){ ItemTurret turret = (ItemTurret)block; AmmoType[] type = turret.getAmmoTypes(); int index = ammoPerType.get(block.id, 0); - block.handleStack(type[index].item, block.acceptStack(type[index].item, 1000, tile, null), tile, null); + block.handleStack(type[index].item, block.acceptStack(type[index].item, 1000, tile, null), tile, null);*/ }else if(block instanceof NuclearReactor){ tile.entity.items.add(Items.thorium, 30); }else if(block instanceof LiquidTurret){ diff --git a/core/src/io/anuke/mindustry/type/AmmoEntry.java b/core/src/io/anuke/mindustry/type/AmmoEntry.java deleted file mode 100644 index f0ef1c0c6d..0000000000 --- a/core/src/io/anuke/mindustry/type/AmmoEntry.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.anuke.mindustry.type; - -/**Used to store ammo amounts in turrets. - * TODO move inside turret class?*/ -public class AmmoEntry{ - public AmmoType type; - public int amount; - - public AmmoEntry(AmmoType type, int amount){ - this.type = type; - this.amount = amount; - } -} diff --git a/core/src/io/anuke/mindustry/type/AmmoType.java b/core/src/io/anuke/mindustry/type/AmmoType.java deleted file mode 100644 index 24150b4b14..0000000000 --- a/core/src/io/anuke/mindustry/type/AmmoType.java +++ /dev/null @@ -1,75 +0,0 @@ -package io.anuke.mindustry.type; - -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.game.Content; -import io.anuke.arc.entities.Effects.Effect; - -public class AmmoType extends Content { - /**The item used. Always null if liquid isn't.*/ - public final Item item; - /**The liquid used. Always null if item isn't.*/ - public final Liquid liquid; - /**The resulting bullet. Never null.*/ - public final BulletType bullet; - /** - * For item ammo, this is amount given per ammo item. - * For liquid ammo, this is amount used per shot. - */ - public final float quantityMultiplier; - /**Reload speed multiplier.*/ - public float reloadMultiplier = 1f; - /**Bullet recoil strength.*/ - public float recoil = 0f; - /**Additional inaccuracy in degrees.*/ - public float inaccuracy; - /**Effect created when shooting.*/ - public Effect shootEffect = Fx.none; - /**Extra smoke effect created when shooting.*/ - public Effect smokeEffect = Fx.none; - /**Range. Use a value < 0 to calculate from bullet.*/ - public float range = -1f; - - /** - * Creates an AmmoType with no liquid or item. Used for power-based ammo. - */ - public AmmoType(BulletType result){ - this.item = null; - this.liquid = null; - this.bullet = result; - this.quantityMultiplier = 1f; - this.reloadMultiplier = 1f; - } - - /** - * Creates an AmmoType with an item. - */ - public AmmoType(Item item, BulletType result, float multiplier){ - this.item = item; - this.liquid = null; - this.bullet = result; - this.quantityMultiplier = multiplier; - } - - /** - * Creates an AmmoType with a liquid. - */ - public AmmoType(Liquid liquid, BulletType result, float multiplier){ - this.item = null; - this.liquid = liquid; - this.bullet = result; - this.quantityMultiplier = multiplier; - } - - /** - * Returns maximum distance the bullet this ammo type has can travel. - */ - public float getRange(){ - return range < 0 ? bullet.speed * bullet.lifetime : range; - } - - @Override - public ContentType getContentType(){ - return ContentType.ammo; - } -} diff --git a/core/src/io/anuke/mindustry/type/ContentType.java b/core/src/io/anuke/mindustry/type/ContentType.java index 80ae68252a..139f37836a 100644 --- a/core/src/io/anuke/mindustry/type/ContentType.java +++ b/core/src/io/anuke/mindustry/type/ContentType.java @@ -11,7 +11,6 @@ public enum ContentType { weapon, status, unit, - ammo, weather, effect } diff --git a/core/src/io/anuke/mindustry/type/Weapon.java b/core/src/io/anuke/mindustry/type/Weapon.java index 107946661f..00210b1e71 100644 --- a/core/src/io/anuke/mindustry/type/Weapon.java +++ b/core/src/io/anuke/mindustry/type/Weapon.java @@ -13,6 +13,7 @@ import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.bullet.Bullet; +import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.entities.traits.ShooterTrait; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.gen.Call; @@ -24,7 +25,7 @@ public class Weapon extends Content{ /**minimum cursor distance from player, fixes 'cross-eyed' shooting.*/ protected static float minPlayerDist = 20f; /**ammo type map. set with setAmmo()*/ - protected AmmoType ammo; + protected BulletType ammo; /**shell ejection effect*/ protected Effect ejectEffect = Fx.none; /**weapon reload in frames*/ @@ -47,7 +48,7 @@ public class Weapon extends Content{ protected float velocityRnd = 0f; /**whether to shoot the weapons in different arms one after another, rather than all at once*/ protected boolean roundrobin = false; - /**translator for vector calulations*/ + /**vector for vector calulations*/ protected Vector2 tr = new Vector2(); public TextureRegion equipRegion, region; @@ -81,7 +82,7 @@ public class Weapon extends Content{ Weapon weapon = shooter.getWeapon(); Angles.shotgun(weapon.shots, weapon.spacing, rotation, f -> weapon.bullet(shooter, x, y, f + Mathf.range(weapon.inaccuracy))); - AmmoType ammo = weapon.ammo; + BulletType ammo = weapon.ammo; weapon.tr.trns(rotation + 180f, ammo.recoil); @@ -109,7 +110,7 @@ public class Weapon extends Content{ return ContentType.weapon; } - public AmmoType getAmmo(){ + public BulletType getAmmo(){ return ammo; } @@ -165,7 +166,7 @@ public class Weapon extends Content{ if(owner == null) return; tr.trns(angle, 3f); - Bullet.create(ammo.bullet, + Bullet.create(ammo, owner, owner.getTeam(), x + tr.x, y + tr.y, angle, (1f - velocityRnd) + Mathf.random(velocityRnd)); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ArtilleryTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ArtilleryTurret.java index ba3002ea62..62b2770407 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ArtilleryTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ArtilleryTurret.java @@ -1,11 +1,11 @@ package io.anuke.mindustry.world.blocks.defense.turrets; +import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.entities.Predict; import io.anuke.mindustry.entities.bullet.Bullet; -import io.anuke.mindustry.type.AmmoType; +import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.world.Tile; -import io.anuke.arc.math.Mathf; import static io.anuke.mindustry.Vars.tilesize; @@ -21,23 +21,23 @@ public class ArtilleryTurret extends ItemTurret{ } @Override - protected void shoot(Tile tile, AmmoType ammo){ + protected void shoot(Tile tile, BulletType ammo){ TurretEntity entity = tile.entity(); entity.recoil = recoil; entity.heat = 1f; - AmmoType type = peekAmmo(tile); + BulletType type = peekAmmo(tile); tr.trns(entity.rotation, size * tilesize / 2); - Vector2 predict = Predict.intercept(tile, entity.target, type.bullet.speed); + Vector2 predict = Predict.intercept(tile, entity.target, type.speed); float dst = entity.dst(predict.x, predict.y); - float maxTraveled = type.bullet.lifetime * type.bullet.speed; + float maxTraveled = type.lifetime * type.speed; for(int i = 0; i < shots; i++){ - Bullet.create(ammo.bullet, tile.entity, tile.getTeam(), tile.drawx() + tr.x, tile.drawy() + tr.y, + Bullet.create(ammo, tile.entity, tile.getTeam(), tile.drawx() + tr.x, tile.drawy() + tr.y, entity.rotation + Mathf.range(inaccuracy + type.inaccuracy), 1f + Mathf.range(velocityInaccuracy), (dst / maxTraveled)); } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/BurstTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/BurstTurret.java index fdbe9686b5..dac9df8e98 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/BurstTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/BurstTurret.java @@ -1,9 +1,9 @@ package io.anuke.mindustry.world.blocks.defense.turrets; -import io.anuke.mindustry.type.AmmoType; -import io.anuke.mindustry.world.Tile; -import io.anuke.arc.util.Time; import io.anuke.arc.math.Mathf; +import io.anuke.arc.util.Time; +import io.anuke.mindustry.entities.bullet.BulletType; +import io.anuke.mindustry.world.Tile; import static io.anuke.mindustry.Vars.tilesize; @@ -15,7 +15,7 @@ public class BurstTurret extends ItemTurret{ } @Override - protected void shoot(Tile tile, AmmoType ammo){ + protected void shoot(Tile tile, BulletType ammo){ TurretEntity entity = tile.entity(); entity.heat = 1f; @@ -28,7 +28,7 @@ public class BurstTurret extends ItemTurret{ entity.recoil = recoil; tr.trns(entity.rotation, size * tilesize / 2, Mathf.range(xRand)); - bullet(tile, ammo.bullet, entity.rotation + Mathf.range(inaccuracy)); + bullet(tile, ammo, entity.rotation + Mathf.range(inaccuracy)); effects(tile); useAmmo(tile); }); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java index 3c5f66a7e5..51a22071b7 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java @@ -1,13 +1,13 @@ package io.anuke.mindustry.world.blocks.defense.turrets; -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.entities.TileEntity; -import io.anuke.mindustry.type.AmmoType; -import io.anuke.mindustry.world.Tile; import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.util.Time; import io.anuke.arc.math.Mathf; +import io.anuke.arc.util.Time; +import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.entities.TileEntity; +import io.anuke.mindustry.entities.bullet.BulletType; +import io.anuke.mindustry.world.Tile; import static io.anuke.mindustry.Vars.tilesize; @@ -24,7 +24,7 @@ public class ChargeTurret extends PowerTurret{ } @Override - public void shoot(Tile tile, AmmoType ammo){ + public void shoot(Tile tile, BulletType ammo){ LaserTurretEntity entity = tile.entity(); useAmmo(tile); @@ -47,7 +47,7 @@ public class ChargeTurret extends PowerTurret{ tr.trns(entity.rotation, size * tilesize / 2); entity.recoil = recoil; entity.heat = 1f; - bullet(tile, ammo.bullet, entity.rotation + Mathf.range(inaccuracy)); + bullet(tile, ammo, entity.rotation + Mathf.range(inaccuracy)); effects(tile); entity.shooting = false; }); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/DoubleTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/DoubleTurret.java index 1819857ad7..f8830aaefe 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/DoubleTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/DoubleTurret.java @@ -1,8 +1,8 @@ package io.anuke.mindustry.world.blocks.defense.turrets; -import io.anuke.mindustry.type.AmmoType; -import io.anuke.mindustry.world.Tile; import io.anuke.arc.math.Mathf; +import io.anuke.mindustry.entities.bullet.BulletType; +import io.anuke.mindustry.world.Tile; import static io.anuke.mindustry.Vars.tilesize; @@ -15,14 +15,14 @@ public class DoubleTurret extends ItemTurret{ } @Override - protected void shoot(Tile tile, AmmoType ammo){ + protected void shoot(Tile tile, BulletType ammo){ TurretEntity entity = tile.entity(); entity.shots++; int i = Mathf.signs[entity.shots % 2]; tr.trns(entity.rotation - 90, shotWidth * i, size * tilesize / 2); - bullet(tile, ammo.bullet, entity.rotation + Mathf.range(inaccuracy)); + bullet(tile, ammo, entity.rotation + Mathf.range(inaccuracy)); effects(tile); useAmmo(tile); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ItemTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ItemTurret.java index bef0283f4c..47fe135c5a 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ItemTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ItemTurret.java @@ -1,26 +1,30 @@ package io.anuke.mindustry.world.blocks.defense.turrets; import io.anuke.arc.collection.ObjectMap; +import io.anuke.mindustry.Vars; import io.anuke.mindustry.entities.Unit; -import io.anuke.mindustry.type.AmmoEntry; -import io.anuke.mindustry.type.AmmoType; +import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.values.ItemFilterValue; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class ItemTurret extends CooledTurret{ protected int maxAmmo = 50; - protected AmmoType[] ammoTypes; - protected ObjectMap ammoMap = new ObjectMap<>(); + protected ObjectMap ammo = new ObjectMap<>(); public ItemTurret(String name){ super(name); hasItems = true; } - public AmmoType[] getAmmoTypes(){ - return ammoTypes; + /**Initializes accepted ammo map. Format: [item1, bullet1, item2, bullet2...]*/ + protected void ammo(Object... objects){ + ammo = ObjectMap.of(objects); } @Override @@ -28,19 +32,18 @@ public class ItemTurret extends CooledTurret{ super.setStats(); stats.remove(BlockStat.itemCapacity); - - stats.add(BlockStat.inputItems, new ItemFilterValue(item -> ammoMap.containsKey(item))); + stats.add(BlockStat.inputItems, new ItemFilterValue(item -> ammo.containsKey(item))); } @Override public int acceptStack(Item item, int amount, Tile tile, Unit source){ TurretEntity entity = tile.entity(); - AmmoType type = ammoMap.get(item); + BulletType type = ammo.get(item); if(type == null) return 0; - return Math.min((int) ((maxAmmo - entity.totalAmmo) / ammoMap.get(item).quantityMultiplier), amount); + return Math.min((int) ((maxAmmo - entity.totalAmmo) / ammo.get(item).ammoMultiplier), amount); } @Override @@ -61,47 +64,67 @@ public class ItemTurret extends CooledTurret{ TurretEntity entity = tile.entity(); if(entity == null) return; - AmmoType type = ammoMap.get(item); - entity.totalAmmo += type.quantityMultiplier; + BulletType type = ammo.get(item); + entity.totalAmmo += type.ammoMultiplier; entity.items.add(item, 1); //find ammo entry by type for(int i = 0; i < entity.ammo.size; i++){ - AmmoEntry entry = entity.ammo.get(i); + ItemEntry entry = (ItemEntry)entity.ammo.get(i); //if found, put it to the right - if(entry.type == type){ - entry.amount += type.quantityMultiplier; + if(entry.item == item){ + entry.amount += type.ammoMultiplier; entity.ammo.swap(i, entity.ammo.size - 1); return; } } //must not be found - AmmoEntry entry = new AmmoEntry(type, (int) type.quantityMultiplier); - entity.ammo.add(entry); + entity.ammo.add(new ItemEntry(item, (int) type.ammoMultiplier)); } @Override public boolean acceptItem(Item item, Tile tile, Tile source){ TurretEntity entity = tile.entity(); - return ammoMap != null && ammoMap.get(item) != null && entity.totalAmmo + ammoMap.get(item).quantityMultiplier <= maxAmmo; + return ammo != null && ammo.get(item) != null && entity.totalAmmo + ammo.get(item).ammoMultiplier <= maxAmmo; } - @Override - public void init(){ - super.init(); + public class ItemTurretEntity extends TurretEntity{ + @Override + public void write(DataOutput stream) throws IOException{ + stream.writeByte(ammo.size); + for(AmmoEntry entry : ammo){ + ItemEntry i = (ItemEntry)entry; + stream.writeByte(i.item.id); + stream.writeShort(i.amount); + } + } - if(ammoTypes != null){ - for(AmmoType type : ammoTypes){ - if(type.item == null) continue; - if(ammoMap.containsKey(type.item)){ - throw new RuntimeException("Turret \"" + name + "\" has two conflicting ammo entries on item type " + type.item + "!"); - }else{ - ammoMap.put(type.item, type); - } + @Override + public void read(DataInput stream) throws IOException{ + byte amount = stream.readByte(); + for(int i = 0; i < amount; i++){ + Item item = Vars.content.item(stream.readByte()); + short a = stream.readShort(); + totalAmmo += a; + ammo.add(new ItemEntry(item, a)); } } } + + class ItemEntry extends AmmoEntry{ + protected Item item; + + ItemEntry(Item item, int amount){ + this.item = item; + this.amount = amount; + } + + @Override + public BulletType type(){ + return ammo.get(item); + } + } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java index 295208554c..ce6414f4ea 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java @@ -1,16 +1,15 @@ package io.anuke.mindustry.world.blocks.defense.turrets; +import io.anuke.arc.entities.Effects; +import io.anuke.arc.math.Angles; +import io.anuke.arc.math.Mathf; +import io.anuke.arc.util.Time; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.consumers.ConsumeLiquidFilter; -import io.anuke.arc.entities.Effects; -import io.anuke.arc.util.Time; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; import static io.anuke.mindustry.Vars.tilesize; @@ -55,7 +54,7 @@ public class LaserTurret extends PowerTurret{ } if(entity.reload >= reload && entity.cons.valid()){ - AmmoType type = peekAmmo(tile); + BulletType type = peekAmmo(tile); shoot(tile, type); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LiquidTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LiquidTurret.java index b96e0b9b0d..e368901395 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LiquidTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LiquidTurret.java @@ -1,32 +1,41 @@ package io.anuke.mindustry.world.blocks.defense.turrets; import io.anuke.arc.collection.ObjectMap; +import io.anuke.arc.entities.Effects; +import io.anuke.mindustry.Vars; +import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.entities.effect.Fire; -import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.values.LiquidFilterValue; -import io.anuke.arc.entities.Effects; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; import static io.anuke.mindustry.Vars.tilesize; import static io.anuke.mindustry.Vars.world; public abstract class LiquidTurret extends Turret{ - protected AmmoType[] ammoTypes; - protected ObjectMap liquidAmmoMap = new ObjectMap<>(); + protected ObjectMap ammo = new ObjectMap<>(); public LiquidTurret(String name){ super(name); hasLiquids = true; } + /**Initializes accepted ammo map. Format: [liquid1, bullet1, liquid2, bullet2...]*/ + protected void ammo(Object... objects){ + ammo = ObjectMap.of(objects); + } + @Override public void setStats(){ super.setStats(); - stats.add(BlockStat.inputLiquid, new LiquidFilterValue(item -> liquidAmmoMap.containsKey(item))); + stats.add(BlockStat.inputLiquid, new LiquidFilterValue(item -> ammo.containsKey(item))); } @Override @@ -58,12 +67,12 @@ public abstract class LiquidTurret extends Turret{ @Override protected void effects(Tile tile){ - AmmoType type = peekAmmo(tile); + BulletType type = peekAmmo(tile); TurretEntity entity = tile.entity(); - Effects.effect(type.shootEffect, type.liquid.color, tile.drawx() + tr.x, tile.drawy() + tr.y, entity.rotation); - Effects.effect(type.smokeEffect, type.liquid.color, tile.drawx() + tr.x, tile.drawy() + tr.y, entity.rotation); + Effects.effect(type.shootEffect, entity.liquids.current().color, tile.drawx() + tr.x, tile.drawy() + tr.y, entity.rotation); + Effects.effect(type.smokeEffect, entity.liquids.current().color, tile.drawx() + tr.x, tile.drawy() + tr.y, entity.rotation); if(shootShake > 0){ Effects.shake(shootShake, shootShake, tile.entity); @@ -73,36 +82,23 @@ public abstract class LiquidTurret extends Turret{ } @Override - public AmmoType useAmmo(Tile tile){ + public BulletType useAmmo(Tile tile){ TurretEntity entity = tile.entity(); - if(tile.isEnemyCheat()) return liquidAmmoMap.get(entity.liquids.current()); - AmmoType type = liquidAmmoMap.get(entity.liquids.current()); - entity.liquids.remove(type.liquid, type.quantityMultiplier); + if(tile.isEnemyCheat()) return ammo.get(entity.liquids.current()); + BulletType type = ammo.get(entity.liquids.current()); + entity.liquids.remove(entity.liquids.current(), type.ammoMultiplier); return type; } @Override - public AmmoType peekAmmo(Tile tile){ - return liquidAmmoMap.get(tile.entity.liquids.current()); + public BulletType peekAmmo(Tile tile){ + return ammo.get(tile.entity.liquids.current()); } @Override public boolean hasAmmo(Tile tile){ TurretEntity entity = tile.entity(); - return liquidAmmoMap.get(entity.liquids.current()) != null && entity.liquids.total() >= liquidAmmoMap.get(entity.liquids.current()).quantityMultiplier; - } - - @Override - public void init(){ - super.init(); - - for(AmmoType type : ammoTypes){ - if(liquidAmmoMap.containsKey(type.liquid)){ - throw new RuntimeException("Turret \"" + name + "\" has two conflicting ammo entries on liquid type " + type.liquid + "!"); - }else{ - liquidAmmoMap.put(type.liquid, type); - } - } + return ammo.get(entity.liquids.current()) != null && entity.liquids.total() >= ammo.get(entity.liquids.current()).ammoMultiplier; } @Override @@ -112,8 +108,45 @@ public abstract class LiquidTurret extends Turret{ @Override public boolean acceptLiquid(Tile tile, Tile source, Liquid liquid, float amount){ - return super.acceptLiquid(tile, source, liquid, amount) && liquidAmmoMap.get(liquid) != null - && (tile.entity.liquids.current() == liquid || (liquidAmmoMap.containsKey(tile.entity.liquids.current()) && tile.entity.liquids.get(tile.entity.liquids.current()) <= liquidAmmoMap.get(tile.entity.liquids.current()).quantityMultiplier + 0.001f)); + return super.acceptLiquid(tile, source, liquid, amount) && ammo.get(liquid) != null + && (tile.entity.liquids.current() == liquid || (ammo.containsKey(tile.entity.liquids.current()) && tile.entity.liquids.get(tile.entity.liquids.current()) <= ammo.get(tile.entity.liquids.current()).ammoMultiplier + 0.001f)); + } + + public class LiquidTurretEntity extends TurretEntity{ + @Override + public void write(DataOutput stream) throws IOException{ + stream.writeByte(ammo.size); + for(AmmoEntry entry : ammo){ + LiquidEntry i = (LiquidEntry)entry; + stream.writeByte(i.liquid.id); + stream.writeShort(i.amount); + } + } + + @Override + public void read(DataInput stream) throws IOException{ + byte amount = stream.readByte(); + for(int i = 0; i < amount; i++){ + Liquid liquid = Vars.content.liquid(stream.readByte()); + short a = stream.readShort(); + totalAmmo += a; + ammo.add(new LiquidEntry(liquid, a)); + } + } + } + + class LiquidEntry extends AmmoEntry{ + protected Liquid liquid; + + LiquidEntry(Liquid liquid, int amount){ + this.liquid = liquid; + this.amount = amount; + } + + @Override + public BulletType type(){ + return ammo.get(liquid); + } } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java index 3f8f6682fd..f702e0a5b3 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java @@ -1,6 +1,6 @@ package io.anuke.mindustry.world.blocks.defense.turrets; -import io.anuke.mindustry.type.AmmoType; +import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.StatUnit; @@ -8,7 +8,7 @@ import io.anuke.mindustry.world.meta.StatUnit; public abstract class PowerTurret extends CooledTurret{ /** The percentage of power which will be used per shot. */ protected float powerUsed = 0.5f; - protected AmmoType shootType; + protected BulletType shootType; public PowerTurret(String name){ super(name); @@ -29,7 +29,7 @@ public abstract class PowerTurret extends CooledTurret{ } @Override - public AmmoType useAmmo(Tile tile){ + public BulletType useAmmo(Tile tile){ if(tile.isEnemyCheat()) return shootType; // Make sure that power can not go negative in case of threading issues or similar tile.entity.power.satisfaction -= Math.min(powerUsed, tile.entity.power.satisfaction); @@ -37,7 +37,7 @@ public abstract class PowerTurret extends CooledTurret{ } @Override - public AmmoType peekAmmo(Tile tile){ + public BulletType peekAmmo(Tile tile){ return shootType; } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java index 656f48e3aa..080de1cc24 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java @@ -24,9 +24,6 @@ import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.entities.traits.TargetTrait; import io.anuke.mindustry.graphics.Layer; import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.type.AmmoEntry; -import io.anuke.mindustry.type.AmmoType; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.meta.BlockFlag; @@ -34,11 +31,6 @@ import io.anuke.mindustry.world.meta.BlockGroup; import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.StatUnit; -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import static io.anuke.mindustry.Vars.content; import static io.anuke.mindustry.Vars.tilesize; public abstract class Turret extends Block{ @@ -197,8 +189,8 @@ public abstract class Turret extends Block{ if(validateTarget(tile)){ - AmmoType type = peekAmmo(tile); - float speed = type.bullet.speed; + BulletType type = peekAmmo(tile); + float speed = type.speed; if(speed < 0.1f) speed = 9999999f; Vector2 result = Predict.intercept(entity, entity.target, speed); @@ -246,7 +238,7 @@ public abstract class Turret extends Block{ } /**Consume ammo and return a type.*/ - public AmmoType useAmmo(Tile tile){ + public BulletType useAmmo(Tile tile){ if(tile.isEnemyCheat()) return peekAmmo(tile); TurretEntity entity = tile.entity(); @@ -255,15 +247,15 @@ public abstract class Turret extends Block{ if(entry.amount == 0) entity.ammo.pop(); entity.totalAmmo -= ammoPerShot; Time.run(reload / 2f, () -> ejectEffects(tile)); - return entry.type; + return entry.type(); } /** * Get the ammo type that will be returned if useAmmo is called. */ - public AmmoType peekAmmo(Tile tile){ + public BulletType peekAmmo(Tile tile){ TurretEntity entity = tile.entity(); - return entity.ammo.peek().type; + return entity.ammo.peek().type(); } /** @@ -278,7 +270,7 @@ public abstract class Turret extends Block{ TurretEntity entity = tile.entity(); if(entity.reload >= reload){ - AmmoType type = peekAmmo(tile); + BulletType type = peekAmmo(tile); shoot(tile, type); @@ -288,18 +280,16 @@ public abstract class Turret extends Block{ } } - protected void shoot(Tile tile, AmmoType ammo){ + protected void shoot(Tile tile, BulletType type){ TurretEntity entity = tile.entity(); entity.recoil = recoil; entity.heat = 1f; - AmmoType type = peekAmmo(tile); - tr.trns(entity.rotation, size * tilesize / 2f, Mathf.range(xRand)); for(int i = 0; i < shots; i++){ - bullet(tile, ammo.bullet, entity.rotation + Mathf.range(inaccuracy + type.inaccuracy) + (i-shots/2) * spread); + bullet(tile, type, entity.rotation + Mathf.range(inaccuracy + type.inaccuracy) + (i-shots/2) * spread); } effects(tile); @@ -343,6 +333,12 @@ public abstract class Turret extends Block{ return new TurretEntity(); } + public static abstract class AmmoEntry{ + public int amount; + + public abstract BulletType type(); + } + public static class TurretEntity extends TileEntity{ public Array ammo = new Array<>(); public int totalAmmo; @@ -352,25 +348,5 @@ public abstract class Turret extends Block{ public float heat; public int shots; public TargetTrait target; - - @Override - public void write(DataOutput stream) throws IOException{ - stream.writeByte(ammo.size); - for(AmmoEntry entry : ammo){ - stream.writeByte(entry.type.id); - stream.writeShort(entry.amount); - } - } - - @Override - public void read(DataInput stream) throws IOException{ - byte amount = stream.readByte(); - for(int i = 0; i < amount; i++){ - AmmoType type = content.getByID(ContentType.ammo, stream.readByte()); - short ta = stream.readShort(); - ammo.add(new AmmoEntry(type, ta)); - totalAmmo += ta; - } - } } } From ff52fec663051ef833e042817ae86c33a0f30fbf Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jan 2019 16:53:04 -0500 Subject: [PATCH 3/6] Cleanup: all bullet definitions moved into one class --- .../io/anuke/mindustry/content/Bullets.java | 636 ++++++++++++++++++ .../io/anuke/mindustry/content/Weapons.java | 35 +- .../content/blocks/TurretBlocks.java | 76 +-- .../content/bullets/ArtilleryBullets.java | 107 --- .../mindustry/content/bullets/BulletList.java | 12 - .../content/bullets/FlakBullets.java | 51 -- .../content/bullets/MissileBullets.java | 124 ---- .../content/bullets/StandardBullets.java | 101 --- .../content/bullets/TurretBullets.java | 425 ------------ .../content/bullets/WeaponBullets.java | 99 --- .../anuke/mindustry/core/ContentLoader.java | 12 +- .../io/anuke/mindustry/entities/Damage.java | 4 +- .../entities/bullet/BasicBulletType.java | 8 + .../entities/bullet/LiquidBulletType.java | 2 + .../entities/bullet/MassDriverBolt.java | 109 +++ .../entities/bullet/MissileBulletType.java | 7 + .../anuke/mindustry/entities/effect/Fire.java | 4 +- .../mindustry/entities/effect/Lightning.java | 4 +- .../mindustry/entities/effect/Puddle.java | 4 +- .../blocks/defense/turrets/PowerTurret.java | 1 + .../world/blocks/distribution/MassDriver.java | 5 +- 21 files changed, 831 insertions(+), 995 deletions(-) delete mode 100644 core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java delete mode 100644 core/src/io/anuke/mindustry/content/bullets/BulletList.java delete mode 100644 core/src/io/anuke/mindustry/content/bullets/FlakBullets.java delete mode 100644 core/src/io/anuke/mindustry/content/bullets/MissileBullets.java delete mode 100644 core/src/io/anuke/mindustry/content/bullets/StandardBullets.java delete mode 100644 core/src/io/anuke/mindustry/content/bullets/TurretBullets.java delete mode 100644 core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java create mode 100644 core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java diff --git a/core/src/io/anuke/mindustry/content/Bullets.java b/core/src/io/anuke/mindustry/content/Bullets.java index 6e5137a433..8900001cb6 100644 --- a/core/src/io/anuke/mindustry/content/Bullets.java +++ b/core/src/io/anuke/mindustry/content/Bullets.java @@ -1,13 +1,649 @@ package io.anuke.mindustry.content; +import io.anuke.arc.entities.Effects; +import io.anuke.arc.graphics.Color; +import io.anuke.arc.graphics.g2d.CapStyle; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.graphics.g2d.Fill; +import io.anuke.arc.graphics.g2d.Lines; +import io.anuke.arc.math.Mathf; +import io.anuke.arc.util.Time; +import io.anuke.arc.util.Tmp; +import io.anuke.mindustry.content.fx.*; +import io.anuke.mindustry.entities.Damage; +import io.anuke.mindustry.entities.bullet.*; +import io.anuke.mindustry.entities.effect.Fire; +import io.anuke.mindustry.entities.effect.Lightning; +import io.anuke.mindustry.entities.effect.Puddle; import io.anuke.mindustry.game.ContentList; +import io.anuke.mindustry.graphics.Palette; +import io.anuke.mindustry.graphics.Shapes; import io.anuke.mindustry.type.ContentType; +import io.anuke.mindustry.world.Tile; +import io.anuke.mindustry.world.blocks.BuildBlock; + +import static io.anuke.mindustry.Vars.world; public class Bullets implements ContentList{ + public static BulletType + + //artillery + artilleryDense, arilleryPlastic, artilleryPlasticFrag, artilleryHoming, artlleryIncendiary, artilleryExplosive, artilleryUnit, + + //flak + flakPlastic, flakExplosive, flakSurge, + + //missiles + missileExplosive, missileIncendiary, missileSurge, missileJavelin, missileSwarm, + + //standard + standardCopper, standardDense, standardThorium, standardHoming, standardIncendiary, standardMechSmall, + standardGlaive, standardDenseBig, standardThoriumBig, standardIncendiaryBig, + + //electric + lancerLaser, burstLaser, meltdownLaser, lightning, arc, damageLightning, + + //liquid + waterShot, cryoShot, lavaShot, oilShot, + + //environment, misc. + fireball, basicFlame, fuseShot, driverBolt, healBullet, frag, + + //bombs + bombExplosive, bombIncendiary, bombOil; @Override public void load(){ + artilleryDense = new ArtilleryBulletType(3f, 0, "shell"){{ + hitEffect = BulletFx.flakExplosion; + knockback = 0.8f; + lifetime = 50f; + bulletWidth = bulletHeight = 11f; + collidesTiles = false; + splashDamageRadius = 25f; + splashDamage = 33f; + }}; + + artilleryPlasticFrag = new BasicBulletType(2.5f, 6, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 12f; + bulletShrink = 1f; + lifetime = 15f; + backColor = Palette.plastaniumBack; + frontColor = Palette.plastaniumFront; + despawnEffect = Fx.none; + }}; + + arilleryPlastic = new ArtilleryBulletType(3.3f, 0, "shell"){{ + hitEffect = BulletFx.plasticExplosion; + knockback = 1f; + lifetime = 55f; + bulletWidth = bulletHeight = 13f; + collidesTiles = false; + splashDamageRadius = 35f; + splashDamage = 35f; + fragBullet = artilleryPlasticFrag; + fragBullets = 9; + backColor = Palette.plastaniumBack; + frontColor = Palette.plastaniumFront; + }}; + + artilleryHoming = new ArtilleryBulletType(3f, 0, "shell"){{ + hitEffect = BulletFx.flakExplosion; + knockback = 0.8f; + lifetime = 45f; + bulletWidth = bulletHeight = 11f; + collidesTiles = false; + splashDamageRadius = 25f; + splashDamage = 33f; + homingPower = 2f; + homingRange = 50f; + }}; + + artlleryIncendiary = new ArtilleryBulletType(3f, 0, "shell"){{ + hitEffect = BulletFx.blastExplosion; + knockback = 0.8f; + lifetime = 60f; + bulletWidth = bulletHeight = 13f; + collidesTiles = false; + splashDamageRadius = 25f; + splashDamage = 30f; + incendAmount = 4; + incendSpread = 11f; + frontColor = Palette.lightishOrange; + backColor = Palette.lightOrange; + trailEffect = BulletFx.incendTrail; + }}; + + artilleryExplosive = new ArtilleryBulletType(2f, 0, "shell"){{ + hitEffect = BulletFx.blastExplosion; + knockback = 0.8f; + lifetime = 70f; + bulletWidth = bulletHeight = 14f; + collidesTiles = false; + splashDamageRadius = 45f; + splashDamage = 50f; + backColor = Palette.missileYellowBack; + frontColor = Palette.missileYellow; + }}; + + artilleryUnit = new ArtilleryBulletType(2f, 0, "shell"){{ + hitEffect = BulletFx.blastExplosion; + knockback = 0.8f; + lifetime = 90f; + bulletWidth = bulletHeight = 14f; + collides = true; + collidesTiles = true; + splashDamageRadius = 45f; + splashDamage = 50f; + backColor = Palette.bulletYellowBack; + frontColor = Palette.bulletYellow; + }}; + + flakPlastic = new FlakBulletType(4f, 5){{ + splashDamageRadius = 40f; + fragBullet = artilleryPlasticFrag; + fragBullets = 4; + hitEffect = BulletFx.plasticExplosion; + frontColor = Palette.plastaniumFront; + backColor = Palette.plastaniumBack; + }}; + + flakExplosive = new FlakBulletType(4f, 5){{ + //default bullet type, no changes + }}; + + flakSurge = new FlakBulletType(4f, 7){{ + splashDamage = 33f; + lightining = 2; + lightningLength = 12; + }}; + + missileExplosive = new MissileBulletType(1.8f, 10, "missile"){{ + bulletWidth = 8f; + bulletHeight = 8f; + bulletShrink = 0f; + drag = -0.01f; + splashDamageRadius = 30f; + splashDamage = 30f; + lifetime = 150f; + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; + }}; + + missileIncendiary = new MissileBulletType(2f, 12, "missile"){{ + frontColor = Palette.lightishOrange; + backColor = Palette.lightOrange; + bulletWidth = 7f; + bulletHeight = 8f; + bulletShrink = 0f; + drag = -0.01f; + homingPower = 7f; + splashDamageRadius = 10f; + splashDamage = 10f; + lifetime = 160f; + hitEffect = BulletFx.blastExplosion; + incendSpread = 10f; + incendAmount = 3; + }}; + + missileSurge = new MissileBulletType(3.5f, 15, "bullet"){{ + bulletWidth = 8f; + bulletHeight = 8f; + bulletShrink = 0f; + drag = -0.01f; + splashDamageRadius = 30f; + splashDamage = 22f; + lifetime = 150f; + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; + lightining = 2; + lightningLength = 14; + }}; + + missileJavelin = new MissileBulletType(5f, 10.5f, "missile"){{ + bulletWidth = 8f; + bulletHeight = 8f; + bulletShrink = 0f; + drag = -0.003f; + keepVelocity = false; + splashDamageRadius = 20f; + splashDamage = 1f; + lifetime = 90f; + trailColor = Color.valueOf("b6c6fd"); + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; + backColor = Palette.bulletYellowBack; + frontColor = Palette.bulletYellow; + weaveScale = 8f; + weaveMag = 2f; + }}; + + missileSwarm = new MissileBulletType(2.7f, 12, "missile"){{ + bulletWidth = 8f; + bulletHeight = 8f; + bulletShrink = 0f; + drag = -0.003f; + homingRange = 60f; + keepVelocity = false; + splashDamageRadius = 25f; + splashDamage = 10f; + lifetime = 120f; + trailColor = Color.GRAY; + backColor = Palette.bulletYellowBack; + frontColor = Palette.bulletYellow; + hitEffect = BulletFx.blastExplosion; + despawnEffect = BulletFx.blastExplosion; + weaveScale = 8f; + weaveMag = 2f; + }}; + + standardCopper = new BasicBulletType(2.5f, 7, "bullet"){{ + bulletWidth = 7f; + bulletHeight = 9f; + shootEffect = ShootFx.shootSmall; + smokeEffect = ShootFx.shootSmallSmoke; + ammoMultiplier = 5; + }}; + + standardDense = new BasicBulletType(3.5f, 18, "bullet"){{ + bulletWidth = 9f; + bulletHeight = 12f; + armorPierce = 0.2f; + reloadMultiplier = 0.6f; + ammoMultiplier = 2; + }}; + + standardThorium = new BasicBulletType(4f, 29, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 13f; + armorPierce = 0.5f; + shootEffect = ShootFx.shootBig; + smokeEffect = ShootFx.shootBigSmoke; + ammoMultiplier = 2; + }}; + + standardHoming = new BasicBulletType(3f, 9, "bullet"){{ + bulletWidth = 7f; + bulletHeight = 9f; + homingPower = 5f; + reloadMultiplier = 1.4f; + ammoMultiplier = 5; + }}; + + standardIncendiary = new BasicBulletType(3.2f, 11, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 12f; + frontColor = Palette.lightishOrange; + backColor = Palette.lightOrange; + incendSpread = 3f; + incendAmount = 1; + incendChance = 0.3f; + inaccuracy = 3f; + }}; + + standardGlaive = new BasicBulletType(4f, 7.5f, "bullet"){{ + bulletWidth = 10f; + bulletHeight = 12f; + frontColor = Color.valueOf("feb380"); + backColor = Color.valueOf("ea8878"); + incendSpread = 3f; + incendAmount = 1; + incendChance = 0.3f; + }}; + + standardMechSmall = new BasicBulletType(4f, 9, "bullet"){{ + bulletWidth = 11f; + bulletHeight = 14f; + lifetime = 40f; + inaccuracy = 5f; + despawnEffect = BulletFx.hitBulletSmall; + }}; + + standardDenseBig = new BasicBulletType(7f, 42, "bullet"){{ + bulletWidth = 15f; + bulletHeight = 21f; + armorPierce = 0.2f; + }}; + + standardThoriumBig = new BasicBulletType(8f, 65, "bullet"){{ + bulletWidth = 16f; + bulletHeight = 23f; + armorPierce = 0.5f; + }}; + + standardIncendiaryBig = new BasicBulletType(7f, 38, "bullet"){{ + bulletWidth = 16f; + bulletHeight = 21f; + frontColor = Palette.lightishOrange; + backColor = Palette.lightOrange; + incendSpread = 3f; + incendAmount = 2; + incendChance = 0.3f; + }}; + + damageLightning = new BulletType(0.0001f, 0f){ + { + lifetime = Lightning.lifetime; + hitEffect = BulletFx.hitLancer; + despawnEffect = Fx.none; + status = StatusEffects.shocked; + statusIntensity = 1f; + } + }; + + healBullet = new BulletType(5.2f, 13){ + float healPercent = 3f; + + { + hitEffect = BulletFx.hitLaser; + despawnEffect = BulletFx.hitLaser; + collidesTeam = true; + } + + @Override + public boolean collides(Bullet b, Tile tile){ + return tile.getTeam() != b.getTeam() || tile.entity.healthf() < 1f; + } + + @Override + public void draw(Bullet b){ + Draw.color(Palette.heal); + Lines.stroke(2f); + Lines.lineAngleCenter(b.x, b.y, b.rot(), 7f); + Draw.color(Color.WHITE); + Lines.lineAngleCenter(b.x, b.y, b.rot(), 3f); + Draw.reset(); + } + + @Override + public void hitTile(Bullet b, Tile tile){ + super.hit(b); + tile = tile.target(); + + if(tile != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){ + Effects.effect(BlockFx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size); + tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth()); + } + } + }; + + fireball = new BulletType(1f, 4){ + { + pierce = true; + hitTiles = false; + collides = false; + collidesTiles = false; + drag = 0.03f; + hitEffect = despawnEffect = Fx.none; + } + + @Override + public void init(Bullet b){ + b.velocity().setLength(0.6f + Mathf.random(2f)); + } + + @Override + public void draw(Bullet b){ + //TODO add color to the bullet depending on the color of the flame it came from + Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, b.fin()); + Fill.circle(b.x, b.y, 3f * b.fout()); + Draw.reset(); + } + + @Override + public void update(Bullet b){ + if(Mathf.chance(0.04 * Time.delta())){ + Tile tile = world.tileWorld(b.x, b.y); + if(tile != null){ + Fire.create(tile); + } + } + + if(Mathf.chance(0.1 * Time.delta())){ + Effects.effect(EnvironmentFx.fireballsmoke, b.x, b.y); + } + + if(Mathf.chance(0.1 * Time.delta())){ + Effects.effect(EnvironmentFx.ballfire, b.x, b.y); + } + } + }; + + basicFlame = new BulletType(2.3f, 5){ + { + hitSize = 7f; + lifetime = 35f; + pierce = true; + drag = 0.05f; + hitEffect = BulletFx.hitFlameSmall; + despawnEffect = Fx.none; + status = StatusEffects.burning; + } + + @Override + public void draw(Bullet b){ + } + }; + + lancerLaser = new BulletType(0.001f, 140){ + Color[] colors = {Palette.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Palette.lancerLaser, Color.WHITE}; + float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; + float[] lenscales = {1f, 1.1f, 1.13f, 1.14f}; + float length = 100f; + + { + hitEffect = BulletFx.hitLancer; + despawnEffect = Fx.none; + hitSize = 4; + lifetime = 16f; + pierce = true; + } + + @Override + public void init(Bullet b){ + Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), length); + } + + @Override + public void draw(Bullet b){ + float f = Mathf.curve(b.fin(), 0f, 0.2f); + float baseLen = length * f; + + Lines.lineAngle(b.x, b.y, b.rot(), baseLen); + for(int s = 0; s < 3; s++){ + Draw.color(colors[s]); + for(int i = 0; i < tscales.length; i++){ + Lines.stroke(7f * b.fout() * (s == 0 ? 1.5f : s == 1 ? 1f : 0.3f) * tscales[i]); + Lines.lineAngle(b.x, b.y, b.rot(), baseLen * lenscales[i]); + } + } + Draw.reset(); + } + }; + + meltdownLaser = new BulletType(0.001f, 26){ + Color tmpColor = new Color(); + Color[] colors = {Color.valueOf("ec745855"), Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.WHITE}; + float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; + float[] strokes = {2f, 1.5f, 1f, 0.3f}; + float[] lenscales = {1f, 1.12f, 1.15f, 1.17f}; + float length = 200f; + + { + hitEffect = BulletFx.hitMeltdown; + despawnEffect = Fx.none; + hitSize = 4; + drawSize = 420f; + lifetime = 16f; + pierce = true; + } + + @Override + public void update(Bullet b){ + if(b.timer.get(1, 5f)){ + Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), length); + } + Effects.shake(1f, 1f, b.x, b.y); + } + + @Override + public void hit(Bullet b, float hitx, float hity){ + Effects.effect(hitEffect, colors[2], hitx, hity); + if(Mathf.chance(0.4)){ + Fire.create(world.tileWorld(hitx+Mathf.range(5f), hity+Mathf.range(5f))); + } + } + + @Override + public void draw(Bullet b){ + float baseLen = (length) * b.fout(); + + Lines.lineAngle(b.x, b.y, b.rot(), baseLen); + for(int s = 0; s < colors.length; s++){ + Draw.color(tmpColor.set(colors[s]).mul(1f + Mathf.absin(Time.time(), 1f, 0.1f))); + for(int i = 0; i < tscales.length; i++){ + Tmp.v1.trns(b.rot() + 180f, (lenscales[i] - 1f) * 35f); + Lines.stroke((9f + Mathf.absin(Time.time(), 0.8f, 1.5f)) * b.fout() * strokes[s] * tscales[i]); + Lines.lineAngle(b.x + Tmp.v1.x, b.y + Tmp.v1.y, b.rot(), baseLen * lenscales[i], CapStyle.none); + } + } + Draw.reset(); + } + }; + + fuseShot = new BulletType(0.01f, 70){ + int rays = 3; + float raySpace = 2f; + float rayLength = 80f; + { + hitEffect = BulletFx.hitFuse; + lifetime = 13f; + despawnEffect = Fx.none; + pierce = true; + } + + @Override + public void init(Bullet b) { + for (int i = 0; i < rays; i++) { + Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays/2))*20f); + } + } + + @Override + public void draw(Bullet b) { + super.draw(b); + Draw.color(Color.WHITE, Palette.surge, b.fin()); + for(int i = 0; i < 7; i++){ + Tmp.v1.trns(b.rot(), i * 8f); + float sl = Mathf.clamp(b.fout()-0.5f) * (80f - i *10); + Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() + 90); + Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() - 90); + } + Shapes.tri(b.x, b.y, 13f, (rayLength+50) * b.fout(), b.rot()); + Shapes.tri(b.x, b.y, 13f, 10f * b.fout(), b.rot() + 180f); + Draw.reset(); + } + }; + + waterShot = new LiquidBulletType(Liquids.water){{ + knockback = 0.65f; + }}; + + cryoShot = new LiquidBulletType(Liquids.cryofluid){{ + + }}; + + lavaShot = new LiquidBulletType(Liquids.lava){{ + damage = 4; + speed = 1.9f; + drag = 0.03f; + }}; + + oilShot = new LiquidBulletType(Liquids.oil){{ + speed = 2f; + drag = 0.03f; + }}; + + lightning = new BulletType(0.001f, 12f){ + { + lifetime = 1f; + despawnEffect = Fx.none; + hitEffect = BulletFx.hitLancer; + keepVelocity = false; + } + + @Override + public void draw(Bullet b){ + } + + @Override + public void init(Bullet b){ + Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.rot(), 30); + } + }; + + arc = new BulletType(0.001f, 26){{ + lifetime = 1; + despawnEffect = Fx.none; + hitEffect = BulletFx.hitLancer; + } + + @Override + public void draw(Bullet b){} + + @Override + public void init(Bullet b){ + Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.rot(), 36); + } + }; + + driverBolt = new MassDriverBolt(); + + frag = new BasicBulletType(5f, 8, "bullet"){{ + bulletWidth = 8f; + bulletHeight = 9f; + bulletShrink = 0.5f; + lifetime = 50f; + drag = 0.04f; + }}; + + bombExplosive = new BombBulletType(10f, 20f, "shell"){{ + bulletWidth = 9f; + bulletHeight = 13f; + hitEffect = BulletFx.flakExplosion; + }}; + + bombIncendiary = new BombBulletType(7f, 10f, "shell"){{ + bulletWidth = 8f; + bulletHeight = 12f; + hitEffect = BulletFx.flakExplosion; + backColor = Palette.lightOrange; + frontColor = Palette.lightishOrange; + incendChance = 1f; + incendAmount = 3; + incendSpread = 10f; + }}; + + bombOil = new BombBulletType(2f, 3f, "shell"){{ + bulletWidth = 8f; + bulletHeight = 12f; + hitEffect = BlockFx.pulverize; + backColor = new Color(0x4f4f4fff); + frontColor = Color.GRAY; + } + + @Override + public void hit(Bullet b, float x, float y){ + super.hit(b, x, y); + + for(int i = 0; i < 3; i++){ + Tile tile = world.tileWorld(x + Mathf.range(8f), y + Mathf.range(8f)); + Puddle.deposit(tile, Liquids.oil, 5f); + } + } + }; } @Override diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index f979f23cb6..20fa1f5804 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -1,6 +1,5 @@ package io.anuke.mindustry.content; -import io.anuke.mindustry.content.bullets.*; import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.ContentList; @@ -19,7 +18,7 @@ public class Weapons implements ContentList{ reload = 14f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = StandardBullets.mechSmall; + ammo = Bullets.standardMechSmall; }}; blasterSmall = new Weapon("blaster"){{ @@ -27,7 +26,7 @@ public class Weapons implements ContentList{ reload = 15f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = StandardBullets.copper; + ammo = Bullets.standardCopper; }}; glaiveBlaster = new Weapon("bomber"){{ @@ -35,7 +34,7 @@ public class Weapons implements ContentList{ reload = 10f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = StandardBullets.glaive; + ammo = Bullets.standardGlaive; }}; droneBlaster = new Weapon("blaster"){{ @@ -44,7 +43,7 @@ public class Weapons implements ContentList{ width = 1f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = StandardBullets.copper; + ammo = Bullets.standardCopper; }}; healBlaster = new Weapon("heal-blaster"){{ @@ -53,7 +52,7 @@ public class Weapons implements ContentList{ roundrobin = false; ejectEffect = Fx.none; recoil = 2f; - ammo = TurretBullets.healBullet; + ammo = Bullets.healBullet; }}; missiles = new Weapon("missiles"){{ @@ -65,7 +64,7 @@ public class Weapons implements ContentList{ ejectEffect = Fx.none; velocityRnd = 0.2f; spacing = 1f; - ammo = MissileBullets.javelin; + ammo = Bullets.missileJavelin; }}; swarmer = new Weapon("swarmer"){{ @@ -78,7 +77,7 @@ public class Weapons implements ContentList{ roundrobin = true; ejectEffect = Fx.none; shake = 3f; - ammo = MissileBullets.swarm; + ammo = Bullets.missileSwarm; }}; chainBlaster = new Weapon("chain-blaster"){{ @@ -86,7 +85,7 @@ public class Weapons implements ContentList{ reload = 28f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = StandardBullets.copper; + ammo = Bullets.standardCopper; }}; shockgun = new Weapon("shockgun"){{ @@ -97,7 +96,7 @@ public class Weapons implements ContentList{ inaccuracy = 0f; velocityRnd = 0.2f; ejectEffect = Fx.none; - ammo = TurretBullets.lightning; + ammo = Bullets.lightning; }}; flakgun = new Weapon("flakgun"){{ @@ -109,7 +108,7 @@ public class Weapons implements ContentList{ recoil = 3f; velocityRnd = 0.1f; ejectEffect = ShootFx.shellEjectMedium; - ammo = ArtilleryBullets.dense; + ammo = Bullets.artilleryDense; }}; flamethrower = new Weapon("flamethrower"){{ @@ -118,7 +117,7 @@ public class Weapons implements ContentList{ roundrobin = true; recoil = 1f; ejectEffect = Fx.none; - ammo = TurretBullets.basicFlame; + ammo = Bullets.basicFlame; }}; artillery = new Weapon("artillery"){{ @@ -128,7 +127,7 @@ public class Weapons implements ContentList{ recoil = 5f; shake = 2f; ejectEffect = ShootFx.shellEjectMedium; - ammo = ArtilleryBullets.unit; + ammo = Bullets.artilleryUnit; }}; bomber = new Weapon("bomber"){{ @@ -139,7 +138,7 @@ public class Weapons implements ContentList{ ejectEffect = Fx.none; velocityRnd = 1f; inaccuracy = 40f; - ammo = WeaponBullets.bombExplosive; + ammo = Bullets.bombExplosive; }}; bomberTrident = new Weapon("bomber"){{ @@ -151,7 +150,7 @@ public class Weapons implements ContentList{ ejectEffect = Fx.none; velocityRnd = 1f; inaccuracy = 40f; - ammo = WeaponBullets.bombExplosive; + ammo = Bullets.bombExplosive; }}; laserBurster = new Weapon("bomber"){{ @@ -160,7 +159,7 @@ public class Weapons implements ContentList{ width = 0f; roundrobin = true; ejectEffect = Fx.none; - ammo = TurretBullets.lancerLaser; + ammo = Bullets.lancerLaser; }}; healBlasterDrone = new Weapon("heal-blaster"){{ @@ -170,7 +169,7 @@ public class Weapons implements ContentList{ roundrobin = true; ejectEffect = Fx.none; recoil = 2f; - ammo = TurretBullets.healBullet; + ammo = Bullets.healBullet; }}; healBlasterDrone2 = new Weapon("heal-blaster"){{ @@ -180,7 +179,7 @@ public class Weapons implements ContentList{ roundrobin = true; ejectEffect = Fx.none; recoil = 2f; - ammo = TurretBullets.healBullet; + ammo = Bullets.healBullet; }}; } diff --git a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java index 813f7624b0..f1a7ac794b 100644 --- a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java @@ -2,26 +2,26 @@ package io.anuke.mindustry.content.blocks; import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.bullets.*; import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.defense.turrets.*; public class TurretBlocks extends BlockList implements ContentList{ - public static Block duo, /*scatter,*/ - scorch, hail, wave, lancer, arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown; + public static Block duo, scorch, hail, wave, lancer, arc, swarmer, salvo, + fuse, ripple, cyclone, spectre, meltdown; @Override public void load(){ duo = new DoubleTurret("duo"){{ ammo( - Items.copper, StandardBullets.copper, - Items.densealloy, StandardBullets.dense, - Items.pyratite, StandardBullets.tracer, - Items.silicon, StandardBullets.homing + Items.copper, Bullets.standardCopper, + Items.densealloy, Bullets.standardDense, + Items.pyratite, Bullets.standardIncendiary, + Items.silicon, Bullets.standardHoming ); reload = 25f; restitution = 0.03f; @@ -35,9 +35,9 @@ public class TurretBlocks extends BlockList implements ContentList{ hail = new ArtilleryTurret("hail"){{ ammo( - Items.densealloy, ArtilleryBullets.dense, - Items.silicon, ArtilleryBullets.homing, - Items.pyratite, ArtilleryBullets.incendiary + Items.densealloy, Bullets.artilleryDense, + Items.silicon, Bullets.artilleryHoming, + Items.pyratite, Bullets.artlleryIncendiary ); reload = 60f; recoil = 2f; @@ -48,7 +48,7 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; scorch = new LiquidTurret("scorch"){{ - ammo(Liquids.oil, TurretBullets.basicFlame); + ammo(Liquids.oil, Bullets.basicFlame); recoil = 0f; reload = 4f; shootCone = 50f; @@ -58,10 +58,10 @@ public class TurretBlocks extends BlockList implements ContentList{ wave = new LiquidTurret("wave"){{ ammo( - Liquids.water, TurretBullets.waterShot, - Liquids.lava, TurretBullets.lavaShot, - Liquids.cryofluid, TurretBullets.cryoShot, - Liquids.oil, TurretBullets.oilShot + Liquids.water, Bullets.waterShot, + Liquids.lava, Bullets.lavaShot, + Liquids.cryofluid, Bullets.cryoShot, + Liquids.oil, Bullets.oilShot ); size = 2; recoil = 0f; @@ -87,7 +87,7 @@ public class TurretBlocks extends BlockList implements ContentList{ chargeTime = 60f; chargeMaxDelay = 30f; chargeEffects = 7; - shootType = TurretBullets.lancerLaser; + shootType = Bullets.lancerLaser; recoil = 2f; reload = 100f; cooldown = 0.03f; @@ -105,7 +105,7 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; arc = new PowerTurret("arc"){{ - shootType = TurretBullets.arc; + shootType = Bullets.arc; reload = 85f; shootShake = 1f; shootCone = 40f; @@ -121,9 +121,9 @@ public class TurretBlocks extends BlockList implements ContentList{ swarmer = new BurstTurret("swarmer"){{ ammo( - Items.blastCompound, MissileBullets.explosive, - Items.pyratite, MissileBullets.incindiary, - Items.surgealloy, MissileBullets.surge + Items.blastCompound, Bullets.missileExplosive, + Items.pyratite, Bullets.missileIncendiary, + Items.surgealloy, Bullets.missileSurge ); reload = 50f; shots = 4; @@ -137,11 +137,11 @@ public class TurretBlocks extends BlockList implements ContentList{ salvo = new BurstTurret("salvo"){{ ammo( - Items.copper, StandardBullets.copper, - Items.densealloy, StandardBullets.dense, - Items.pyratite, StandardBullets.tracer, - Items.silicon, StandardBullets.homing, - Items.thorium, StandardBullets.thorium + Items.copper, Bullets.standardCopper, + Items.densealloy, Bullets.standardDense, + Items.pyratite, Bullets.standardIncendiary, + Items.silicon, Bullets.standardHoming, + Items.thorium, Bullets.standardThorium ); size = 2; @@ -160,11 +160,11 @@ public class TurretBlocks extends BlockList implements ContentList{ ripple = new ArtilleryTurret("ripple"){{ ammo( - Items.densealloy, ArtilleryBullets.dense, - Items.silicon, ArtilleryBullets.homing, - Items.pyratite, ArtilleryBullets.incendiary, - Items.blastCompound, ArtilleryBullets.explosive, - Items.plastanium, ArtilleryBullets.plastic + Items.densealloy, Bullets.artilleryDense, + Items.silicon, Bullets.artilleryHoming, + Items.pyratite, Bullets.artlleryIncendiary, + Items.blastCompound, Bullets.artilleryExplosive, + Items.plastanium, Bullets.arilleryPlastic ); size = 3; shots = 4; @@ -184,9 +184,9 @@ public class TurretBlocks extends BlockList implements ContentList{ cyclone = new ItemTurret("cyclone"){{ ammo( - Items.blastCompound, FlakBullets.explosive, - Items.plastanium, FlakBullets.plastic, - Items.surgealloy, FlakBullets.surge + Items.blastCompound, Bullets.flakExplosive, + Items.plastanium, Bullets.flakPlastic, + Items.surgealloy, Bullets.flakSurge ); xRand = 4f; reload = 8f; @@ -201,7 +201,7 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; fuse = new ItemTurret("fuse"){{ - ammo(Items.densealloy, TurretBullets.fuseShot); + ammo(Items.densealloy, Bullets.fuseShot); reload = 50f; shootShake = 4f; range = 80f; @@ -214,9 +214,9 @@ public class TurretBlocks extends BlockList implements ContentList{ spectre = new DoubleTurret("spectre"){{ ammo( - Items.densealloy, StandardBullets.denseBig, - Items.pyratite, StandardBullets.tracerBig, - Items.thorium, StandardBullets.thoriumBig + Items.densealloy, Bullets.standardDenseBig, + Items.pyratite, Bullets.standardIncendiaryBig, + Items.thorium, Bullets.standardThoriumBig ); reload = 6f; coolantMultiplier = 0.5f; @@ -237,7 +237,7 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; meltdown = new LaserTurret("meltdown"){{ - shootType = TurretBullets.meltdownLaser; + shootType = Bullets.meltdownLaser; shootEffect = ShootFx.shootBigSmoke2; shootCone = 40f; recoil = 4f; diff --git a/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java b/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java deleted file mode 100644 index 25169fca0f..0000000000 --- a/core/src/io/anuke/mindustry/content/bullets/ArtilleryBullets.java +++ /dev/null @@ -1,107 +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.ArtilleryBulletType; -import io.anuke.mindustry.entities.bullet.BasicBulletType; -import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; - -public class ArtilleryBullets extends BulletList implements ContentList{ - public static BulletType dense, plastic, plasticFrag, homing, incendiary, explosive, surge, unit; - - @Override - public void load(){ - - dense = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.flakExplosion; - knockback = 0.8f; - lifetime = 50f; - bulletWidth = bulletHeight = 11f; - collidesTiles = false; - splashDamageRadius = 25f; - splashDamage = 33f; - }}; - - plasticFrag = new BasicBulletType(2.5f, 6, "bullet"){{ - bulletWidth = 10f; - bulletHeight = 12f; - bulletShrink = 1f; - lifetime = 15f; - backColor = Palette.plastaniumBack; - frontColor = Palette.plastaniumFront; - despawnEffect = Fx.none; - }}; - - plastic = new ArtilleryBulletType(3.3f, 0, "shell"){{ - hitEffect = BulletFx.plasticExplosion; - knockback = 1f; - lifetime = 55f; - bulletWidth = bulletHeight = 13f; - collidesTiles = false; - splashDamageRadius = 35f; - splashDamage = 35f; - fragBullet = plasticFrag; - fragBullets = 9; - backColor = Palette.plastaniumBack; - frontColor = Palette.plastaniumFront; - }}; - - homing = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.flakExplosion; - knockback = 0.8f; - lifetime = 45f; - bulletWidth = bulletHeight = 11f; - collidesTiles = false; - splashDamageRadius = 25f; - splashDamage = 33f; - homingPower = 2f; - homingRange = 50f; - }}; - - incendiary = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; - knockback = 0.8f; - lifetime = 60f; - bulletWidth = bulletHeight = 13f; - collidesTiles = false; - splashDamageRadius = 25f; - splashDamage = 30f; - incendAmount = 4; - incendSpread = 11f; - frontColor = Palette.lightishOrange; - backColor = Palette.lightOrange; - trailEffect = BulletFx.incendTrail; - }}; - - explosive = new ArtilleryBulletType(2f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; - knockback = 0.8f; - lifetime = 70f; - bulletWidth = bulletHeight = 14f; - collidesTiles = false; - splashDamageRadius = 45f; - splashDamage = 50f; - backColor = Palette.missileYellowBack; - frontColor = Palette.missileYellow; - }}; - - unit = new ArtilleryBulletType(2f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; - knockback = 0.8f; - lifetime = 90f; - bulletWidth = bulletHeight = 14f; - collides = true; - collidesTiles = true; - splashDamageRadius = 45f; - splashDamage = 50f; - backColor = Palette.bulletYellowBack; - frontColor = Palette.bulletYellow; - }}; - - surge = new ArtilleryBulletType(3f, 0, "shell"){{ - //TODO - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/bullets/BulletList.java b/core/src/io/anuke/mindustry/content/bullets/BulletList.java deleted file mode 100644 index cfe4921b93..0000000000 --- a/core/src/io/anuke/mindustry/content/bullets/BulletList.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.anuke.mindustry.content.bullets; - -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; - -public abstract class BulletList implements ContentList{ - - @Override - public ContentType type(){ - return ContentType.bullet; - } -} diff --git a/core/src/io/anuke/mindustry/content/bullets/FlakBullets.java b/core/src/io/anuke/mindustry/content/bullets/FlakBullets.java deleted file mode 100644 index d312640e35..0000000000 --- a/core/src/io/anuke/mindustry/content/bullets/FlakBullets.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.anuke.mindustry.content.bullets; - -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.entities.bullet.Bullet; -import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.entities.bullet.FlakBulletType; -import io.anuke.mindustry.entities.effect.Lightning; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.math.Mathf; - -public class FlakBullets extends BulletList implements ContentList{ - public static BulletType plastic, explosive, surge; - - @Override - public void load(){ - - - plastic = new FlakBulletType(4f, 5){ - { - splashDamageRadius = 40f; - fragBullet = ArtilleryBullets.plasticFrag; - fragBullets = 4; - hitEffect = BulletFx.plasticExplosion; - frontColor = Palette.plastaniumFront; - backColor = Palette.plastaniumBack; - } - }; - - explosive = new FlakBulletType(4f, 5){ - { - //default bullet type, no changes - } - }; - - surge = new FlakBulletType(4f, 7){ - { - splashDamage = 33f; - } - - @Override - public void despawned(Bullet b) { - super.despawned(b); - - for (int i = 0; i < 2; i++) { - Lightning.create(b.getTeam(), Palette.surge, damage, b.x, b.y, Mathf.random(360f), 12); - } - } - }; - } -} diff --git a/core/src/io/anuke/mindustry/content/bullets/MissileBullets.java b/core/src/io/anuke/mindustry/content/bullets/MissileBullets.java deleted file mode 100644 index f3a3d9092c..0000000000 --- a/core/src/io/anuke/mindustry/content/bullets/MissileBullets.java +++ /dev/null @@ -1,124 +0,0 @@ -package io.anuke.mindustry.content.bullets; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.entities.bullet.Bullet; -import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.entities.bullet.MissileBulletType; -import io.anuke.mindustry.entities.effect.Lightning; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.util.Time; -import io.anuke.arc.math.Mathf; - -public class MissileBullets extends BulletList implements ContentList{ - public static BulletType explosive, incindiary, surge, javelin, swarm; - - @Override - public void load(){ - - explosive = new MissileBulletType(1.8f, 10, "missile"){ - { - bulletWidth = 8f; - bulletHeight = 8f; - bulletShrink = 0f; - drag = -0.01f; - splashDamageRadius = 30f; - splashDamage = 30f; - lifetime = 150f; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; - } - }; - - incindiary = new MissileBulletType(2f, 12, "missile"){ - { - frontColor = Palette.lightishOrange; - backColor = Palette.lightOrange; - bulletWidth = 7f; - bulletHeight = 8f; - bulletShrink = 0f; - drag = -0.01f; - homingPower = 7f; - splashDamageRadius = 10f; - splashDamage = 10f; - lifetime = 160f; - hitEffect = BulletFx.blastExplosion; - incendSpread = 10f; - incendAmount = 3; - } - }; - - surge = new MissileBulletType(3.5f, 15, "bullet"){ - { - bulletWidth = 8f; - bulletHeight = 8f; - bulletShrink = 0f; - drag = -0.01f; - splashDamageRadius = 30f; - splashDamage = 22f; - lifetime = 150f; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; - } - - @Override - public void hit(Bullet b) { - super.hit(b); - - for (int i = 0; i < 2; i++) { - Lightning.create(b.getTeam(), Palette.surge, damage, b.x, b.y, Mathf.random(360f), 14); - } - } - }; - - javelin = new MissileBulletType(5f, 10.5f, "missile"){ - { - bulletWidth = 8f; - bulletHeight = 8f; - bulletShrink = 0f; - drag = -0.003f; - keepVelocity = false; - splashDamageRadius = 20f; - splashDamage = 1f; - lifetime = 90f; - trailColor = Color.valueOf("b6c6fd"); - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; - backColor = Palette.bulletYellowBack; - frontColor = Palette.bulletYellow; - } - - @Override - public void update(Bullet b){ - super.update(b); - b.velocity().rotate(Mathf.sin(Time.time() + b.id * 4422, 8f, 2f)); - } - }; - - swarm = new MissileBulletType(2.7f, 12, "missile"){ - { - bulletWidth = 8f; - bulletHeight = 8f; - bulletShrink = 0f; - drag = -0.003f; - homingRange = 60f; - keepVelocity = false; - splashDamageRadius = 25f; - splashDamage = 10f; - lifetime = 120f; - trailColor = Color.GRAY; - backColor = Palette.bulletYellowBack; - frontColor = Palette.bulletYellow; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; - } - - @Override - public void update(Bullet b){ - super.update(b); - b.velocity().rotate(Mathf.sin(Time.time() + b.id * 4422, 8f, 2f)); - } - }; - } -} diff --git a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java b/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java deleted file mode 100644 index 54670e3484..0000000000 --- a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java +++ /dev/null @@ -1,101 +0,0 @@ -package io.anuke.mindustry.content.bullets; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.ShootFx; -import io.anuke.mindustry.entities.bullet.BasicBulletType; -import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.graphics.Palette; - -public class StandardBullets extends BulletList implements ContentList{ - public static BulletType copper, dense, thorium, homing, tracer, mechSmall, glaive, denseBig, thoriumBig, tracerBig; - - @Override - public void load(){ - - copper = new BasicBulletType(2.5f, 7, "bullet"){{ - bulletWidth = 7f; - bulletHeight = 9f; - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; - ammoMultiplier = 5; - }}; - - dense = new BasicBulletType(3.5f, 18, "bullet"){{ - bulletWidth = 9f; - bulletHeight = 12f; - armorPierce = 0.2f; - reloadMultiplier = 0.6f; - ammoMultiplier = 2; - }}; - - thorium = new BasicBulletType(4f, 29, "bullet"){{ - bulletWidth = 10f; - bulletHeight = 13f; - armorPierce = 0.5f; - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - ammoMultiplier = 2; - }}; - - homing = new BasicBulletType(3f, 9, "bullet"){{ - bulletWidth = 7f; - bulletHeight = 9f; - homingPower = 5f; - reloadMultiplier = 1.4f; - ammoMultiplier = 5; - }}; - - tracer = new BasicBulletType(3.2f, 11, "bullet"){{ - bulletWidth = 10f; - bulletHeight = 12f; - frontColor = Palette.lightishOrange; - backColor = Palette.lightOrange; - incendSpread = 3f; - incendAmount = 1; - incendChance = 0.3f; - inaccuracy = 3f; - }}; - - glaive = new BasicBulletType(4f, 7.5f, "bullet"){{ - bulletWidth = 10f; - bulletHeight = 12f; - frontColor = Color.valueOf("feb380"); - backColor = Color.valueOf("ea8878"); - incendSpread = 3f; - incendAmount = 1; - incendChance = 0.3f; - }}; - - mechSmall = new BasicBulletType(4f, 9, "bullet"){{ - bulletWidth = 11f; - bulletHeight = 14f; - lifetime = 40f; - inaccuracy = 5f; - despawnEffect = BulletFx.hitBulletSmall; - }}; - - denseBig = new BasicBulletType(7f, 42, "bullet"){{ - bulletWidth = 15f; - bulletHeight = 21f; - armorPierce = 0.2f; - }}; - - thoriumBig = new BasicBulletType(8f, 65, "bullet"){{ - bulletWidth = 16f; - bulletHeight = 23f; - armorPierce = 0.5f; - }}; - - tracerBig = new BasicBulletType(7f, 38, "bullet"){{ - bulletWidth = 16f; - bulletHeight = 21f; - frontColor = Palette.lightishOrange; - backColor = Palette.lightOrange; - incendSpread = 3f; - incendAmount = 2; - incendChance = 0.3f; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java deleted file mode 100644 index bbc3d6336d..0000000000 --- a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java +++ /dev/null @@ -1,425 +0,0 @@ -package io.anuke.mindustry.content.bullets; - -import io.anuke.arc.entities.Effects; -import io.anuke.arc.graphics.Color; -import io.anuke.arc.graphics.g2d.CapStyle; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.arc.util.Time; -import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.EnvironmentFx; -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.entities.Damage; -import io.anuke.mindustry.entities.bullet.Bullet; -import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.entities.bullet.LiquidBulletType; -import io.anuke.mindustry.entities.effect.Fire; -import io.anuke.mindustry.entities.effect.Lightning; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.graphics.Shapes; -import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.BuildBlock; -import io.anuke.mindustry.world.blocks.distribution.MassDriver.DriverBulletData; - -import static io.anuke.mindustry.Vars.content; -import static io.anuke.mindustry.Vars.world; - -public class TurretBullets extends BulletList implements ContentList{ - public static BulletType fireball, basicFlame, lancerLaser, burstLaser, meltdownLaser, - fuseShot, waterShot, cryoShot, lavaShot, oilShot, lightning, driverBolt, healBullet, arc, damageLightning; - - @Override - public void load(){ - - damageLightning = new BulletType(0.0001f, 0f){ - { - lifetime = Lightning.lifetime; - hitEffect = BulletFx.hitLancer; - despawnEffect = Fx.none; - status = StatusEffects.shocked; - statusIntensity = 1f; - } - }; - - healBullet = new BulletType(5.2f, 13){ - float healPercent = 3f; - - { - hitEffect = BulletFx.hitLaser; - despawnEffect = BulletFx.hitLaser; - collidesTeam = true; - } - - @Override - public boolean collides(Bullet b, Tile tile){ - return tile.getTeam() != b.getTeam() || tile.entity.healthf() < 1f; - } - - @Override - public void draw(Bullet b){ - Draw.color(Palette.heal); - Lines.stroke(2f); - Lines.lineAngleCenter(b.x, b.y, b.rot(), 7f); - Draw.color(Color.WHITE); - Lines.lineAngleCenter(b.x, b.y, b.rot(), 3f); - Draw.reset(); - } - - @Override - public void hitTile(Bullet b, Tile tile){ - super.hit(b); - tile = tile.target(); - - if(tile != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){ - Effects.effect(BlockFx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size); - tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth()); - } - } - }; - - fireball = new BulletType(1f, 4){ - { - pierce = true; - hitTiles = false; - collides = false; - collidesTiles = false; - drag = 0.03f; - hitEffect = despawnEffect = Fx.none; - } - - @Override - public void init(Bullet b){ - b.velocity().setLength(0.6f + Mathf.random(2f)); - } - - @Override - public void draw(Bullet b){ - //TODO add color to the bullet depending on the color of the flame it came from - Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, b.fin()); - Fill.circle(b.x, b.y, 3f * b.fout()); - Draw.reset(); - } - - @Override - public void update(Bullet b){ - if(Mathf.chance(0.04 * Time.delta())){ - Tile tile = world.tileWorld(b.x, b.y); - if(tile != null){ - Fire.create(tile); - } - } - - if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.fireballsmoke, b.x, b.y); - } - - if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.ballfire, b.x, b.y); - } - } - }; - - basicFlame = new BulletType(2.3f, 5){ - { - hitSize = 7f; - lifetime = 35f; - pierce = true; - drag = 0.05f; - hitEffect = BulletFx.hitFlameSmall; - despawnEffect = Fx.none; - status = StatusEffects.burning; - } - - @Override - public void draw(Bullet b){ - } - }; - - lancerLaser = new BulletType(0.001f, 140){ - Color[] colors = {Palette.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Palette.lancerLaser, Color.WHITE}; - float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; - float[] lenscales = {1f, 1.1f, 1.13f, 1.14f}; - float length = 100f; - - { - hitEffect = BulletFx.hitLancer; - despawnEffect = Fx.none; - hitSize = 4; - lifetime = 16f; - pierce = true; - } - - @Override - public void init(Bullet b){ - Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), length); - } - - @Override - public void draw(Bullet b){ - float f = Mathf.curve(b.fin(), 0f, 0.2f); - float baseLen = length * f; - - Lines.lineAngle(b.x, b.y, b.rot(), baseLen); - for(int s = 0; s < 3; s++){ - Draw.color(colors[s]); - for(int i = 0; i < tscales.length; i++){ - Lines.stroke(7f * b.fout() * (s == 0 ? 1.5f : s == 1 ? 1f : 0.3f) * tscales[i]); - Lines.lineAngle(b.x, b.y, b.rot(), baseLen * lenscales[i]); - } - } - Draw.reset(); - } - }; - - meltdownLaser = new BulletType(0.001f, 26){ - Color tmpColor = new Color(); - Color[] colors = {Color.valueOf("ec745855"), Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.WHITE}; - float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; - float[] strokes = {2f, 1.5f, 1f, 0.3f}; - float[] lenscales = {1f, 1.12f, 1.15f, 1.17f}; - float length = 200f; - - { - hitEffect = BulletFx.hitMeltdown; - despawnEffect = Fx.none; - hitSize = 4; - drawSize = 420f; - lifetime = 16f; - pierce = true; - } - - @Override - public void update(Bullet b){ - if(b.timer.get(1, 5f)){ - Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), length); - } - Effects.shake(1f, 1f, b.x, b.y); - } - - @Override - public void hit(Bullet b, float hitx, float hity){ - Effects.effect(hitEffect, colors[2], hitx, hity); - if(Mathf.chance(0.4)){ - Fire.create(world.tileWorld(hitx+Mathf.range(5f), hity+Mathf.range(5f))); - } - } - - @Override - public void draw(Bullet b){ - float baseLen = (length) * b.fout(); - - Lines.lineAngle(b.x, b.y, b.rot(), baseLen); - for(int s = 0; s < colors.length; s++){ - Draw.color(tmpColor.set(colors[s]).mul(1f + Mathf.absin(Time.time(), 1f, 0.1f))); - for(int i = 0; i < tscales.length; i++){ - Tmp.v1.trns(b.rot() + 180f, (lenscales[i] - 1f) * 35f); - Lines.stroke((9f + Mathf.absin(Time.time(), 0.8f, 1.5f)) * b.fout() * strokes[s] * tscales[i]); - Lines.lineAngle(b.x + Tmp.v1.x, b.y + Tmp.v1.y, b.rot(), baseLen * lenscales[i], CapStyle.none); - } - } - Draw.reset(); - } - }; - - fuseShot = new BulletType(0.01f, 70){ - int rays = 3; - float raySpace = 2f; - float rayLength = 80f; - { - hitEffect = BulletFx.hitFuse; - lifetime = 13f; - despawnEffect = Fx.none; - pierce = true; - } - - @Override - public void init(Bullet b) { - for (int i = 0; i < rays; i++) { - Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays/2))*20f); - } - } - - @Override - public void draw(Bullet b) { - super.draw(b); - Draw.color(Color.WHITE, Palette.surge, b.fin()); - for(int i = 0; i < 7; i++){ - Tmp.v1.trns(b.rot(), i * 8f); - float sl = Mathf.clamp(b.fout()-0.5f) * (80f - i *10); - Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() + 90); - Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() - 90); - } - Shapes.tri(b.x, b.y, 13f, (rayLength+50) * b.fout(), b.rot()); - Shapes.tri(b.x, b.y, 13f, 10f * b.fout(), b.rot() + 180f); - Draw.reset(); - } - }; - - waterShot = new LiquidBulletType(Liquids.water){ - { - status = StatusEffects.wet; - statusIntensity = 0.5f; - knockback = 0.65f; - } - }; - cryoShot = new LiquidBulletType(Liquids.cryofluid){ - { - status = StatusEffects.freezing; - statusIntensity = 0.5f; - } - }; - lavaShot = new LiquidBulletType(Liquids.lava){ - { - damage = 4; - speed = 1.9f; - drag = 0.03f; - status = StatusEffects.melting; - statusIntensity = 0.5f; - } - }; - oilShot = new LiquidBulletType(Liquids.oil){ - { - speed = 2f; - drag = 0.03f; - status = StatusEffects.tarred; - statusIntensity = 0.5f; - } - }; - - lightning = new BulletType(0.001f, 12f){ - { - lifetime = 1f; - despawnEffect = Fx.none; - hitEffect = BulletFx.hitLancer; - keepVelocity = false; - } - - @Override - public void draw(Bullet b){ - } - - @Override - public void init(Bullet b){ - Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.rot(), 30); - } - }; - - arc = new BulletType(0.001f, 26){ - { - lifetime = 1; - despawnEffect = Fx.none; - hitEffect = BulletFx.hitLancer; - } - - @Override - public void draw(Bullet b){ - } - - @Override - public void init(Bullet b){ - Lightning.create(b.getTeam(), Palette.lancerLaser, damage, b.x, b.y, b.rot(), 36); - } - }; - - driverBolt = new BulletType(5.3f, 50){ - { - collidesTiles = false; - lifetime = 200f; - despawnEffect = BlockFx.smeltsmoke; - hitEffect = BulletFx.hitBulletBig; - drag = 0.005f; - } - - @Override - public void draw(Bullet b){ - float w = 11f, h = 13f; - - Draw.color(Palette.bulletYellowBack); - Draw.rect("shell-back", b.x, b.y, w, h, b.rot() + 90); - - Draw.color(Palette.bulletYellow); - Draw.rect("shell", b.x, b.y, w, h, b.rot() + 90); - - Draw.reset(); - } - - @Override - public void update(Bullet b){ - //data MUST be an instance of DriverBulletData - if(!(b.getData() instanceof DriverBulletData)){ - hit(b); - return; - } - - float hitDst = 7f; - - DriverBulletData data = (DriverBulletData) b.getData(); - - //if the target is dead, just keep flying until the bullet explodes - if(data.to.isDead()){ - return; - } - - float baseDst = data.from.dst(data.to); - float dst1 = b.dst(data.from); - float dst2 = b.dst(data.to); - - boolean intersect = false; - - //bullet has gone past the destination point: but did it intersect it? - if(dst1 > baseDst){ - float angleTo = b.angleTo(data.to); - float baseAngle = data.to.angleTo(data.from); - - //if angles are nearby, then yes, it did - if(Angles.near(angleTo, baseAngle, 2f)){ - intersect = true; - //snap bullet position back; this is used for low-FPS situations - b.set(data.to.x + Angles.trnsx(baseAngle, hitDst), data.to.y + Angles.trnsy(baseAngle, hitDst)); - } - } - - //if on course and it's in range of the target - if(Math.abs(dst1 + dst2 - baseDst) < 4f && dst2 <= hitDst){ - intersect = true; - } //else, bullet has gone off course, does not get recieved. - - if(intersect){ - data.to.handlePayload(b, data); - } - } - - @Override - public void despawned(Bullet b){ - super.despawned(b); - - if(!(b.getData() instanceof DriverBulletData)) return; - - DriverBulletData data = (DriverBulletData) b.getData(); - data.to.isRecieving = false; - - for(int i = 0; i < data.items.length; i++){ - int amountDropped = Mathf.random(0, data.items[i]); - if(amountDropped > 0){ - float angle = b.rot() + Mathf.range(100f); - Effects.effect(EnvironmentFx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i)); - } - } - } - - @Override - public void hit(Bullet b, float hitx, float hity){ - super.hit(b, hitx, hity); - despawned(b); - } - }; - } -} diff --git a/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java b/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java deleted file mode 100644 index 6052ee1b6b..0000000000 --- a/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java +++ /dev/null @@ -1,99 +0,0 @@ -package io.anuke.mindustry.content.bullets; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.entities.bullet.BasicBulletType; -import io.anuke.mindustry.entities.bullet.BombBulletType; -import io.anuke.mindustry.entities.bullet.Bullet; -import io.anuke.mindustry.entities.bullet.BulletType; -import io.anuke.mindustry.entities.effect.Fire; -import io.anuke.mindustry.entities.effect.Puddle; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.world.Tile; -import io.anuke.arc.math.Mathf; - -import static io.anuke.mindustry.Vars.world; - -public class WeaponBullets extends BulletList{ - public static BulletType tungstenShotgun, bombExplosive, bombIncendiary, bombOil, shellCarbide; - - @Override - public void load(){ - tungstenShotgun = new BasicBulletType(5f, 8, "bullet"){ - { - bulletWidth = 8f; - bulletHeight = 9f; - bulletShrink = 0.5f; - lifetime = 50f; - drag = 0.04f; - } - }; - - bombExplosive = new BombBulletType(10f, 20f, "shell"){ - { - bulletWidth = 9f; - bulletHeight = 13f; - hitEffect = BulletFx.flakExplosion; - } - }; - - bombIncendiary = new BombBulletType(7f, 10f, "shell"){ - { - bulletWidth = 8f; - bulletHeight = 12f; - hitEffect = BulletFx.flakExplosion; - backColor = Palette.lightOrange; - frontColor = Palette.lightishOrange; - } - - @Override - public void hit(Bullet b, float x, float y){ - super.hit(b, x, y); - - for(int i = 0; i < 3; i++){ - float cx = x + Mathf.range(10f); - float cy = y + Mathf.range(10f); - Tile tile = world.tileWorld(cx, cy); - if(tile != null){ - Fire.create(tile); - } - } - } - }; - - bombOil = new BombBulletType(2f, 3f, "shell"){ - { - bulletWidth = 8f; - bulletHeight = 12f; - hitEffect = BlockFx.pulverize; - backColor = new Color(0x4f4f4fff); - frontColor = Color.GRAY; - } - - @Override - public void hit(Bullet b, float x, float y){ - super.hit(b, x, y); - - for(int i = 0; i < 3; i++){ - Tile tile = world.tileWorld(x + Mathf.range(8f), y + Mathf.range(8f)); - Puddle.deposit(tile, Liquids.oil, 5f); - } - } - }; - - shellCarbide = new BasicBulletType(3.4f, 20, "bullet"){ - { - bulletWidth = 10f; - bulletHeight = 12f; - bulletShrink = 0.4f; - lifetime = 40f; - drag = 0.025f; - fragBullets = 5; - hitEffect = BulletFx.flakExplosion; - fragBullet = tungstenShotgun; - } - }; - } -} diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index 8cbb87673c..e425e33e21 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -7,7 +7,6 @@ import io.anuke.arc.function.Consumer; import io.anuke.arc.util.Log; import io.anuke.mindustry.content.*; import io.anuke.mindustry.content.blocks.*; -import io.anuke.mindustry.content.bullets.*; import io.anuke.mindustry.content.fx.*; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.bullet.Bullet; @@ -60,12 +59,7 @@ public class ContentLoader{ new Liquids(), //bullets - new ArtilleryBullets(), - new FlakBullets(), - new MissileBullets(), - new StandardBullets(), - new TurretBullets(), - new WeaponBullets(), + new Bullets(), //weapons new Weapons(), @@ -275,7 +269,5 @@ public class ContentLoader{ TypeTrait.registerType(Lightning.class, Lightning::new); } - private class ImpendingDoomException extends RuntimeException{ - public ImpendingDoomException(String s){ super(s); } - } + private class ImpendingDoomException extends RuntimeException{ ImpendingDoomException(String s){ super(s); }} } diff --git a/core/src/io/anuke/mindustry/entities/Damage.java b/core/src/io/anuke/mindustry/entities/Damage.java index 27713c81ea..49ad873375 100644 --- a/core/src/io/anuke/mindustry/entities/Damage.java +++ b/core/src/io/anuke/mindustry/entities/Damage.java @@ -10,7 +10,7 @@ import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.bullets.TurretBullets; +import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.fx.ExplosionFx; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.effect.Fire; @@ -37,7 +37,7 @@ public class Damage{ } for(int i = 0; i < Mathf.clamp(flammability / 4, 0, 30); i++){ - Time.run(i / 2f, () -> Call.createBullet(TurretBullets.fireball, x, y, Mathf.random(360f))); + Time.run(i / 2f, () -> Call.createBullet(Bullets.fireball, x, y, Mathf.random(360f))); } int waves = Mathf.clamp((int) (explosiveness / 4), 0, 30); diff --git a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java index 7f044fbcd5..6152de43fa 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java @@ -10,6 +10,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.Units; +import io.anuke.mindustry.entities.effect.Lightning; import io.anuke.mindustry.entities.traits.TargetTrait; import io.anuke.mindustry.graphics.Palette; @@ -34,6 +35,9 @@ public class BasicBulletType extends BulletType{ public float homingPower = 0f; public float homingRange = 50f; + public int lightining; + public int lightningLength = 5; + public TextureRegion backRegion; public TextureRegion frontRegion; @@ -102,5 +106,9 @@ public class BasicBulletType extends BulletType{ if(fragBullet != null || splashDamageRadius > 0){ hit(b); } + + for (int i = 0; i < lightining; i++) { + Lightning.create(b.getTeam(), Palette.surge, damage, b.x, b.y, Mathf.random(360f), lightningLength); + } } } diff --git a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java index b3877c26de..90a396839d 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java @@ -25,6 +25,8 @@ public class LiquidBulletType extends BulletType{ this.liquid = liquid; lifetime = 70f; + status = liquid.effect; + statusIntensity = 0.5f; despawnEffect = Fx.none; hitEffect = BulletFx.hitLiquid; drag = 0.01f; diff --git a/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java b/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java new file mode 100644 index 0000000000..b263b81ab6 --- /dev/null +++ b/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java @@ -0,0 +1,109 @@ +package io.anuke.mindustry.entities.bullet; + +import io.anuke.arc.entities.Effects; +import io.anuke.arc.graphics.Color; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.math.Angles; +import io.anuke.arc.math.Mathf; +import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.graphics.Palette; +import io.anuke.mindustry.world.blocks.distribution.MassDriver.DriverBulletData; + +import static io.anuke.mindustry.Vars.content; + +public class MassDriverBolt extends BulletType{ + + public MassDriverBolt(){ + super(5.3f, 50); + collidesTiles = false; + lifetime = 200f; + despawnEffect = BlockFx.smeltsmoke; + hitEffect = BulletFx.hitBulletBig; + drag = 0.005f; + } + + @Override + public void draw(Bullet b){ + float w = 11f, h = 13f; + + Draw.color(Palette.bulletYellowBack); + Draw.rect("shell-back", b.x, b.y, w, h, b.rot() + 90); + + Draw.color(Palette.bulletYellow); + Draw.rect("shell", b.x, b.y, w, h, b.rot() + 90); + + Draw.reset(); + } + + @Override + public void update(Bullet b){ + //data MUST be an instance of DriverBulletData + if(!(b.getData() instanceof DriverBulletData)){ + hit(b); + return; + } + + float hitDst = 7f; + + DriverBulletData data = (DriverBulletData) b.getData(); + + //if the target is dead, just keep flying until the bullet explodes + if(data.to.isDead()){ + return; + } + + float baseDst = data.from.dst(data.to); + float dst1 = b.dst(data.from); + float dst2 = b.dst(data.to); + + boolean intersect = false; + + //bullet has gone past the destination point: but did it intersect it? + if(dst1 > baseDst){ + float angleTo = b.angleTo(data.to); + float baseAngle = data.to.angleTo(data.from); + + //if angles are nearby, then yes, it did + if(Angles.near(angleTo, baseAngle, 2f)){ + intersect = true; + //snap bullet position back; this is used for low-FPS situations + b.set(data.to.x + Angles.trnsx(baseAngle, hitDst), data.to.y + Angles.trnsy(baseAngle, hitDst)); + } + } + + //if on course and it's in range of the target + if(Math.abs(dst1 + dst2 - baseDst) < 4f && dst2 <= hitDst){ + intersect = true; + } //else, bullet has gone off course, does not get recieved. + + if(intersect){ + data.to.handlePayload(b, data); + } + } + + @Override + public void despawned(Bullet b){ + super.despawned(b); + + if(!(b.getData() instanceof DriverBulletData)) return; + + DriverBulletData data = (DriverBulletData) b.getData(); + data.to.isRecieving = false; + + for(int i = 0; i < data.items.length; i++){ + int amountDropped = Mathf.random(0, data.items[i]); + if(amountDropped > 0){ + float angle = b.rot() + Mathf.range(100f); + Effects.effect(EnvironmentFx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i)); + } + } + } + + @Override + public void hit(Bullet b, float hitx, float hity){ + super.hit(b, hitx, hity); + despawned(b); + } +} diff --git a/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java index d27e2f222f..b62b83787a 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java @@ -10,6 +10,9 @@ import io.anuke.arc.math.Mathf; public class MissileBulletType extends BasicBulletType{ protected Color trailColor = Palette.missileYellowBack; + protected float weaveScale = 0f; + protected float weaveMag = -1f; + public MissileBulletType(float speed, float damage, String bulletSprite){ super(speed, damage, bulletSprite); backColor = Palette.missileYellowBack; @@ -24,5 +27,9 @@ public class MissileBulletType extends BasicBulletType{ if(Mathf.chance(Time.delta() * 0.2)){ Effects.effect(BulletFx.missileTrail, trailColor, b.x, b.y, 2f); } + + if(weaveMag > 0){ + b.velocity().rotate(Mathf.sin(Time.time() + b.id * 4422, weaveScale, weaveMag)); + } } } diff --git a/core/src/io/anuke/mindustry/entities/effect/Fire.java b/core/src/io/anuke/mindustry/entities/effect/Fire.java index 36e2f03ac5..359a0b1d09 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Fire.java +++ b/core/src/io/anuke/mindustry/entities/effect/Fire.java @@ -13,8 +13,8 @@ import io.anuke.arc.util.Structs; import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; +import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.bullets.TurretBullets; import io.anuke.mindustry.content.fx.EnvironmentFx; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.TileEntity; @@ -136,7 +136,7 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable{ create(other); if(Mathf.chance(fireballChance * Time.delta() * Mathf.clamp(flammability / 10f))){ - Call.createBullet(TurretBullets.fireball, x, y, Mathf.random(360f)); + Call.createBullet(Bullets.fireball, x, y, Mathf.random(360f)); } } diff --git a/core/src/io/anuke/mindustry/entities/effect/Lightning.java b/core/src/io/anuke/mindustry/entities/effect/Lightning.java index a26ce41eea..7ee5e771af 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Lightning.java +++ b/core/src/io/anuke/mindustry/entities/effect/Lightning.java @@ -19,7 +19,7 @@ import io.anuke.arc.math.geom.Position; import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.pooling.Pools; -import io.anuke.mindustry.content.bullets.TurretBullets; +import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.bullet.Bullet; @@ -72,7 +72,7 @@ public class Lightning extends TimedEntity implements DrawTrait, SyncTrait, Time hit.clear(); for (int i = 0; i < length/2; i++) { - Bullet.create(TurretBullets.damageLightning, l, team, x, y, 0f, 1f, 1f, dmg); + Bullet.create(Bullets.damageLightning, l, team, x, y, 0f, 1f, 1f, dmg); l.lines.add(new Vector2(x + Mathf.range(3f), y + Mathf.range(3f))); rect.setSize(hitRange).setCenter(x, y); diff --git a/core/src/io/anuke/mindustry/entities/effect/Puddle.java b/core/src/io/anuke/mindustry/entities/effect/Puddle.java index d88fd53e9f..e134b9a069 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Puddle.java +++ b/core/src/io/anuke/mindustry/entities/effect/Puddle.java @@ -20,7 +20,7 @@ import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Liquids; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.bullets.TurretBullets; +import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.fx.BlockFx; import io.anuke.mindustry.content.fx.EnvironmentFx; import io.anuke.mindustry.entities.Units; @@ -130,7 +130,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai (liquid.flammability > 0.3f && dest.temperature > 0.7f)){ //flammable liquid + hot liquid Fire.create(tile); if(Mathf.chance(0.006 * amount)){ - Call.createBullet(TurretBullets.fireball, x, y, Mathf.random(360f)); + Call.createBullet(Bullets.fireball, x, y, Mathf.random(360f)); } }else if(dest.temperature > 0.7f && liquid.temperature < 0.55f){ //cold liquid poured onto hot puddle if(Mathf.chance(0.5f * amount)){ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java index f702e0a5b3..7b806c0150 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/PowerTurret.java @@ -6,6 +6,7 @@ import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.StatUnit; public abstract class PowerTurret extends CooledTurret{ + //TODO recode this class, satisfaction must be 100%! /** The percentage of power which will be used per shot. */ protected float powerUsed = 0.5f; protected BulletType shootType; diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java index 13a15f3cad..8339a7c1bd 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java @@ -15,7 +15,8 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; -import io.anuke.mindustry.content.bullets.TurretBullets; +import io.anuke.mindustry.content.Bullets; +import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.fx.BlockFx; import io.anuke.mindustry.content.fx.EnvironmentFx; import io.anuke.mindustry.content.fx.ShootFx; @@ -98,7 +99,7 @@ public class MassDriver extends Block{ float angle = tile.angleTo(target); other.isRecieving = true; - Bullet.create(TurretBullets.driverBolt, entity, entity.getTeam(), + Bullet.create(Bullets.driverBolt, entity, entity.getTeam(), tile.drawx() + Angles.trnsx(angle, driver.translation), tile.drawy() + Angles.trnsy(angle, driver.translation), angle, 1f, 1f, data); From a1a69f62e183b37629104514569775c18267f1a9 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jan 2019 17:11:53 -0500 Subject: [PATCH 4/6] :crab: FX classes are gone :crab: --- .../io/anuke/mindustry/content/Bullets.java | 75 +- core/src/io/anuke/mindustry/content/Fx.java | 814 ++++++++++++++++++ .../src/io/anuke/mindustry/content/Mechs.java | 10 +- .../mindustry/content/StatusEffects.java | 15 +- .../io/anuke/mindustry/content/Weapons.java | 16 +- .../content/blocks/CraftingBlocks.java | 20 +- .../content/blocks/DefenseBlocks.java | 6 +- .../mindustry/content/blocks/PowerBlocks.java | 5 +- .../content/blocks/ProductionBlocks.java | 16 +- .../content/blocks/TurretBlocks.java | 26 +- .../anuke/mindustry/content/fx/BlockFx.java | 330 ------- .../anuke/mindustry/content/fx/BulletFx.java | 281 ------ .../mindustry/content/fx/EnvironmentFx.java | 137 --- .../mindustry/content/fx/ExplosionFx.java | 97 --- .../src/io/anuke/mindustry/content/fx/Fx.java | 69 -- .../io/anuke/mindustry/content/fx/FxList.java | 12 - .../anuke/mindustry/content/fx/ShootFx.java | 225 ----- .../io/anuke/mindustry/content/fx/UnitFx.java | 78 -- .../anuke/mindustry/core/ContentLoader.java | 7 - .../src/io/anuke/mindustry/core/Renderer.java | 2 +- .../io/anuke/mindustry/entities/Damage.java | 10 +- .../io/anuke/mindustry/entities/Player.java | 4 +- .../anuke/mindustry/entities/TileEntity.java | 2 +- .../entities/bullet/ArtilleryBulletType.java | 4 +- .../mindustry/entities/bullet/BulletType.java | 11 +- .../entities/bullet/FlakBulletType.java | 4 +- .../entities/bullet/LiquidBulletType.java | 5 +- .../entities/bullet/MassDriverBolt.java | 10 +- .../entities/bullet/MissileBulletType.java | 4 +- .../anuke/mindustry/entities/effect/Fire.java | 6 +- .../mindustry/entities/effect/Puddle.java | 13 +- .../entities/traits/BuilderTrait.java | 4 +- .../mindustry/entities/traits/CarryTrait.java | 6 +- .../mindustry/entities/units/BaseUnit.java | 4 +- .../anuke/mindustry/input/InputHandler.java | 4 +- .../io/anuke/mindustry/input/MobileInput.java | 2 +- core/src/io/anuke/mindustry/type/Weapon.java | 2 +- .../io/anuke/mindustry/world/BaseBlock.java | 6 +- .../mindustry/world/blocks/BuildBlock.java | 5 +- .../anuke/mindustry/world/blocks/Floor.java | 6 +- .../mindustry/world/blocks/defense/Door.java | 6 +- .../world/blocks/defense/ForceProjector.java | 9 +- .../world/blocks/defense/MendProjector.java | 6 +- .../blocks/defense/OverdriveProjector.java | 6 +- .../blocks/defense/turrets/ChargeTurret.java | 2 +- .../blocks/defense/turrets/CooledTurret.java | 4 +- .../world/blocks/defense/turrets/Turret.java | 2 +- .../world/blocks/distribution/MassDriver.java | 13 +- .../blocks/power/ItemLiquidGenerator.java | 6 +- .../world/blocks/power/NuclearReactor.java | 13 +- .../world/blocks/production/Cultivator.java | 2 +- .../world/blocks/production/Drill.java | 6 +- .../blocks/production/GenericCrafter.java | 5 +- .../world/blocks/production/Incinerator.java | 4 +- .../world/blocks/production/PowerSmelter.java | 6 +- .../world/blocks/production/Smelter.java | 4 +- .../world/blocks/production/SolidPump.java | 2 +- .../world/blocks/storage/CoreBlock.java | 2 +- .../world/blocks/units/CommandCenter.java | 4 +- .../mindustry/world/blocks/units/MechPad.java | 3 +- .../world/blocks/units/Reconstructor.java | 2 +- .../world/blocks/units/UnitFactory.java | 4 +- 62 files changed, 1011 insertions(+), 1453 deletions(-) create mode 100644 core/src/io/anuke/mindustry/content/Fx.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/BlockFx.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/BulletFx.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/EnvironmentFx.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/ExplosionFx.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/Fx.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/FxList.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/ShootFx.java delete mode 100644 core/src/io/anuke/mindustry/content/fx/UnitFx.java diff --git a/core/src/io/anuke/mindustry/content/Bullets.java b/core/src/io/anuke/mindustry/content/Bullets.java index 8900001cb6..e8551c7978 100644 --- a/core/src/io/anuke/mindustry/content/Bullets.java +++ b/core/src/io/anuke/mindustry/content/Bullets.java @@ -9,7 +9,6 @@ import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.fx.*; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.bullet.*; import io.anuke.mindustry.entities.effect.Fire; @@ -56,7 +55,7 @@ public class Bullets implements ContentList{ public void load(){ artilleryDense = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; knockback = 0.8f; lifetime = 50f; bulletWidth = bulletHeight = 11f; @@ -76,7 +75,7 @@ public class Bullets implements ContentList{ }}; arilleryPlastic = new ArtilleryBulletType(3.3f, 0, "shell"){{ - hitEffect = BulletFx.plasticExplosion; + hitEffect = Fx.plasticExplosion; knockback = 1f; lifetime = 55f; bulletWidth = bulletHeight = 13f; @@ -90,7 +89,7 @@ public class Bullets implements ContentList{ }}; artilleryHoming = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; knockback = 0.8f; lifetime = 45f; bulletWidth = bulletHeight = 11f; @@ -102,7 +101,7 @@ public class Bullets implements ContentList{ }}; artlleryIncendiary = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 60f; bulletWidth = bulletHeight = 13f; @@ -113,11 +112,11 @@ public class Bullets implements ContentList{ incendSpread = 11f; frontColor = Palette.lightishOrange; backColor = Palette.lightOrange; - trailEffect = BulletFx.incendTrail; + trailEffect = Fx.incendTrail; }}; artilleryExplosive = new ArtilleryBulletType(2f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 70f; bulletWidth = bulletHeight = 14f; @@ -129,7 +128,7 @@ public class Bullets implements ContentList{ }}; artilleryUnit = new ArtilleryBulletType(2f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 90f; bulletWidth = bulletHeight = 14f; @@ -145,7 +144,7 @@ public class Bullets implements ContentList{ splashDamageRadius = 40f; fragBullet = artilleryPlasticFrag; fragBullets = 4; - hitEffect = BulletFx.plasticExplosion; + hitEffect = Fx.plasticExplosion; frontColor = Palette.plastaniumFront; backColor = Palette.plastaniumBack; }}; @@ -168,8 +167,8 @@ public class Bullets implements ContentList{ splashDamageRadius = 30f; splashDamage = 30f; lifetime = 150f; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; }}; missileIncendiary = new MissileBulletType(2f, 12, "missile"){{ @@ -183,7 +182,7 @@ public class Bullets implements ContentList{ splashDamageRadius = 10f; splashDamage = 10f; lifetime = 160f; - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; incendSpread = 10f; incendAmount = 3; }}; @@ -196,8 +195,8 @@ public class Bullets implements ContentList{ splashDamageRadius = 30f; splashDamage = 22f; lifetime = 150f; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; lightining = 2; lightningLength = 14; }}; @@ -212,8 +211,8 @@ public class Bullets implements ContentList{ splashDamage = 1f; lifetime = 90f; trailColor = Color.valueOf("b6c6fd"); - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; backColor = Palette.bulletYellowBack; frontColor = Palette.bulletYellow; weaveScale = 8f; @@ -233,8 +232,8 @@ public class Bullets implements ContentList{ trailColor = Color.GRAY; backColor = Palette.bulletYellowBack; frontColor = Palette.bulletYellow; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; weaveScale = 8f; weaveMag = 2f; }}; @@ -242,8 +241,8 @@ public class Bullets implements ContentList{ standardCopper = new BasicBulletType(2.5f, 7, "bullet"){{ bulletWidth = 7f; bulletHeight = 9f; - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; + shootEffect = Fx.shootSmall; + smokeEffect = Fx.shootSmallSmoke; ammoMultiplier = 5; }}; @@ -259,8 +258,8 @@ public class Bullets implements ContentList{ bulletWidth = 10f; bulletHeight = 13f; armorPierce = 0.5f; - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; + shootEffect = Fx.shootBig; + smokeEffect = Fx.shootBigSmoke; ammoMultiplier = 2; }}; @@ -298,7 +297,7 @@ public class Bullets implements ContentList{ bulletHeight = 14f; lifetime = 40f; inaccuracy = 5f; - despawnEffect = BulletFx.hitBulletSmall; + despawnEffect = Fx.hitBulletSmall; }}; standardDenseBig = new BasicBulletType(7f, 42, "bullet"){{ @@ -326,7 +325,7 @@ public class Bullets implements ContentList{ damageLightning = new BulletType(0.0001f, 0f){ { lifetime = Lightning.lifetime; - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; despawnEffect = Fx.none; status = StatusEffects.shocked; statusIntensity = 1f; @@ -337,8 +336,8 @@ public class Bullets implements ContentList{ float healPercent = 3f; { - hitEffect = BulletFx.hitLaser; - despawnEffect = BulletFx.hitLaser; + hitEffect = Fx.hitLaser; + despawnEffect = Fx.hitLaser; collidesTeam = true; } @@ -363,7 +362,7 @@ public class Bullets implements ContentList{ tile = tile.target(); if(tile != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){ - Effects.effect(BlockFx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size); + Effects.effect(Fx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size); tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth()); } } @@ -402,11 +401,11 @@ public class Bullets implements ContentList{ } if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.fireballsmoke, b.x, b.y); + Effects.effect(Fx.fireballsmoke, b.x, b.y); } if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.ballfire, b.x, b.y); + Effects.effect(Fx.ballfire, b.x, b.y); } } }; @@ -417,7 +416,7 @@ public class Bullets implements ContentList{ lifetime = 35f; pierce = true; drag = 0.05f; - hitEffect = BulletFx.hitFlameSmall; + hitEffect = Fx.hitFlameSmall; despawnEffect = Fx.none; status = StatusEffects.burning; } @@ -434,7 +433,7 @@ public class Bullets implements ContentList{ float length = 100f; { - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; despawnEffect = Fx.none; hitSize = 4; lifetime = 16f; @@ -472,7 +471,7 @@ public class Bullets implements ContentList{ float length = 200f; { - hitEffect = BulletFx.hitMeltdown; + hitEffect = Fx.hitMeltdown; despawnEffect = Fx.none; hitSize = 4; drawSize = 420f; @@ -518,7 +517,7 @@ public class Bullets implements ContentList{ float raySpace = 2f; float rayLength = 80f; { - hitEffect = BulletFx.hitFuse; + hitEffect = Fx.hitFuse; lifetime = 13f; despawnEffect = Fx.none; pierce = true; @@ -570,7 +569,7 @@ public class Bullets implements ContentList{ { lifetime = 1f; despawnEffect = Fx.none; - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; keepVelocity = false; } @@ -587,7 +586,7 @@ public class Bullets implements ContentList{ arc = new BulletType(0.001f, 26){{ lifetime = 1; despawnEffect = Fx.none; - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; } @Override @@ -612,13 +611,13 @@ public class Bullets implements ContentList{ bombExplosive = new BombBulletType(10f, 20f, "shell"){{ bulletWidth = 9f; bulletHeight = 13f; - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; }}; bombIncendiary = new BombBulletType(7f, 10f, "shell"){{ bulletWidth = 8f; bulletHeight = 12f; - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; backColor = Palette.lightOrange; frontColor = Palette.lightishOrange; incendChance = 1f; @@ -629,7 +628,7 @@ public class Bullets implements ContentList{ bombOil = new BombBulletType(2f, 3f, "shell"){{ bulletWidth = 8f; bulletHeight = 12f; - hitEffect = BlockFx.pulverize; + hitEffect = Fx.pulverize; backColor = new Color(0x4f4f4fff); frontColor = Color.GRAY; } diff --git a/core/src/io/anuke/mindustry/content/Fx.java b/core/src/io/anuke/mindustry/content/Fx.java new file mode 100644 index 0000000000..ee3985365e --- /dev/null +++ b/core/src/io/anuke/mindustry/content/Fx.java @@ -0,0 +1,814 @@ +package io.anuke.mindustry.content; + +import io.anuke.arc.Core; +import io.anuke.arc.entities.Effects.Effect; +import io.anuke.arc.graphics.Color; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.graphics.g2d.Fill; +import io.anuke.arc.graphics.g2d.Lines; +import io.anuke.arc.math.Angles; +import io.anuke.arc.math.Mathf; +import io.anuke.mindustry.content.Liquids; +import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; +import io.anuke.mindustry.game.ContentList; +import io.anuke.mindustry.graphics.Palette; +import io.anuke.mindustry.graphics.Shapes; +import io.anuke.mindustry.type.ContentType; +import io.anuke.mindustry.type.Item; + +import static io.anuke.mindustry.Vars.tilesize; + +public class Fx implements ContentList{ + public static Effect + + none, placeBlock, breakBlock, smoke, spawn, tapBlock, select, + vtolHover, unitDrop, unitPickup, unitLand, pickup, healWave, heal, landShock, reactorsmoke, nuclearsmoke, nuclearcloud, + redgeneratespark, generatespark, fuelburn, plasticburn, pulverize, pulverizeRed, pulverizeRedder, pulverizeSmall, pulverizeMedium, + producesmoke, smeltsmoke, formsmoke, blastsmoke, lava, doorclose, dooropenlarge, doorcloselarge, purify, purifyoil, purifystone, generate, + mine, mineBig, mineHuge, smelt, teleportActivate, teleport, teleportOut, ripple, bubble, commandSend, + healBlock, healBlockFull, healWaveMend, overdriveWave, overdriveBlockFull, shieldBreak, hitBulletSmall, hitFuse, + hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, hitMeltdown, despawn, flakExplosion, blastExplosion, + plasticExplosion, artilleryTrail, incendTrail, missileTrail, absorb, flakExplosionBig, plasticExplosionFlak, burning, fire, + fireSmoke, steam, fireballsmoke, ballfire, freezing, melting, wet, oily, overdriven, dropItem, shockwave, + bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke, shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke, + shootBigSmoke2, shootSmallFlame, shootLiquid, shellEjectSmall, shellEjectMedium, + shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot; + + @Override + public void load(){ + + none = new Effect(0, 0f, e -> {}); + + placeBlock = new Effect(16, e -> { + Draw.color(Palette.accent); + Lines.stroke(3f - e.fin() * 2f); + Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); + Draw.reset(); + }); + + tapBlock = new Effect(12, e -> { + Draw.color(Palette.accent); + Lines.stroke(3f - e.fin() * 2f); + Lines.circle(e.x, e.y, 4f + (tilesize / 1.5f * e.rotation) * e.fin()); + Draw.reset(); + }); + + breakBlock = new Effect(12, e -> { + Draw.color(Palette.remove); + Lines.stroke(3f - e.fin() * 2f); + Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); + + Angles.randLenVectors(e.id, 3 + (int) (e.rotation * 3), e.rotation * 2f + (tilesize * e.rotation) * e.finpow(), (x, y) -> { + Fill.square(e.x + x, e.y + y, 1f + e.fout() * (3f + e.rotation)); + }); + Draw.reset(); + }); + + select = new Effect(23, e -> { + Draw.color(Palette.accent); + Lines.stroke(e.fout() * 3f); + Lines.circle(e.x, e.y, 3f + e.fin() * 14f); + Draw.reset(); + }); + + smoke = new Effect(100, e -> { + Draw.color(Color.GRAY, Palette.darkishGray, e.fin()); + float size = 7f - e.fin() * 7f; + Draw.rect("circle", e.x, e.y, size, size); + Draw.reset(); + }); + + spawn = new Effect(23, e -> { + Lines.stroke(2f * e.fout()); + Draw.color(Palette.accent); + Lines.poly(e.x, e.y, 4, 3f + e.fin() * 8f); + Draw.reset(); + }); + + vtolHover = new Effect(40f, e -> { + float len = e.finpow() * 10f; + float ang = e.rotation + Mathf.randomSeedRange(e.id, 30f); + Draw.color(Palette.lightFlame, Palette.lightOrange, e.fin()); + Fill.circle(e.x + Angles.trnsx(ang, len), e.y + Angles.trnsy(ang, len), 2f * e.fout()); + Draw.reset(); + }); + + unitDrop = new GroundEffect(30, e -> { + Draw.color(Palette.lightishGray); + Angles.randLenVectors(e.id, 9, 3 + 20f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.4f); + }); + Draw.reset(); + }); + + unitLand = new GroundEffect(30, e -> { + Draw.color(Palette.lightishGray, e.color, e.rotation); + Angles.randLenVectors(e.id, 6, 17f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.3f); + }); + Draw.reset(); + }); + + unitPickup = new GroundEffect(18, e -> { + Draw.color(Palette.lightishGray); + Lines.stroke(e.fin() * 2f); + Lines.poly(e.x, e.y, 4, 13f * e.fout()); + Draw.reset(); + }); + + landShock = new GroundEffect(12, e -> { + Draw.color(Palette.lancerLaser); + Lines.stroke(e.fout() * 3f); + Lines.poly(e.x, e.y, 12, 20f * e.fout()); + Draw.reset(); + }); + + pickup = new Effect(18, e -> { + Draw.color(Palette.lightishGray); + Lines.stroke(e.fout() * 2f); + Lines.spikes(e.x, e.y, 1f + e.fin() * 6f, e.fout() * 4f, 6); + Draw.reset(); + }); + + healWave = new Effect(22, e -> { + Draw.color(Palette.heal); + Lines.stroke(e.fout() * 2f); + Lines.poly(e.x, e.y, 30, 4f + e.finpow() * 60f); + Draw.color(); + }); + + heal = new Effect(11, e -> { + Draw.color(Palette.heal); + Lines.stroke(e.fout() * 2f); + Lines.poly(e.x, e.y, 10, 2f + e.finpow() * 7f); + Draw.color(); + }); + + + hitBulletSmall = new Effect(14, e -> { + Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); + + e.scaled(7f, s -> { + Lines.stroke(0.5f + s.fout()); + Lines.circle(e.x, e.y, s.fin()*5f); + }); + + + Lines.stroke(0.5f + e.fout()); + + Angles.randLenVectors(e.id, 5, e.fin() * 15f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); + }); + + Draw.reset(); + }); + + hitFuse = new Effect(14, e -> { + Draw.color(Color.WHITE, Palette.surge, e.fin()); + + e.scaled(7f, s -> { + Lines.stroke(0.5f + s.fout()); + Lines.circle(e.x, e.y, s.fin()*7f); + }); + + + Lines.stroke(0.5f + e.fout()); + + Angles.randLenVectors(e.id, 6, e.fin() * 15f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); + }); + + Draw.reset(); + }); + + hitBulletBig = new Effect(13, e -> { + Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); + Lines.stroke(0.5f + e.fout() * 1.5f); + + Angles.randLenVectors(e.id, 8, e.finpow() * 30f, e.rotation, 50f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1.5f); + }); + + Draw.reset(); + }); + + hitFlameSmall = new Effect(14, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + Lines.stroke(0.5f + e.fout()); + + Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation, 50f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); + }); + + Draw.reset(); + }); + + hitLiquid = new Effect(16, e -> { + Draw.color(e.color); + + Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation + 180f, 60f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2f); + }); + + Draw.reset(); + }); + + hitLancer = new Effect(12, e -> { + Draw.color(Color.WHITE); + Lines.stroke(e.fout() * 1.5f); + + Angles.randLenVectors(e.id, 8, e.finpow() * 17f, e.rotation, 360f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); + }); + + Draw.reset(); + }); + + hitMeltdown = new Effect(12, e -> { + Draw.color(Palette.meltdownHit); + Lines.stroke(e.fout() * 2f); + + Angles.randLenVectors(e.id, 6, e.finpow() * 18f, e.rotation, 360f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); + }); + + Draw.reset(); + }); + + hitLaser = new Effect(8, e -> { + Draw.color(Color.WHITE, Palette.heal, e.fin()); + Lines.stroke(0.5f + e.fout()); + Lines.circle(e.x, e.y, e.fin()*5f); + Draw.reset(); + }); + + despawn = new Effect(12, e -> { + Draw.color(Palette.lighterOrange, Color.GRAY, e.fin()); + Lines.stroke(e.fout()); + + Angles.randLenVectors(e.id, 7, e.fin() * 7f, e.rotation, 40f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 2 + 1f); + }); + + Draw.reset(); + }); + + flakExplosion = new Effect(20, e -> { + + Draw.color(Palette.bulletYellow); + e.scaled(6, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 10f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 5, 2f + 23f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); + }); + + Draw.color(Palette.lighterOrange); + Lines.stroke(1f * e.fout()); + + Angles.randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + plasticExplosion = new Effect(24, e -> { + + Draw.color(Palette.plastaniumFront); + e.scaled(7, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 24f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 7, 2f + 28f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); + }); + + Draw.color(Palette.plastaniumBack); + Lines.stroke(1f * e.fout()); + + Angles.randLenVectors(e.id + 1, 4, 1f + 25f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + plasticExplosionFlak = new Effect(28, e -> { + + Draw.color(Palette.plastaniumFront); + e.scaled(7, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 34f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 7, 2f + 30f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); + }); + + Draw.color(Palette.plastaniumBack); + Lines.stroke(1f * e.fout()); + + Angles.randLenVectors(e.id + 1, 4, 1f + 30f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + blastExplosion = new Effect(22, e -> { + + Draw.color(Palette.missileYellow); + e.scaled(6, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 15f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 5, 2f + 23f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); + }); + + Draw.color(Palette.missileYellowBack); + Lines.stroke(1f * e.fout()); + + Angles.randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + artilleryTrail = new Effect(50, e -> { + Draw.color(e.color); + Fill.circle(e.x, e.y, e.rotation * e.fout()); + Draw.reset(); + }); + + incendTrail = new Effect(50, e -> { + Draw.color(Palette.lightOrange); + Fill.circle(e.x, e.y, e.rotation * e.fout()); + Draw.reset(); + }); + + missileTrail = new Effect(50, e -> { + Draw.color(e.color); + Fill.circle(e.x, e.y, e.rotation * e.fout()); + Draw.reset(); + }); + + absorb = new Effect(12, e -> { + Draw.color(Palette.accent); + Lines.stroke(2f * e.fout()); + Lines.circle(e.x, e.y, 5f * e.fout()); + Draw.reset(); + }); + + flakExplosionBig = new Effect(30, e -> { + + Draw.color(Palette.bulletYellowBack); + e.scaled(6, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 25f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 2f + 23f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); + }); + + Draw.color(Palette.bulletYellow); + Lines.stroke(1f * e.fout()); + + Angles.randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + + burning = new Effect(35f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + + Angles.randLenVectors(e.id, 3, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.1f + e.fout() * 1.4f); + }); + + Draw.color(); + }); + + fire = new Effect(35f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + + Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); + }); + + Draw.color(); + }); + + fireSmoke = new Effect(35f, e -> { + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); + }); + + Draw.color(); + }); + + steam = new Effect(35f, e -> { + Draw.color(Color.LIGHT_GRAY); + + Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); + }); + + Draw.color(); + }); + + fireballsmoke = new Effect(25f, e -> { + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); + }); + + Draw.color(); + }); + + ballfire = new Effect(25f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + + Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); + }); + + Draw.color(); + }); + + freezing = new Effect(40f, e -> { + Draw.color(Liquids.cryofluid.color); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1.2f); + }); + + Draw.color(); + }); + + melting = new Effect(40f, e -> { + Draw.color(Liquids.lava.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f)); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 3f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f); + }); + + Draw.color(); + }); + + wet = new Effect(40f, e -> { + Draw.color(Liquids.water.color); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1f); + }); + + Draw.color(); + }); + + oily = new Effect(42f, e -> { + Draw.color(Liquids.oil.color); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1f); + }); + + Draw.color(); + }); + + overdriven = new Effect(20f, e -> { + Draw.color(Palette.accent); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.square(e.x + x, e.y + y, e.fout() * 2.3f+0.5f); + }); + + Draw.color(); + }); + + dropItem = new Effect(20f, e -> { + float length = 20f * e.finpow(); + float size = 7f * e.fout(); + + Draw.rect(((Item) e.data).region, e.x + Angles.trnsx(e.rotation, length), e.y + Angles.trnsy(e.rotation, length), size, size); + }); + + + shockwave = new Effect(10f, 80f, e -> { + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout() * 2f + 0.2f); + Lines.circle(e.x, e.y, e.fin() * 28f); + Draw.reset(); + }); + + bigShockwave = new Effect(10f, 80f, e -> { + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout() * 3f); + Lines.circle(e.x, e.y, e.fin() * 50f); + Draw.reset(); + }); + + nuclearShockwave = new Effect(10f, 200f, e -> { + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout() * 3f + 0.2f); + Lines.poly(e.x, e.y, 40, e.fin() * 140f); + Draw.reset(); + }); + + explosion = new Effect(30, e -> { + e.scaled(7, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 10f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); + Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); + }); + + Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); + Lines.stroke(1.5f * e.fout()); + + Angles.randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + blockExplosion = new Effect(30, e -> { + e.scaled(7, i -> { + Lines.stroke(3.1f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 14f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); + Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); + }); + + Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); + Lines.stroke(1.7f * e.fout()); + + Angles.randLenVectors(e.id + 1, 9, 1f + 23f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + blockExplosionSmoke = new Effect(30, e -> { + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 4f + 30f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 3f); + Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); + }); + + Draw.reset(); + }); + + + shootSmall = new Effect(8, e -> { + Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); + float w = 1f + 5 * e.fout(); + Shapes.tri(e.x, e.y, w, 15f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootHeal = new Effect(8, e -> { + Draw.color(Palette.heal); + float w = 1f + 5 * e.fout(); + Shapes.tri(e.x, e.y, w, 17f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootSmallSmoke = new Effect(20f, e -> { + Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 5, e.finpow() * 6f, e.rotation, 20f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); + }); + + Draw.reset(); + }); + + shootBig = new Effect(9, e -> { + Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); + float w = 1.2f + 7 * e.fout(); + Shapes.tri(e.x, e.y, w, 25f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootBig2 = new Effect(10, e -> { + Draw.color(Palette.lightOrange, Color.GRAY, e.fin()); + float w = 1.2f + 8 * e.fout(); + Shapes.tri(e.x, e.y, w, 29f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 5f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootBigSmoke = new Effect(17f, e -> { + Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 8, e.finpow() * 19f, e.rotation, 10f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2f + 0.2f); + }); + + Draw.reset(); + }); + + shootBigSmoke2 = new Effect(18f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 9, e.finpow() * 23f, e.rotation, 20f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2.4f + 0.2f); + }); + + Draw.reset(); + }); + + shootSmallFlame = new Effect(30f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 8, e.finpow() * 36f, e.rotation, 10f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.5f); + }); + + Draw.reset(); + }); + + shootLiquid = new Effect(40f, e -> { + Draw.color(e.color, Color.WHITE, e.fout() / 6f + Mathf.randomSeedRange(e.id, 0.1f)); + + Angles.randLenVectors(e.id, 6, e.finpow() * 60f, e.rotation, 11f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.5f + e.fout() * 2.5f); + }); + + Draw.reset(); + }); + + shellEjectSmall = new GroundEffect(30f, 400f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); + float rot = Math.abs(e.rotation) + 90f; + + int i = Mathf.sign(e.rotation); + + float len = (2f + e.finpow() * 6f) * i; + float lr = rot + e.fin() * 30f * i; + Fill.rect(e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), + e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), + 1f, 2f, rot + e.fin() * 50f * i); + + Draw.color(); + }); + + shellEjectMedium = new GroundEffect(34f, 400f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); + float rot = e.rotation + 90f; + for(int i : Mathf.signs){ + float len = (2f + e.finpow() * 10f) * i; + float lr = rot + e.fin() * 20f * i; + Draw.rect(Core.atlas.find("casing"), + e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), + e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), + 2f, 3f, rot); + } + + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + for(int i : Mathf.signs){ + Angles.randLenVectors(e.id, 4, 1f + e.finpow() * 11f, e.rotation + 90f * i, 20f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); + }); + } + + Draw.color(); + }); + + shellEjectBig = new GroundEffect(22f, 400f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); + float rot = e.rotation + 90f; + for(int i : Mathf.signs){ + float len = (4f + e.finpow() * 8f) * i; + float lr = rot + Mathf.randomSeedRange(e.id + i + 6, 20f * e.fin()) * i; + Draw.rect(Core.atlas.find("casing"), + e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), + e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), + 2.5f, 4f, + rot + e.fin() * 30f * i + Mathf.randomSeedRange(e.id + i + 9, 40f * e.fin())); + } + + Draw.color(Color.LIGHT_GRAY); + + for(int i : Mathf.signs){ + Angles.randLenVectors(e.id, 4, -e.finpow() * 15f, e.rotation + 90f * i, 25f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2f); + }); + } + + Draw.color(); + }); + + lancerLaserShoot = new Effect(21f, e -> { + Draw.color(Palette.lancerLaser); + + for(int i : Mathf.signs){ + Shapes.tri(e.x, e.y, 4f * e.fout(), 29f, e.rotation + 90f * i); + } + + Draw.reset(); + }); + + lancerLaserShootSmoke = new Effect(26f, e -> { + Draw.color(Palette.lancerLaser); + + Angles.randLenVectors(e.id, 7, 80f, e.rotation, 0f, (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fout() * 9f); + }); + + Draw.reset(); + }); + + lancerLaserCharge = new Effect(38f, e -> { + Draw.color(Palette.lancerLaser); + + Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 3f + 1f); + }); + + Draw.reset(); + }); + + lancerLaserChargeBegin = new Effect(71f, e -> { + Draw.color(Palette.lancerLaser); + Fill.circle(e.x, e.y, e.fin() * 3f); + + Draw.color(); + Fill.circle(e.x, e.y, e.fin() * 2f); + }); + + lightningCharge = new Effect(38f, e -> { + Draw.color(Palette.lancerLaser); + + Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { + Shapes.tri(e.x + x, e.y + y, e.fslope() * 3f + 1, e.fslope() * 3f + 1, Mathf.angle(x, y)); + }); + + Draw.reset(); + }); + + lightningShoot = new Effect(12f, e -> { + Draw.color(Color.WHITE, Palette.lancerLaser, e.fin()); + Lines.stroke(e.fout() * 1.2f + 0.5f); + + Angles.randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 50f, (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 5f + 2f); + }); + + Draw.reset(); + }); + } + + @Override + public ContentType type(){ + return ContentType.effect; + } +} diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index 5ec66db65c..01df597434 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -9,8 +9,6 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.UnitFx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.effect.Lightning; @@ -68,7 +66,7 @@ public class Mechs implements ContentList{ public void onLand(Player player){ if(player.timer.get(Player.timerAbility, cooldown)){ Effects.shake(1f, 1f, player); - Effects.effect(UnitFx.landShock, player); + Effects.effect(Fx.landShock, player); for(int i = 0; i < 8; i++){ Time.run(Mathf.random(8f), () -> Lightning.create(player.getTeam(), Palette.lancerLaser, 17f, player.x, player.y, Mathf.random(360f), 14)); } @@ -109,7 +107,7 @@ public class Mechs implements ContentList{ Units.getNearby(player.getTeam(), rect, unit -> { if(unit.dst(player) <= healRange){ if(unit.health < unit.maxHealth()){ - Effects.effect(UnitFx.heal, unit); + Effects.effect(Fx.heal, unit); wasHealed = true; } unit.healBy(healAmount); @@ -117,7 +115,7 @@ public class Mechs implements ContentList{ }); if(wasHealed){ - Effects.effect(UnitFx.healWave, player); + Effects.effect(Fx.healWave, player); } } } @@ -228,7 +226,7 @@ public class Mechs implements ContentList{ public void updateAlt(Player player){ float scl = scld(player); if(Mathf.chance(Time.delta() * (0.15*scl))){ - Effects.effect(BulletFx.hitLancer, Palette.lancerLaser, player.x, player.y); + Effects.effect(Fx.hitLancer, Palette.lancerLaser, player.x, player.y); Lightning.create(player.getTeam(), Palette.lancerLaser, 10f, player.x + player.velocity().x, player.y + player.velocity().y, player.rotation, 14); } diff --git a/core/src/io/anuke/mindustry/content/StatusEffects.java b/core/src/io/anuke/mindustry/content/StatusEffects.java index 9162d9be3a..eb37c73e11 100644 --- a/core/src/io/anuke/mindustry/content/StatusEffects.java +++ b/core/src/io/anuke/mindustry/content/StatusEffects.java @@ -3,7 +3,6 @@ package io.anuke.mindustry.content; import io.anuke.arc.entities.Effects; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.EnvironmentFx; import io.anuke.mindustry.entities.StatusController.StatusEntry; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.game.ContentList; @@ -27,7 +26,7 @@ public class StatusEffects implements ContentList{ public StatusEntry getTransition(Unit unit, StatusEffect to, float time, float newTime, StatusEntry result){ if(to == tarred){ unit.damage(1f); - Effects.effect(EnvironmentFx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); return result.set(this, Math.min(time + newTime, baseDuration + tarred.baseDuration)); } @@ -39,7 +38,7 @@ public class StatusEffects implements ContentList{ unit.damagePeriodic(0.04f); if(Mathf.chance(Time.delta() * 0.2f)){ - Effects.effect(EnvironmentFx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -55,7 +54,7 @@ public class StatusEffects implements ContentList{ public void update(Unit unit, float time){ if(Mathf.chance(Time.delta() * 0.15f)){ - Effects.effect(EnvironmentFx.freezing, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.freezing, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -80,7 +79,7 @@ public class StatusEffects implements ContentList{ @Override public void update(Unit unit, float time){ if(Mathf.chance(Time.delta() * 0.15f)){ - Effects.effect(EnvironmentFx.wet, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.wet, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -106,7 +105,7 @@ public class StatusEffects implements ContentList{ unit.damagePeriodic(0.3f); if(Mathf.chance(Time.delta() * 0.2f)){ - Effects.effect(EnvironmentFx.melting, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.melting, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -119,7 +118,7 @@ public class StatusEffects implements ContentList{ @Override public void update(Unit unit, float time){ if(Mathf.chance(Time.delta() * 0.15f)){ - Effects.effect(EnvironmentFx.oily, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.oily, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } @@ -146,7 +145,7 @@ public class StatusEffects implements ContentList{ unit.health += 0.01f * Time.delta(); if(Mathf.chance(Time.delta() * 0.25f)){ - Effects.effect(EnvironmentFx.overdriven, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f), 0f, unit); + Effects.effect(Fx.overdriven, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f), 0f, unit); } } }; diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index 20fa1f5804..e731067a45 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -1,7 +1,5 @@ package io.anuke.mindustry.content; -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Weapon; @@ -17,7 +15,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 14f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardMechSmall; }}; @@ -25,7 +23,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 15f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardCopper; }}; @@ -33,7 +31,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 10f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardGlaive; }}; @@ -42,7 +40,7 @@ public class Weapons implements ContentList{ reload = 25f; width = 1f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardCopper; }}; @@ -84,7 +82,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 28f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardCopper; }}; @@ -107,7 +105,7 @@ public class Weapons implements ContentList{ inaccuracy = 3f; recoil = 3f; velocityRnd = 0.1f; - ejectEffect = ShootFx.shellEjectMedium; + ejectEffect = Fx.shellEjectMedium; ammo = Bullets.artilleryDense; }}; @@ -126,7 +124,7 @@ public class Weapons implements ContentList{ roundrobin = true; recoil = 5f; shake = 2f; - ejectEffect = ShootFx.shellEjectMedium; + ejectEffect = Fx.shellEjectMedium; ammo = Bullets.artilleryUnit; }}; diff --git a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java index 0933c8a0fb..034480bdcf 100644 --- a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.world.Block; @@ -29,7 +29,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ arcsmelter = new PowerSmelter("arc-smelter"){{ health = 90; - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.densealloy; craftTime = 30f; size = 2; @@ -43,7 +43,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ siliconsmelter = new PowerSmelter("silicon-smelter"){{ health = 90; - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.silicon; craftTime = 40f; size = 2; @@ -63,8 +63,8 @@ public class CraftingBlocks extends BlockList implements ContentList{ size = 2; health = 320; hasPower = hasLiquids = true; - craftEffect = BlockFx.formsmoke; - updateEffect = BlockFx.plasticburn; + craftEffect = Fx.formsmoke; + updateEffect = Fx.plasticburn; consumes.liquid(Liquids.oil, 0.25f); consumes.power(0.3f); @@ -72,7 +72,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ }}; phaseWeaver = new PhaseWeaver("phase-weaver"){{ - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.phasefabric; craftTime = 120f; size = 2; @@ -82,7 +82,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ }}; alloySmelter = new PowerSmelter("alloy-smelter"){{ - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.surgealloy; craftTime = 75f; size = 2; @@ -207,9 +207,9 @@ public class CraftingBlocks extends BlockList implements ContentList{ itemCapacity = 40; output = Items.sand; health = 80; - craftEffect = BlockFx.pulverize; + craftEffect = Fx.pulverize; craftTime = 40f; - updateEffect = BlockFx.pulverizeSmall; + updateEffect = Fx.pulverizeSmall; hasItems = hasPower = true; consumes.item(Items.stone, 1); @@ -222,7 +222,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ output = Items.stone; itemCapacity = 20; health = 80; - craftEffect = BlockFx.purifystone; + craftEffect = Fx.purifystone; hasLiquids = hasItems = true; consumes.liquid(Liquids.lava, 1f); diff --git a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java index 9f67d7fe7f..84e48c3207 100644 --- a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.content.blocks; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.defense.*; @@ -64,8 +64,8 @@ public class DefenseBlocks extends BlockList implements ContentList{ }}; doorLarge = new Door("door-large"){{ - openfx = BlockFx.dooropenlarge; - closefx = BlockFx.doorcloselarge; + openfx = Fx.dooropenlarge; + closefx = Fx.doorcloselarge; health = 100 * 4 * wallHealthMultiplier; size = 2; }}; diff --git a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java index 843541ca64..af35629803 100644 --- a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java @@ -1,10 +1,9 @@ package io.anuke.mindustry.content.blocks; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.power.*; public class PowerBlocks extends BlockList implements ContentList{ @@ -21,7 +20,7 @@ public class PowerBlocks extends BlockList implements ContentList{ thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{ maxLiquidGenerate = 2f; powerProduction = 2f; - generateEffect = BlockFx.redgeneratespark; + generateEffect = Fx.redgeneratespark; size = 2; }}; diff --git a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java index 101db89ec7..30a5f8f5a5 100644 --- a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.production.Cultivator; @@ -35,8 +35,8 @@ public class ProductionBlocks extends BlockList implements ContentList{ size = 2; hasPower = true; tier = 4; - updateEffect = BlockFx.pulverizeMedium; - drillEffect = BlockFx.mineBig; + updateEffect = Fx.pulverizeMedium; + drillEffect = Fx.mineBig; consumes.power(0.11f); }}; @@ -47,9 +47,9 @@ public class ProductionBlocks extends BlockList implements ContentList{ drawRim = true; hasPower = true; tier = 5; - updateEffect = BlockFx.pulverizeRed; + updateEffect = Fx.pulverizeRed; updateEffectChance = 0.03f; - drillEffect = BlockFx.mineHuge; + drillEffect = Fx.mineHuge; rotateSpeed = 6f; warmupSpeed = 0.01f; @@ -65,9 +65,9 @@ public class ProductionBlocks extends BlockList implements ContentList{ tier = 5; rotateSpeed = 9f; drawRim = true; - updateEffect = BlockFx.pulverizeRedder; + updateEffect = Fx.pulverizeRedder; updateEffectChance = 0.04f; - drillEffect = BlockFx.mineHuge; + drillEffect = Fx.mineHuge; warmupSpeed = 0.005f; consumes.power(0.7f); @@ -85,7 +85,7 @@ public class ProductionBlocks extends BlockList implements ContentList{ oilExtractor = new Fracker("oil-extractor"){{ result = Liquids.oil; - updateEffect = BlockFx.pulverize; + updateEffect = Fx.pulverize; liquidCapacity = 50f; updateEffectChance = 0.05f; pumpAmount = 0.09f; diff --git a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java index f1a7ac794b..dd963b0a6e 100644 --- a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java @@ -5,7 +5,7 @@ import io.anuke.arc.graphics.g2d.Draw; import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.ShootFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.defense.turrets.*; @@ -27,7 +27,7 @@ public class TurretBlocks extends BlockList implements ContentList{ restitution = 0.03f; range = 90f; shootCone = 15f; - ammoUseEffect = ShootFx.shellEjectSmall; + ammoUseEffect = Fx.shellEjectSmall; health = 80; inaccuracy = 2f; rotatespeed = 10f; @@ -52,7 +52,7 @@ public class TurretBlocks extends BlockList implements ContentList{ recoil = 0f; reload = 4f; shootCone = 50f; - ammoUseEffect = ShootFx.shellEjectSmall; + ammoUseEffect = Fx.shellEjectSmall; health = 160; }}; @@ -68,7 +68,7 @@ public class TurretBlocks extends BlockList implements ContentList{ reload = 4f; inaccuracy = 5f; shootCone = 50f; - shootEffect = ShootFx.shootLiquid; + shootEffect = Fx.shootLiquid; range = 90f; health = 360; @@ -94,10 +94,10 @@ public class TurretBlocks extends BlockList implements ContentList{ powerUsed = 1 / 3f; consumes.powerBuffered(60f); shootShake = 2f; - shootEffect = ShootFx.lancerLaserShoot; - smokeEffect = ShootFx.lancerLaserShootSmoke; - chargeEffect = ShootFx.lancerLaserCharge; - chargeBeginEffect = ShootFx.lancerLaserChargeBegin; + shootEffect = Fx.lancerLaserShoot; + smokeEffect = Fx.lancerLaserShootSmoke; + chargeEffect = Fx.lancerLaserCharge; + chargeBeginEffect = Fx.lancerLaserChargeBegin; heatColor = Color.RED; size = 2; health = 320; @@ -113,7 +113,7 @@ public class TurretBlocks extends BlockList implements ContentList{ powerUsed = 1f / 3f; consumes.powerBuffered(30f); range = 150f; - shootEffect = ShootFx.lightningShoot; + shootEffect = Fx.lightningShoot; heatColor = Color.RED; recoil = 1f; size = 1; @@ -154,7 +154,7 @@ public class TurretBlocks extends BlockList implements ContentList{ shootShake = 2f; burstSpacing = 4; shots = 3; - ammoUseEffect = ShootFx.shellEjectBig; + ammoUseEffect = Fx.shellEjectBig; health = 360; }}; @@ -171,7 +171,7 @@ public class TurretBlocks extends BlockList implements ContentList{ inaccuracy = 12f; reload = 60f; ammoEjectBack = 5f; - ammoUseEffect = ShootFx.shellEjectBig; + ammoUseEffect = Fx.shellEjectBig; cooldown = 0.03f; velocityInaccuracy = 0.2f; restitution = 0.02f; @@ -222,7 +222,7 @@ public class TurretBlocks extends BlockList implements ContentList{ coolantMultiplier = 0.5f; maxCoolantUsed = 1.5f; restitution = 0.1f; - ammoUseEffect = ShootFx.shellEjectBig; + ammoUseEffect = Fx.shellEjectBig; range = 200f; inaccuracy = 3f; recoil = 3f; @@ -238,7 +238,7 @@ public class TurretBlocks extends BlockList implements ContentList{ meltdown = new LaserTurret("meltdown"){{ shootType = Bullets.meltdownLaser; - shootEffect = ShootFx.shootBigSmoke2; + shootEffect = Fx.shootBigSmoke2; shootCone = 40f; recoil = 4f; size = 4; diff --git a/core/src/io/anuke/mindustry/content/fx/BlockFx.java b/core/src/io/anuke/mindustry/content/fx/BlockFx.java deleted file mode 100644 index 106582a241..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/BlockFx.java +++ /dev/null @@ -1,330 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.arc.util.Tmp; - -import static io.anuke.mindustry.Vars.tilesize; - -public class BlockFx extends FxList implements ContentList{ - public static Effect reactorsmoke, nuclearsmoke, nuclearcloud, redgeneratespark, generatespark, fuelburn, plasticburn, - pulverize, pulverizeRed, pulverizeRedder, pulverizeSmall, pulverizeMedium, producesmoke, smeltsmoke, formsmoke, blastsmoke, - lava, dooropen, doorclose, dooropenlarge, doorcloselarge, purify, purifyoil, purifystone, generate, mine, mineBig, mineHuge, - smelt, teleportActivate, teleport, teleportOut, ripple, bubble, commandSend, healBlock, healBlockFull, healWaveMend, overdriveWave, - overdriveBlockFull, shieldBreak; - - @Override - public void load(){ - - reactorsmoke = new Effect(17, e -> { - Angles.randLenVectors(e.id, 4, e.fin() * 8f, (x, y) -> { - float size = 1f + e.fout() * 5f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - nuclearsmoke = new Effect(40, e -> { - Angles.randLenVectors(e.id, 4, e.fin() * 13f, (x, y) -> { - float size = e.fslope() * 4f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - nuclearcloud = new Effect(90, 200f, e -> { - Angles.randLenVectors(e.id, 10, e.finpow() * 90f, (x, y) -> { - float size = e.fout() * 14f; - Draw.color(Color.LIME, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - redgeneratespark = new Effect(18, e -> { - Angles.randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> { - float len = e.fout() * 4f; - Draw.color(Palette.redSpark, Color.GRAY, e.fin()); - //Draw.alpha(e.fout()); - Draw.rect("circle", e.x + x, e.y + y, len, len); - Draw.reset(); - }); - }); - generatespark = new Effect(18, e -> { - Angles.randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> { - float len = e.fout() * 4f; - Draw.color(Palette.orangeSpark, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, len, len); - Draw.reset(); - }); - }); - fuelburn = new Effect(23, e -> { - Angles.randLenVectors(e.id, 5, e.fin() * 9f, (x, y) -> { - float len = e.fout() * 4f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, len, len); - Draw.reset(); - }); - }); - plasticburn = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> { - Draw.color(Color.valueOf("e9ead3"), Color.GRAY, e.fin()); - Fill.circle(e.x + x, e.y + y, e.fout() * 1f); - Draw.reset(); - }); - }); - pulverize = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.stoneGray); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeRed = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.redDust, Palette.stoneGray, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeRedder = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 9f, (x, y) -> { - Draw.color(Palette.redderDust, Palette.stoneGray, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2.5f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeSmall = new Effect(30, e -> { - Angles.randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> { - Draw.color(Palette.stoneGray); - Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeMedium = new Effect(30, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.stoneGray); - Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45); - Draw.reset(); - }); - }); - producesmoke = new Effect(12, e -> { - Angles.randLenVectors(e.id, 8, 4f + e.fin() * 18f, (x, y) -> { - Draw.color(Color.WHITE, Palette.accent, e.fin()); - Fill.square(e.x + x, e.y + y, 1f + e.fout() * 3f, 45); - Draw.reset(); - }); - }); - smeltsmoke = new Effect(15, e -> { - Angles.randLenVectors(e.id, 6, 4f + e.fin() * 5f, (x, y) -> { - Draw.color(Color.WHITE, e.color, e.fin()); - Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45); - Draw.reset(); - }); - }); - formsmoke = new Effect(40, e -> { - Angles.randLenVectors(e.id, 6, 5f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.plasticSmoke, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, 0.2f + e.fout() * 2f, 45); - Draw.reset(); - }); - }); - blastsmoke = new Effect(26, e -> { - Angles.randLenVectors(e.id, 12, 1f + e.fin() * 23f, (x, y) -> { - float size = 2f + e.fout() * 6f; - Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - lava = new Effect(18, e -> { - Angles.randLenVectors(e.id, 3, 1f + e.fin() * 10f, (x, y) -> { - float size = e.fslope() * 4f; - Draw.color(Color.ORANGE, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - dooropen = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize / 2f + e.fin() * 2f); - Draw.reset(); - }); - doorclose = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 2f); - Draw.reset(); - }); - dooropenlarge = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize + e.fin() * 2f); - Draw.reset(); - }); - doorcloselarge = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize + e.fout() * 2f); - Draw.reset(); - }); - purify = new Effect(10, e -> { - Draw.color(Color.ROYAL, Color.GRAY, e.fin()); - Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); - Draw.reset(); - }); - purifyoil = new Effect(10, e -> { - Draw.color(Color.BLACK, Color.GRAY, e.fin()); - Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); - Draw.reset(); - }); - purifystone = new Effect(10, e -> { - Draw.color(Color.ORANGE, Color.GRAY, e.fin()); - Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); - Draw.reset(); - }); - generate = new Effect(11, e -> { - Draw.color(Color.ORANGE, Color.YELLOW, e.fin()); - Lines.stroke(1f); - Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 8); - Draw.reset(); - }); - mine = new Effect(20, e -> { - Angles.randLenVectors(e.id, 6, 3f + e.fin() * 6f, (x, y) -> { - Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f, 45); - Draw.reset(); - }); - }); - mineBig = new Effect(30, e -> { - Angles.randLenVectors(e.id, 6, 4f + e.fin() * 8f, (x, y) -> { - Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.2f, 45); - Draw.reset(); - }); - }); - mineHuge = new Effect(40, e -> { - Angles.randLenVectors(e.id, 8, 5f + e.fin() * 10f, (x, y) -> { - Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); - Draw.reset(); - }); - }); - smelt = new Effect(20, e -> { - Angles.randLenVectors(e.id, 6, 2f + e.fin() * 5f, (x, y) -> { - Draw.color(Color.WHITE, e.color, e.fin()); - Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45); - Draw.reset(); - }); - }); - teleportActivate = new Effect(50, e -> { - Draw.color(e.color); - - e.scaled(8f, e2 -> { - Lines.stroke(e2.fout() * 4f); - Lines.circle(e2.x, e2.y, 4f + e2.fin() * 27f); - }); - - Lines.stroke(e.fout() * 2f); - - Angles.randLenVectors(e.id, 30, 4f + 40f * e.fin(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f); - }); - - Draw.reset(); - }); - teleport = new Effect(60, e -> { - Draw.color(e.color); - Lines.stroke(e.fin() * 2f); - Lines.circle(e.x, e.y, 7f + e.fout() * 8f); - - Angles.randLenVectors(e.id, 20, 6f + 20f * e.fout(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f); - }); - - Draw.reset(); - }); - teleportOut = new Effect(20, e -> { - Draw.color(e.color); - Lines.stroke(e.fout() * 2f); - Lines.circle(e.x, e.y, 7f + e.fin() * 8f); - - Angles.randLenVectors(e.id, 20, 4f + 20f * e.fin(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 4f + 1f); - }); - - Draw.reset(); - }); - ripple = new GroundEffect(false, 30, e -> { - Draw.color(Tmp.c1.set(e.color).shiftValue(0.1f)); - Lines.stroke(e.fout() + 0.4f); - Lines.circle(e.x, e.y, 2f + e.fin() * 4f); - Draw.reset(); - }); - - bubble = new Effect(20, e -> { - Draw.color(Tmp.c1.set(e.color).shiftValue(0.1f)); - Lines.stroke(e.fout() + 0.2f); - Angles.randLenVectors(e.id, 2, 8f, (x, y) -> { - Lines.circle(e.x + x, e.y + y, 1f + e.fin() * 3f); - }); - Draw.reset(); - }); - - commandSend = new Effect(28, e -> { - Draw.color(Palette.command); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 40, 4f + e.finpow() * 120f); - Draw.color(); - }); - - healWaveMend = new Effect(40, e -> { - Draw.color(e.color); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation); - Draw.color(); - }); - - overdriveWave = new Effect(50, e -> { - Draw.color(e.color); - Lines.stroke(e.fout() * 1f); - Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation); - Draw.color(); - }); - - healBlock = new Effect(20, e -> { - Draw.color(Palette.heal); - Lines.stroke(2f * e.fout() + 0.5f); - Lines.square(e.x, e.y, 1f + (e.fin() * e.rotation * tilesize/2f-1f)); - Draw.color(); - }); - - healBlockFull = new Effect(20, e -> { - Draw.color(e.color); - Draw.alpha(e.fout()); - Fill.square(e.x, e.y, e.rotation * tilesize / 2f); - Draw.color(); - }); - - overdriveBlockFull = new Effect(60, e -> { - Draw.color(e.color); - Draw.alpha(e.fslope() * 0.4f); - Fill.square(e.x, e.y, e.rotation * tilesize); - Draw.color(); - }); - - shieldBreak = new Effect(40, e -> { - Draw.color(Palette.accent); - Lines.stroke(3f * e.fout()); - Lines.poly(e.x, e.y, 6, e.rotation + e.fin(), 90); - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/BulletFx.java b/core/src/io/anuke/mindustry/content/fx/BulletFx.java deleted file mode 100644 index 3c6441b876..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/BulletFx.java +++ /dev/null @@ -1,281 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; - -public class BulletFx extends FxList implements ContentList{ - public static Effect hitBulletSmall, hitFuse, hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, hitMeltdown, despawn, flakExplosion, blastExplosion, plasticExplosion, - artilleryTrail, incendTrail, missileTrail, absorb, flakExplosionBig, plasticExplosionFlak; - - @Override - public void load(){ - - hitBulletSmall = new Effect(14, e -> { - Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); - - e.scaled(7f, s -> { - Lines.stroke(0.5f + s.fout()); - Lines.circle(e.x, e.y, s.fin()*5f); - }); - - - Lines.stroke(0.5f + e.fout()); - - Angles.randLenVectors(e.id, 5, e.fin() * 15f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); - }); - - Draw.reset(); - }); - - hitFuse = new Effect(14, e -> { - Draw.color(Color.WHITE, Palette.surge, e.fin()); - - e.scaled(7f, s -> { - Lines.stroke(0.5f + s.fout()); - Lines.circle(e.x, e.y, s.fin()*7f); - }); - - - Lines.stroke(0.5f + e.fout()); - - Angles.randLenVectors(e.id, 6, e.fin() * 15f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); - }); - - Draw.reset(); - }); - - hitBulletBig = new Effect(13, e -> { - Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); - Lines.stroke(0.5f + e.fout() * 1.5f); - - Angles.randLenVectors(e.id, 8, e.finpow() * 30f, e.rotation, 50f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1.5f); - }); - - Draw.reset(); - }); - - hitFlameSmall = new Effect(14, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - Lines.stroke(0.5f + e.fout()); - - Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation, 50f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); - }); - - Draw.reset(); - }); - - hitLiquid = new Effect(16, e -> { - Draw.color(e.color); - - Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation + 180f, 60f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2f); - }); - - Draw.reset(); - }); - - hitLancer = new Effect(12, e -> { - Draw.color(Color.WHITE); - Lines.stroke(e.fout() * 1.5f); - - Angles.randLenVectors(e.id, 8, e.finpow() * 17f, e.rotation, 360f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); - }); - - Draw.reset(); - }); - - hitMeltdown = new Effect(12, e -> { - Draw.color(Palette.meltdownHit); - Lines.stroke(e.fout() * 2f); - - Angles.randLenVectors(e.id, 6, e.finpow() * 18f, e.rotation, 360f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); - }); - - Draw.reset(); - }); - - hitLaser = new Effect(8, e -> { - Draw.color(Color.WHITE, Palette.heal, e.fin()); - Lines.stroke(0.5f + e.fout()); - Lines.circle(e.x, e.y, e.fin()*5f); - Draw.reset(); - }); - - despawn = new Effect(12, e -> { - Draw.color(Palette.lighterOrange, Color.GRAY, e.fin()); - Lines.stroke(e.fout()); - - Angles.randLenVectors(e.id, 7, e.fin() * 7f, e.rotation, 40f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 2 + 1f); - }); - - Draw.reset(); - }); - - flakExplosion = new Effect(20, e -> { - - Draw.color(Palette.bulletYellow); - e.scaled(6, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 10f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 5, 2f + 23f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); - }); - - Draw.color(Palette.lighterOrange); - Lines.stroke(1f * e.fout()); - - Angles.randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - plasticExplosion = new Effect(24, e -> { - - Draw.color(Palette.plastaniumFront); - e.scaled(7, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 24f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 7, 2f + 28f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); - }); - - Draw.color(Palette.plastaniumBack); - Lines.stroke(1f * e.fout()); - - Angles.randLenVectors(e.id + 1, 4, 1f + 25f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - plasticExplosionFlak = new Effect(28, e -> { - - Draw.color(Palette.plastaniumFront); - e.scaled(7, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 34f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 7, 2f + 30f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); - }); - - Draw.color(Palette.plastaniumBack); - Lines.stroke(1f * e.fout()); - - Angles.randLenVectors(e.id + 1, 4, 1f + 30f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - blastExplosion = new Effect(22, e -> { - - Draw.color(Palette.missileYellow); - e.scaled(6, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 15f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 5, 2f + 23f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); - }); - - Draw.color(Palette.missileYellowBack); - Lines.stroke(1f * e.fout()); - - Angles.randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - artilleryTrail = new Effect(50, e -> { - Draw.color(e.color); - Fill.circle(e.x, e.y, e.rotation * e.fout()); - Draw.reset(); - }); - - incendTrail = new Effect(50, e -> { - Draw.color(Palette.lightOrange); - Fill.circle(e.x, e.y, e.rotation * e.fout()); - Draw.reset(); - }); - - missileTrail = new Effect(50, e -> { - Draw.color(e.color); - Fill.circle(e.x, e.y, e.rotation * e.fout()); - Draw.reset(); - }); - - absorb = new Effect(12, e -> { - Draw.color(Palette.accent); - Lines.stroke(2f * e.fout()); - Lines.circle(e.x, e.y, 5f * e.fout()); - Draw.reset(); - }); - - flakExplosionBig = new Effect(30, e -> { - - Draw.color(Palette.bulletYellowBack); - e.scaled(6, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 25f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 2f + 23f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); - }); - - Draw.color(Palette.bulletYellow); - Lines.stroke(1f * e.fout()); - - Angles.randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - } - -} diff --git a/core/src/io/anuke/mindustry/content/fx/EnvironmentFx.java b/core/src/io/anuke/mindustry/content/fx/EnvironmentFx.java deleted file mode 100644 index 16b3c5e85a..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/EnvironmentFx.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.Color; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.type.Item; - -public class EnvironmentFx extends FxList implements ContentList{ - public static Effect burning, fire, smoke, steam, fireballsmoke, ballfire, freezing, melting, wet, oily, overdriven, dropItem; - - @Override - public void load(){ - - burning = new Effect(35f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - - Angles.randLenVectors(e.id, 3, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.1f + e.fout() * 1.4f); - }); - - Draw.color(); - }); - - fire = new Effect(35f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - - Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); - }); - - Draw.color(); - }); - - smoke = new Effect(35f, e -> { - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); - }); - - Draw.color(); - }); - - steam = new Effect(35f, e -> { - Draw.color(Color.LIGHT_GRAY); - - Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); - }); - - Draw.color(); - }); - - fireballsmoke = new Effect(25f, e -> { - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); - }); - - Draw.color(); - }); - - ballfire = new Effect(25f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - - Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); - }); - - Draw.color(); - }); - - freezing = new Effect(40f, e -> { - Draw.color(Liquids.cryofluid.color); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1.2f); - }); - - Draw.color(); - }); - - melting = new Effect(40f, e -> { - Draw.color(Liquids.lava.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f)); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 3f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f); - }); - - Draw.color(); - }); - - wet = new Effect(40f, e -> { - Draw.color(Liquids.water.color); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1f); - }); - - Draw.color(); - }); - - oily = new Effect(42f, e -> { - Draw.color(Liquids.oil.color); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1f); - }); - - Draw.color(); - }); - - overdriven = new Effect(20f, e -> { - Draw.color(Palette.accent); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.square(e.x + x, e.y + y, e.fout() * 2.3f+0.5f); - }); - - Draw.color(); - }); - - dropItem = new Effect(20f, e -> { - float length = 20f * e.finpow(); - float size = 7f * e.fout(); - - Draw.rect(((Item) e.data).region, e.x + Angles.trnsx(e.rotation, length), e.y + Angles.trnsy(e.rotation, length), size, size); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/ExplosionFx.java b/core/src/io/anuke/mindustry/content/fx/ExplosionFx.java deleted file mode 100644 index 6d823b0e48..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/ExplosionFx.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; - -public class ExplosionFx extends FxList implements ContentList{ - public static Effect shockwave, bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke; - - @Override - public void load(){ - - shockwave = new Effect(10f, 80f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); - Lines.stroke(e.fout() * 2f + 0.2f); - Lines.circle(e.x, e.y, e.fin() * 28f); - Draw.reset(); - }); - - bigShockwave = new Effect(10f, 80f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); - Lines.stroke(e.fout() * 3f); - Lines.circle(e.x, e.y, e.fin() * 50f); - Draw.reset(); - }); - - nuclearShockwave = new Effect(10f, 200f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); - Lines.stroke(e.fout() * 3f + 0.2f); - Lines.poly(e.x, e.y, 40, e.fin() * 140f); - Draw.reset(); - }); - - explosion = new Effect(30, e -> { - e.scaled(7, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 10f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); - Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); - }); - - Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); - Lines.stroke(1.5f * e.fout()); - - Angles.randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - blockExplosion = new Effect(30, e -> { - e.scaled(7, i -> { - Lines.stroke(3.1f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 14f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); - Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); - }); - - Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); - Lines.stroke(1.7f * e.fout()); - - Angles.randLenVectors(e.id + 1, 9, 1f + 23f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - blockExplosionSmoke = new Effect(30, e -> { - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 4f + 30f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 3f); - Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); - }); - - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/Fx.java b/core/src/io/anuke/mindustry/content/fx/Fx.java deleted file mode 100644 index e544459e79..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/Fx.java +++ /dev/null @@ -1,69 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; - -import static io.anuke.mindustry.Vars.tilesize; - -public class Fx extends FxList implements ContentList{ - public static Effect none, placeBlock, breakBlock, smoke, spawn, tapBlock, select; - - @Override - public void load(){ - - none = new Effect(0, 0f, e -> { - }); - - placeBlock = new Effect(16, e -> { - Draw.color(Palette.accent); - Lines.stroke(3f - e.fin() * 2f); - Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); - Draw.reset(); - }); - - tapBlock = new Effect(12, e -> { - Draw.color(Palette.accent); - Lines.stroke(3f - e.fin() * 2f); - Lines.circle(e.x, e.y, 4f + (tilesize / 1.5f * e.rotation) * e.fin()); - Draw.reset(); - }); - - breakBlock = new Effect(12, e -> { - Draw.color(Palette.remove); - Lines.stroke(3f - e.fin() * 2f); - Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); - - Angles.randLenVectors(e.id, 3 + (int) (e.rotation * 3), e.rotation * 2f + (tilesize * e.rotation) * e.finpow(), (x, y) -> { - Fill.square(e.x + x, e.y + y, 1f + e.fout() * (3f + e.rotation)); - }); - Draw.reset(); - }); - - select = new Effect(23, e -> { - Draw.color(Palette.accent); - Lines.stroke(e.fout() * 3f); - Lines.circle(e.x, e.y, 3f + e.fin() * 14f); - Draw.reset(); - }); - - smoke = new Effect(100, e -> { - Draw.color(Color.GRAY, Palette.darkishGray, e.fin()); - float size = 7f - e.fin() * 7f; - Draw.rect("circle", e.x, e.y, size, size); - Draw.reset(); - }); - - spawn = new Effect(23, e -> { - Lines.stroke(2f * e.fout()); - Draw.color(Palette.accent); - Lines.poly(e.x, e.y, 4, 3f + e.fin() * 8f); - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/FxList.java b/core/src/io/anuke/mindustry/content/fx/FxList.java deleted file mode 100644 index 3809d32391..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/FxList.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; - -public abstract class FxList implements ContentList{ - - @Override - public ContentType type(){ - return ContentType.effect; - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/ShootFx.java b/core/src/io/anuke/mindustry/content/fx/ShootFx.java deleted file mode 100644 index 39b96c6161..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/ShootFx.java +++ /dev/null @@ -1,225 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.Core; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.Color; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.graphics.Shapes; - -public class ShootFx extends FxList implements ContentList{ - public static Effect shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke, shootBigSmoke2, shootSmallFlame, shootLiquid, shellEjectSmall, shellEjectMedium, shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot; - - @Override - public void load(){ - - shootSmall = new Effect(8, e -> { - Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); - float w = 1f + 5 * e.fout(); - Shapes.tri(e.x, e.y, w, 15f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootHeal = new Effect(8, e -> { - Draw.color(Palette.heal); - float w = 1f + 5 * e.fout(); - Shapes.tri(e.x, e.y, w, 17f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootSmallSmoke = new Effect(20f, e -> { - Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 5, e.finpow() * 6f, e.rotation, 20f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); - }); - - Draw.reset(); - }); - - shootBig = new Effect(9, e -> { - Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); - float w = 1.2f + 7 * e.fout(); - Shapes.tri(e.x, e.y, w, 25f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootBig2 = new Effect(10, e -> { - Draw.color(Palette.lightOrange, Color.GRAY, e.fin()); - float w = 1.2f + 8 * e.fout(); - Shapes.tri(e.x, e.y, w, 29f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 5f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootBigSmoke = new Effect(17f, e -> { - Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 8, e.finpow() * 19f, e.rotation, 10f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2f + 0.2f); - }); - - Draw.reset(); - }); - - shootBigSmoke2 = new Effect(18f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 9, e.finpow() * 23f, e.rotation, 20f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2.4f + 0.2f); - }); - - Draw.reset(); - }); - - shootSmallFlame = new Effect(30f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 8, e.finpow() * 36f, e.rotation, 10f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.5f); - }); - - Draw.reset(); - }); - - shootLiquid = new Effect(40f, e -> { - Draw.color(e.color, Color.WHITE, e.fout() / 6f + Mathf.randomSeedRange(e.id, 0.1f)); - - Angles.randLenVectors(e.id, 6, e.finpow() * 60f, e.rotation, 11f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.5f + e.fout() * 2.5f); - }); - - Draw.reset(); - }); - - shellEjectSmall = new GroundEffect(30f, 400f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); - float rot = Math.abs(e.rotation) + 90f; - - int i = Mathf.sign(e.rotation); - - float len = (2f + e.finpow() * 6f) * i; - float lr = rot + e.fin() * 30f * i; - Fill.rect(e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), - e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), - 1f, 2f, rot + e.fin() * 50f * i); - - Draw.color(); - }); - - shellEjectMedium = new GroundEffect(34f, 400f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); - float rot = e.rotation + 90f; - for(int i : Mathf.signs){ - float len = (2f + e.finpow() * 10f) * i; - float lr = rot + e.fin() * 20f * i; - Draw.rect(Core.atlas.find("casing"), - e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), - e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), - 2f, 3f, rot); - } - - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - for(int i : Mathf.signs){ - Angles.randLenVectors(e.id, 4, 1f + e.finpow() * 11f, e.rotation + 90f * i, 20f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); - }); - } - - Draw.color(); - }); - - shellEjectBig = new GroundEffect(22f, 400f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); - float rot = e.rotation + 90f; - for(int i : Mathf.signs){ - float len = (4f + e.finpow() * 8f) * i; - float lr = rot + Mathf.randomSeedRange(e.id + i + 6, 20f * e.fin()) * i; - Draw.rect(Core.atlas.find("casing"), - e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), - e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), - 2.5f, 4f, - rot + e.fin() * 30f * i + Mathf.randomSeedRange(e.id + i + 9, 40f * e.fin())); - } - - Draw.color(Color.LIGHT_GRAY); - - for(int i : Mathf.signs){ - Angles.randLenVectors(e.id, 4, -e.finpow() * 15f, e.rotation + 90f * i, 25f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2f); - }); - } - - Draw.color(); - }); - - lancerLaserShoot = new Effect(21f, e -> { - Draw.color(Palette.lancerLaser); - - for(int i : Mathf.signs){ - Shapes.tri(e.x, e.y, 4f * e.fout(), 29f, e.rotation + 90f * i); - } - - Draw.reset(); - }); - - lancerLaserShootSmoke = new Effect(26f, e -> { - Draw.color(Palette.lancerLaser); - - Angles.randLenVectors(e.id, 7, 80f, e.rotation, 0f, (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fout() * 9f); - }); - - Draw.reset(); - }); - - lancerLaserCharge = new Effect(38f, e -> { - Draw.color(Palette.lancerLaser); - - Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 3f + 1f); - }); - - Draw.reset(); - }); - - lancerLaserChargeBegin = new Effect(71f, e -> { - Draw.color(Palette.lancerLaser); - Fill.circle(e.x, e.y, e.fin() * 3f); - - Draw.color(); - Fill.circle(e.x, e.y, e.fin() * 2f); - }); - - lightningCharge = new Effect(38f, e -> { - Draw.color(Palette.lancerLaser); - - Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { - Shapes.tri(e.x + x, e.y + y, e.fslope() * 3f + 1, e.fslope() * 3f + 1, Mathf.angle(x, y)); - }); - - Draw.reset(); - }); - - lightningShoot = new Effect(12f, e -> { - Draw.color(Color.WHITE, Palette.lancerLaser, e.fin()); - Lines.stroke(e.fout() * 1.2f + 0.5f); - - Angles.randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 50f, (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 5f + 2f); - }); - - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/UnitFx.java b/core/src/io/anuke/mindustry/content/fx/UnitFx.java deleted file mode 100644 index e58fba9d8b..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/UnitFx.java +++ /dev/null @@ -1,78 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; - -public class UnitFx extends FxList implements ContentList{ - public static Effect vtolHover, unitDrop, unitPickup, unitLand, pickup, healWave, heal, landShock; - - @Override - public void load(){ - - vtolHover = new Effect(40f, e -> { - float len = e.finpow() * 10f; - float ang = e.rotation + Mathf.randomSeedRange(e.id, 30f); - Draw.color(Palette.lightFlame, Palette.lightOrange, e.fin()); - Fill.circle(e.x + Angles.trnsx(ang, len), e.y + Angles.trnsy(ang, len), 2f * e.fout()); - Draw.reset(); - }); - - unitDrop = new GroundEffect(30, e -> { - Draw.color(Palette.lightishGray); - Angles.randLenVectors(e.id, 9, 3 + 20f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.4f); - }); - Draw.reset(); - }); - - unitLand = new GroundEffect(30, e -> { - Draw.color(Palette.lightishGray, e.color, e.rotation); - Angles.randLenVectors(e.id, 6, 17f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.3f); - }); - Draw.reset(); - }); - - unitPickup = new GroundEffect(18, e -> { - Draw.color(Palette.lightishGray); - Lines.stroke(e.fin() * 2f); - Lines.poly(e.x, e.y, 4, 13f * e.fout()); - Draw.reset(); - }); - - landShock = new GroundEffect(12, e -> { - Draw.color(Palette.lancerLaser); - Lines.stroke(e.fout() * 3f); - Lines.poly(e.x, e.y, 12, 20f * e.fout()); - Draw.reset(); - }); - - pickup = new Effect(18, e -> { - Draw.color(Palette.lightishGray); - Lines.stroke(e.fout() * 2f); - Lines.spikes(e.x, e.y, 1f + e.fin() * 6f, e.fout() * 4f, 6); - Draw.reset(); - }); - - healWave = new Effect(22, e -> { - Draw.color(Palette.heal); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 30, 4f + e.finpow() * 60f); - Draw.color(); - }); - - heal = new Effect(11, e -> { - Draw.color(Palette.heal); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 10, 2f + e.finpow() * 7f); - Draw.color(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index e425e33e21..bb7b015539 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -7,7 +7,6 @@ import io.anuke.arc.function.Consumer; import io.anuke.arc.util.Log; import io.anuke.mindustry.content.*; import io.anuke.mindustry.content.blocks.*; -import io.anuke.mindustry.content.fx.*; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; @@ -41,13 +40,7 @@ public class ContentLoader{ private ObjectSet> initialization = new ObjectSet<>(); private ContentList[] content = { //effects - new BlockFx(), - new BulletFx(), - new EnvironmentFx(), - new ExplosionFx(), new Fx(), - new ShootFx(), - new UnitFx(), //items new Items(), diff --git a/core/src/io/anuke/mindustry/core/Renderer.java b/core/src/io/anuke/mindustry/core/Renderer.java index cff7944281..05477315ef 100644 --- a/core/src/io/anuke/mindustry/core/Renderer.java +++ b/core/src/io/anuke/mindustry/core/Renderer.java @@ -21,7 +21,7 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.ScreenRecorder; import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pools; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; diff --git a/core/src/io/anuke/mindustry/entities/Damage.java b/core/src/io/anuke/mindustry/entities/Damage.java index 49ad873375..e8b51dbf35 100644 --- a/core/src/io/anuke/mindustry/entities/Damage.java +++ b/core/src/io/anuke/mindustry/entities/Damage.java @@ -11,7 +11,7 @@ import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.fx.ExplosionFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.effect.Fire; import io.anuke.mindustry.entities.effect.Lightning; @@ -46,21 +46,21 @@ public class Damage{ int f = i; Time.run(i * 2f, () -> { Damage.damage(x, y, Mathf.clamp(radius + explosiveness, 0, 50f) * ((f + 1f) / waves), explosiveness / 2f); - Effects.effect(ExplosionFx.blockExplosionSmoke, x + Mathf.range(radius), y + Mathf.range(radius)); + Effects.effect(Fx.blockExplosionSmoke, x + Mathf.range(radius), y + Mathf.range(radius)); }); } if(explosiveness > 15f){ - Effects.effect(ExplosionFx.shockwave, x, y); + Effects.effect(Fx.shockwave, x, y); } if(explosiveness > 30f){ - Effects.effect(ExplosionFx.bigShockwave, x, y); + Effects.effect(Fx.bigShockwave, x, y); } float shake = Math.min(explosiveness / 4f + 3f, 9f); Effects.shake(shake, shake, x, y); - Effects.effect(ExplosionFx.blockExplosion, x, y); + Effects.effect(Fx.blockExplosion, x, y); } public static void createIncend(float x, float y, float range, int amount){ diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 2410644da8..7ea5dd7797 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -20,7 +20,7 @@ import io.anuke.arc.util.Pack; import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Mechs; -import io.anuke.mindustry.content.fx.UnitFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.effect.ScorchDecal; import io.anuke.mindustry.entities.traits.*; import io.anuke.mindustry.game.Team; @@ -502,7 +502,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra if(mech.shake > 1f){ Effects.shake(mech.shake, mech.shake, this); } - Effects.effect(UnitFx.unitLand, tile.floor().minimapColor, x, y, tile.floor().isLiquid ? 1f : 0.5f); + Effects.effect(Fx.unitLand, tile.floor().minimapColor, x, y, tile.floor().isLiquid ? 1f : 0.5f); } mech.onLand(this); achievedFlight = false; diff --git a/core/src/io/anuke/mindustry/entities/TileEntity.java b/core/src/io/anuke/mindustry/entities/TileEntity.java index a48defd085..c77d797f8a 100644 --- a/core/src/io/anuke/mindustry/entities/TileEntity.java +++ b/core/src/io/anuke/mindustry/entities/TileEntity.java @@ -13,7 +13,7 @@ import io.anuke.arc.math.geom.Point2; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Interval; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.traits.TargetTrait; import io.anuke.mindustry.game.Team; diff --git a/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java index ed25df2f5d..ee5237a2c8 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java @@ -1,13 +1,13 @@ package io.anuke.mindustry.entities.bullet; -import io.anuke.mindustry.content.fx.BulletFx; import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.mindustry.content.Fx; //TODO scale velocity depending on fslope() public class ArtilleryBulletType extends BasicBulletType{ - protected Effect trailEffect = BulletFx.artilleryTrail; + protected Effect trailEffect = Fx.artilleryTrail; public ArtilleryBulletType(float speed, float damage, String bulletSprite){ super(speed, damage, bulletSprite); diff --git a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java index 3ac82c565b..10002296bf 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java @@ -3,8 +3,7 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.ShootFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.StatusEffect; @@ -21,9 +20,9 @@ public abstract class BulletType extends Content{ public Effect hitEffect, despawnEffect; /**Effect created when shooting.*/ - public Effect shootEffect = ShootFx.shootSmall; + public Effect shootEffect = Fx.shootSmall; /**Extra smoke effect created when shooting.*/ - public Effect smokeEffect = ShootFx.shootSmallSmoke; + public Effect smokeEffect = Fx.shootSmallSmoke; /**Extra inaccuracy when firing.*/ public float inaccuracy = 0f; /**How many bullets get created per ammo item/liquid.*/ @@ -61,8 +60,8 @@ public abstract class BulletType extends Content{ this.speed = speed; this.damage = damage; lifetime = 40f; - hitEffect = BulletFx.hitBulletSmall; - despawnEffect = BulletFx.hitBulletSmall; + hitEffect = Fx.hitBulletSmall; + despawnEffect = Fx.hitBulletSmall; } /**Returns maximum distance the bullet this bullet type has can travel.*/ diff --git a/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java index b18ff21368..908bd3f17b 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.arc.math.geom.Rectangle; -import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Units; import io.anuke.arc.util.Time; @@ -13,7 +13,7 @@ public abstract class FlakBulletType extends BasicBulletType{ super(speed, damage, "shell"); splashDamage = 15f; splashDamageRadius = 34f; - hitEffect = BulletFx.flakExplosionBig; + hitEffect = Fx.flakExplosionBig; bulletWidth = 8f; bulletHeight = 10f; } diff --git a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java index 90a396839d..b7a74f4486 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java @@ -7,8 +7,7 @@ import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Point2; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.effect.Fire; import io.anuke.mindustry.entities.effect.Puddle; import io.anuke.mindustry.type.Liquid; @@ -28,7 +27,7 @@ public class LiquidBulletType extends BulletType{ status = liquid.effect; statusIntensity = 0.5f; despawnEffect = Fx.none; - hitEffect = BulletFx.hitLiquid; + hitEffect = Fx.hitLiquid; drag = 0.01f; knockback = 0.5f; } diff --git a/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java b/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java index b263b81ab6..a10421113a 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java +++ b/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java @@ -5,9 +5,7 @@ import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.world.blocks.distribution.MassDriver.DriverBulletData; @@ -19,8 +17,8 @@ public class MassDriverBolt extends BulletType{ super(5.3f, 50); collidesTiles = false; lifetime = 200f; - despawnEffect = BlockFx.smeltsmoke; - hitEffect = BulletFx.hitBulletBig; + despawnEffect = Fx.smeltsmoke; + hitEffect = Fx.hitBulletBig; drag = 0.005f; } @@ -96,7 +94,7 @@ public class MassDriverBolt extends BulletType{ int amountDropped = Mathf.random(0, data.items[i]); if(amountDropped > 0){ float angle = b.rot() + Mathf.range(100f); - Effects.effect(EnvironmentFx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i)); + Effects.effect(Fx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i)); } } } diff --git a/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java index b62b83787a..6200666f1f 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.graphics.Palette; import io.anuke.arc.entities.Effects; import io.anuke.arc.util.Time; @@ -25,7 +25,7 @@ public class MissileBulletType extends BasicBulletType{ super.update(b); if(Mathf.chance(Time.delta() * 0.2)){ - Effects.effect(BulletFx.missileTrail, trailColor, b.x, b.y, 2f); + Effects.effect(Fx.missileTrail, trailColor, b.x, b.y, 2f); } if(weaveMag > 0){ diff --git a/core/src/io/anuke/mindustry/entities/effect/Fire.java b/core/src/io/anuke/mindustry/entities/effect/Fire.java index 359a0b1d09..4ca534df54 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Fire.java +++ b/core/src/io/anuke/mindustry/entities/effect/Fire.java @@ -15,7 +15,7 @@ import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.traits.SaveTrait; @@ -93,11 +93,11 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable{ @Override public void update(){ if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.fire, x + Mathf.range(4f), y + Mathf.range(4f)); + Effects.effect(Fx.fire, x + Mathf.range(4f), y + Mathf.range(4f)); } if(Mathf.chance(0.05 * Time.delta())){ - Effects.effect(EnvironmentFx.smoke, x + Mathf.range(4f), y + Mathf.range(4f)); + Effects.effect(Fx.fireSmoke, x + Mathf.range(4f), y + Mathf.range(4f)); } if(Net.client()){ diff --git a/core/src/io/anuke/mindustry/entities/effect/Puddle.java b/core/src/io/anuke/mindustry/entities/effect/Puddle.java index e134b9a069..167d6f08e9 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Puddle.java +++ b/core/src/io/anuke/mindustry/entities/effect/Puddle.java @@ -21,8 +21,7 @@ import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Liquids; import io.anuke.mindustry.content.blocks.Blocks; import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.traits.SaveTrait; import io.anuke.mindustry.entities.traits.SyncTrait; @@ -85,7 +84,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai Puddle p = map.get(tile.pos()); if(generation == 0 && p != null && p.lastRipple <= Time.time() - 40f){ - Effects.effect(BlockFx.ripple, tile.floor().liquidDrop.color, + Effects.effect(Fx.ripple, tile.floor().liquidDrop.color, (tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f); p.lastRipple = Time.time(); } @@ -108,7 +107,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai p.accepting = Math.max(amount, p.accepting); if(generation == 0 && p.lastRipple <= Time.time() - 40f && p.amount >= maxLiquid / 2f){ - Effects.effect(BlockFx.ripple, p.liquid.color, (tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f); + Effects.effect(Fx.ripple, p.liquid.color, (tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f); p.lastRipple = Time.time(); } }else{ @@ -134,12 +133,12 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai } }else if(dest.temperature > 0.7f && liquid.temperature < 0.55f){ //cold liquid poured onto hot puddle if(Mathf.chance(0.5f * amount)){ - Effects.effect(EnvironmentFx.steam, x, y); + Effects.effect(Fx.steam, x, y); } return -0.1f * amount; }else if(liquid.temperature > 0.7f && dest.temperature < 0.55f){ //hot liquid poured onto cold puddle if(Mathf.chance(0.8f * amount)){ - Effects.effect(EnvironmentFx.steam, x, y); + Effects.effect(Fx.steam, x, y); } return -0.4f * amount; } @@ -209,7 +208,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai unit.applyEffect(liquid.effect, 0.5f); if(unit.velocity().len() > 0.1){ - Effects.effect(BlockFx.ripple, liquid.color, unit.x, unit.y); + Effects.effect(Fx.ripple, liquid.color, unit.x, unit.y); } }); diff --git a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java index 9a3b6e174d..73dedf309d 100644 --- a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java @@ -16,7 +16,7 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -285,7 +285,7 @@ public interface BuilderTrait extends Entity{ } if(Mathf.chance(0.06 * Time.delta())){ - Effects.effect(BlockFx.pulverizeSmall, + Effects.effect(Fx.pulverizeSmall, tile.worldx() + Mathf.range(tilesize / 2f), tile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color); } diff --git a/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java b/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java index b63ce195cd..de7f571161 100644 --- a/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java @@ -2,7 +2,7 @@ package io.anuke.mindustry.entities.traits; import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Remote; -import io.anuke.mindustry.content.fx.UnitFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.gen.Call; import io.anuke.arc.entities.Effects; @@ -26,7 +26,7 @@ public interface CarryTrait extends TeamTrait, SolidTrait, TargetTrait{ if(trait.getCarry() != null){ //already carrying something, drop it //drop current - Effects.effect(UnitFx.unitDrop, trait.getCarry()); + Effects.effect(Fx.unitDrop, trait.getCarry()); trait.getCarry().setCarrier(null); trait.setCarry(null); @@ -37,7 +37,7 @@ public interface CarryTrait extends TeamTrait, SolidTrait, TargetTrait{ trait.setCarry(unit); unit.setCarrier(trait); - Effects.effect(UnitFx.unitPickup, trait); + Effects.effect(Fx.unitPickup, trait); } } diff --git a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java index 4d5eb7c956..07c4d2dd4f 100644 --- a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java @@ -14,7 +14,7 @@ import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.util.Interval; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.ExplosionFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -77,7 +77,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{ unit.onSuperDeath(); ScorchDecal.create(unit.x, unit.y); - Effects.effect(ExplosionFx.explosion, unit); + Effects.effect(Fx.explosion, unit); Effects.shake(2f, 2f, unit); //must run afterwards so the unit's group is not null when sending the removal packet diff --git a/core/src/io/anuke/mindustry/input/InputHandler.java b/core/src/io/anuke/mindustry/input/InputHandler.java index 36b1fab2ef..b10d48a36e 100644 --- a/core/src/io/anuke/mindustry/input/InputHandler.java +++ b/core/src/io/anuke/mindustry/input/InputHandler.java @@ -12,7 +12,7 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.scene.ui.layout.Table; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.effect.ItemTransfer; import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; @@ -57,7 +57,7 @@ public abstract class InputHandler implements InputProcessor{ throw new ValidateException(player, "Player cannot drop an item."); } - Effects.effect(EnvironmentFx.dropItem, Color.WHITE, player.x, player.y, angle, player.inventory.getItem().item); + Effects.effect(Fx.dropItem, Color.WHITE, player.x, player.y, angle, player.inventory.getItem().item); player.inventory.clearItem(); } diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index b613415c2f..e4fbee2f6e 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -19,7 +19,7 @@ import io.anuke.arc.scene.ui.layout.Table; import io.anuke.arc.util.Align; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; diff --git a/core/src/io/anuke/mindustry/type/Weapon.java b/core/src/io/anuke/mindustry/type/Weapon.java index 00210b1e71..dda242a463 100644 --- a/core/src/io/anuke/mindustry/type/Weapon.java +++ b/core/src/io/anuke/mindustry/type/Weapon.java @@ -10,7 +10,7 @@ import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; diff --git a/core/src/io/anuke/mindustry/world/BaseBlock.java b/core/src/io/anuke/mindustry/world/BaseBlock.java index 82088ff38e..0fa31beb61 100644 --- a/core/src/io/anuke/mindustry/world/BaseBlock.java +++ b/core/src/io/anuke/mindustry/world/BaseBlock.java @@ -6,7 +6,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.effect.Puddle; @@ -157,13 +157,13 @@ public abstract class BaseBlock extends MappableContent{ tile.entity.damage(1 * Time.delta()); next.entity.damage(1 * Time.delta()); if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.fire, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); + Effects.effect(Fx.fire, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); } }else if((liquid.temperature > 0.7f && other.temperature < 0.55f) || (other.temperature > 0.7f && liquid.temperature < 0.55f)){ tile.entity.liquids.remove(liquid, Math.min(tile.entity.liquids.get(liquid), 0.7f * Time.delta())); if(Mathf.chance(0.2f * Time.delta())){ - Effects.effect(EnvironmentFx.steam, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); + Effects.effect(Fx.steam, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); } } } diff --git a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java index 4337d83955..441508c55c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java @@ -9,8 +9,7 @@ import io.anuke.arc.entities.Effects; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.fx.ExplosionFx; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -103,7 +102,7 @@ public class BuildBlock extends Block{ @Override public void onDestroyed(Tile tile){ - Effects.effect(ExplosionFx.blockExplosionSmoke, tile); + Effects.effect(Fx.blockExplosionSmoke, tile); if(!tile.floor().solid && !tile.floor().isLiquid){ RubbleDecal.create(tile.drawx(), tile.drawy(), size); diff --git a/core/src/io/anuke/mindustry/world/blocks/Floor.java b/core/src/io/anuke/mindustry/world/blocks/Floor.java index abc3cd3a9b..aabc7e3020 100644 --- a/core/src/io/anuke/mindustry/world/blocks/Floor.java +++ b/core/src/io/anuke/mindustry/world/blocks/Floor.java @@ -11,7 +11,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.type.StatusEffect; import io.anuke.mindustry.world.Block; @@ -33,9 +33,9 @@ public class Floor extends Block{ /** How many ticks it takes to drown on this. */ public float drownTime = 0f; /** Effect when walking on this floor. */ - public Effect walkEffect = BlockFx.ripple; + public Effect walkEffect = Fx.ripple; /** Effect displayed when drowning on this floor. */ - public Effect drownUpdateEffect = BlockFx.bubble; + public Effect drownUpdateEffect = Fx.bubble; /** Status effect applied when walking on. */ public StatusEffect status = StatusEffects.none; /** Intensity of applied status effect. */ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/Door.java b/core/src/io/anuke/mindustry/world/blocks/defense/Door.java index 7b2303a99a..a85545453c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/Door.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/Door.java @@ -8,7 +8,7 @@ import io.anuke.arc.entities.Effects.Effect; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.geom.Rectangle; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Units; @@ -21,8 +21,8 @@ import java.io.IOException; public class Door extends Wall{ protected final Rectangle rect = new Rectangle(); - protected Effect openfx = BlockFx.dooropen; - protected Effect closefx = BlockFx.doorclose; + protected Effect openfx = Fx.dooropen; + protected Effect closefx = Fx.doorclose; protected TextureRegion openRegion; diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java index a8a76c46a6..374c1fd3ff 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java @@ -13,8 +13,7 @@ import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.traits.AbsorbTrait; import io.anuke.mindustry.graphics.Palette; @@ -94,7 +93,7 @@ public class ForceProjector extends Block { entity.radscl = Mathf.lerpDelta(entity.radscl, entity.broken ? 0f : 1f, 0.05f); if(Mathf.chance(Time.delta() * entity.buildup / breakage * 0.1f)){ - Effects.effect(BlockFx.reactorsmoke, tile.drawx() + Mathf.range(tilesize/2f), tile.drawy() + Mathf.range(tilesize/2f)); + Effects.effect(Fx.reactorsmoke, tile.drawx() + Mathf.range(tilesize/2f), tile.drawy() + Mathf.range(tilesize/2f)); } // Use Cases: @@ -137,7 +136,7 @@ public class ForceProjector extends Block { if(entity.buildup >= breakage && !entity.broken){ entity.broken = true; entity.buildup = breakage; - Effects.effect(BlockFx.shieldBreak, tile.drawx(), tile.drawy(), radius); + Effects.effect(Fx.shieldBreak, tile.drawx(), tile.drawy(), radius); } if(entity.hit > 0f){ @@ -151,7 +150,7 @@ public class ForceProjector extends Block { AbsorbTrait trait = (AbsorbTrait)bullet; if(trait.canBeAbsorbed() && trait.getTeam() != tile.getTeam() && isInsideHexagon(trait.getX(), trait.getY(), realRadius * 2f, tile.drawx(), tile.drawy())){ trait.absorb(); - Effects.effect(BulletFx.absorb, trait); + Effects.effect(Fx.absorb, trait); float relativeDamagePowerDraw = trait.getShieldDamage() * powerDamage / consumePower.powerCapacity; entity.hit = 1f; diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java index 503ad4c2f1..e79e877c09 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java @@ -11,7 +11,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; @@ -68,7 +68,7 @@ public class MendProjector extends Block{ if(entity.charge >= reload){ float realRange = range + entity.phaseHeat * phaseRangeBoost; - Effects.effect(BlockFx.healWaveMend, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); + Effects.effect(Fx.healWaveMend, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); entity.charge = 0f; int tileRange = (int)(realRange / tilesize); @@ -85,7 +85,7 @@ public class MendProjector extends Block{ if(other.getTeamID() == tile.getTeamID() && !healed.contains(other.pos()) && other.entity != null && other.entity.health < other.entity.maxHealth()){ other.entity.healBy(other.entity.maxHealth() * (healPercent + entity.phaseHeat*phaseBoost)/100f * entity.power.satisfaction); - Effects.effect(BlockFx.healBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); + Effects.effect(Fx.healBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); healed.add(other.pos()); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java index 32f8498d59..54dd2f526f 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java @@ -11,7 +11,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; @@ -70,7 +70,7 @@ public class OverdriveProjector extends Block{ float realRange = range + entity.phaseHeat * phaseRangeBoost; float realBoost = (speedBoost + entity.phaseHeat*speedBoostPhase) * entity.power.satisfaction; - Effects.effect(BlockFx.overdriveWave, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); + Effects.effect(Fx.overdriveWave, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); entity.charge = 0f; int tileRange = (int)(realRange / tilesize); @@ -88,7 +88,7 @@ public class OverdriveProjector extends Block{ if(other.getTeamID() == tile.getTeamID() && !healed.contains(other.pos()) && other.entity != null){ other.entity.timeScaleDuration = Math.max(other.entity.timeScaleDuration, reload + 1f); other.entity.timeScale = Math.max(other.entity.timeScale, realBoost); - Effects.effect(BlockFx.overdriveBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); + Effects.effect(Fx.overdriveBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); healed.add(other.pos()); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java index 51a22071b7..855dc67fb2 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java @@ -4,7 +4,7 @@ import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.world.Tile; diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java index 09255365a2..65053c9284 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java @@ -1,6 +1,6 @@ package io.anuke.mindustry.world.blocks.defense.turrets; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.consumers.ConsumeLiquidFilter; @@ -16,7 +16,7 @@ public class CooledTurret extends Turret{ protected float coolantMultiplier = 1f; /**Max coolant used per tick.*/ protected float maxCoolantUsed = 1f; - protected Effect coolEffect = BlockFx.fuelburn; + protected Effect coolEffect = Fx.fuelburn; public CooledTurret(String name){ super(name); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java index 080de1cc24..6a07a00846 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java @@ -15,7 +15,7 @@ import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Predict; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Units; diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java index 8339a7c1bd..c822a4b362 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java @@ -16,10 +16,7 @@ import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.EnvironmentFx; -import io.anuke.mindustry.content.fx.ShootFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.bullet.Bullet; @@ -46,9 +43,9 @@ public class MassDriver extends Block{ protected int minDistribute = 10; protected float knockback = 4f; protected float reloadTime = 100f; - protected Effect shootEffect = ShootFx.shootBig2; - protected Effect smokeEffect = ShootFx.shootBigSmoke2; - protected Effect recieveEffect = BlockFx.mineBig; + protected Effect shootEffect = Fx.shootBig2; + protected Effect smokeEffect = Fx.shootBigSmoke2; + protected Effect recieveEffect = Fx.mineBig; protected float shake = 3f; protected final static float powerPercentageUsed = 1.0f; protected TextureRegion turretRegion; @@ -309,7 +306,7 @@ public class MassDriver extends Block{ int amountDropped = Mathf.random(0, data.items[i]); if(amountDropped > 0){ float angle = Mathf.range(180f); - Effects.effect(EnvironmentFx.dropItem, Color.WHITE, bullet.x, bullet.y, angle, content.item(i)); + Effects.effect(Fx.dropItem, Color.WHITE, bullet.x, bullet.y, angle, content.item(i)); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java b/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java index d2d5106863..44fdd5caf9 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java @@ -7,7 +7,7 @@ import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Liquid; @@ -32,8 +32,8 @@ public class ItemLiquidGenerator extends PowerGenerator{ /** Maximum liquid used per frame. */ protected float maxLiquidGenerate = 0.4f; - protected Effects.Effect generateEffect = BlockFx.generatespark; - protected Effects.Effect explodeEffect = BlockFx.generatespark; + protected Effects.Effect generateEffect = Fx.generatespark; + protected Effects.Effect explodeEffect = Fx.generatespark; protected Color heatColor = Color.valueOf("ff9b59"); protected TextureRegion topRegion; diff --git a/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java b/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java index 5f7345ddf7..91e7fadf75 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java @@ -9,8 +9,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.ExplosionFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Liquid; @@ -106,7 +105,7 @@ public class NuclearReactor extends PowerGenerator{ if(entity.heat > smokeThreshold){ float smoke = 1.0f + (entity.heat - smokeThreshold) / (1f - smokeThreshold); //ranges from 1.0 to 2.0 if(Mathf.chance(smoke / 20.0 * entity.delta())){ - Effects.effect(BlockFx.reactorsmoke, tile.worldx() + Mathf.range(size * tilesize / 2f), + Effects.effect(Fx.reactorsmoke, tile.worldx() + Mathf.range(size * tilesize / 2f), tile.worldy() + Mathf.random(size * tilesize / 2f)); } } @@ -131,9 +130,9 @@ public class NuclearReactor extends PowerGenerator{ if(fuel < 5 && entity.heat < 0.5f) return; Effects.shake(6f, 16f, tile.worldx(), tile.worldy()); - Effects.effect(ExplosionFx.nuclearShockwave, tile.worldx(), tile.worldy()); + Effects.effect(Fx.nuclearShockwave, tile.worldx(), tile.worldy()); for(int i = 0; i < 6; i++){ - Time.run(Mathf.random(40), () -> Effects.effect(BlockFx.nuclearcloud, tile.worldx(), tile.worldy())); + Time.run(Mathf.random(40), () -> Effects.effect(Fx.nuclearcloud, tile.worldx(), tile.worldy())); } Damage.damage(tile.worldx(), tile.worldy(), explosionRadius * tilesize, explosionDamage * 4); @@ -142,14 +141,14 @@ public class NuclearReactor extends PowerGenerator{ for(int i = 0; i < 20; i++){ Time.run(Mathf.random(50), () -> { tr.rnd(Mathf.random(40f)); - Effects.effect(ExplosionFx.explosion, tr.x + tile.worldx(), tr.y + tile.worldy()); + Effects.effect(Fx.explosion, tr.x + tile.worldx(), tr.y + tile.worldy()); }); } for(int i = 0; i < 70; i++){ Time.run(Mathf.random(80), () -> { tr.rnd(Mathf.random(120f)); - Effects.effect(BlockFx.nuclearsmoke, tr.x + tile.worldx(), tr.y + tile.worldy()); + Effects.effect(Fx.nuclearsmoke, tr.x + tile.worldx(), tr.y + tile.worldy()); }); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java index ed692caf57..e900b092d5 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java @@ -10,7 +10,7 @@ import io.anuke.arc.math.RandomXS128; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.world.Tile; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java index b4fa156706..67c1168f75 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java @@ -12,7 +12,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.graphics.Layer; import io.anuke.mindustry.type.Item; @@ -48,11 +48,11 @@ public class Drill extends Block{ /**Whether to draw the item this drill is mining.*/ protected boolean drawMineItem = false; /**Effect played when an item is produced. This is colored.*/ - protected Effect drillEffect = BlockFx.mine; + protected Effect drillEffect = Fx.mine; /**Speed the drill bit rotates at.*/ protected float rotateSpeed = 2f; /**Effect randomly played while drilling.*/ - protected Effect updateEffect = BlockFx.pulverizeSmall; + protected Effect updateEffect = Fx.pulverizeSmall; /**Chance the update effect will appear.*/ protected float updateEffectChance = 0.02f; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java b/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java index 4c1eef5ef7..21bcebe89c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java @@ -2,8 +2,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; import io.anuke.arc.graphics.g2d.TextureRegion; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.world.Block; @@ -26,7 +25,7 @@ public class GenericCrafter extends Block{ protected Item output; protected float craftTime = 80; - protected Effect craftEffect = BlockFx.purify; + protected Effect craftEffect = Fx.purify; protected Effect updateEffect = Fx.none; protected float updateEffectChance = 0.04f; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java b/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java index d8fea6e766..28574e24d0 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java @@ -7,7 +7,7 @@ import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Liquid; @@ -15,7 +15,7 @@ import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; public class Incinerator extends Block{ - protected Effect effect = BlockFx.fuelburn; + protected Effect effect = Fx.fuelburn; protected Color flameColor = Color.valueOf("ffad9d"); public Incinerator(String name){ diff --git a/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java b/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java index a2423363ae..2b34b859ee 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.g2d.TextureRegion; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; @@ -41,8 +41,8 @@ public class PowerSmelter extends PowerBlock{ protected float craftTime = 20f; //time to craft one item, so max 3 items per second by default protected float burnEffectChance = 0.01f; - protected Effect craftEffect = BlockFx.smelt, - burnEffect = BlockFx.fuelburn; + protected Effect craftEffect = Fx.smelt, + burnEffect = Fx.fuelburn; protected Color flameColor = Color.valueOf("ffc999"); protected TextureRegion topRegion; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java b/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java index 985a9f0d75..65b338006d 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; @@ -32,7 +32,7 @@ public class Smelter extends Block{ protected float craftTime = 20f; protected float burnDuration = 50f; - protected Effect craftEffect = BlockFx.smelt, burnEffect = BlockFx.fuelburn; + protected Effect craftEffect = Fx.smelt, burnEffect = Fx.fuelburn; protected Color flameColor = Color.valueOf("ffb879"); public Smelter(String name){ diff --git a/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java b/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java index 729fc05a90..434a5011e3 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.Tile; diff --git a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java index d33212a858..a046e4fdee 100644 --- a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java @@ -12,7 +12,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.UnitTypes; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; diff --git a/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java b/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java index 57de75effc..0be196abda 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java @@ -13,7 +13,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.scene.ui.ButtonGroup; import io.anuke.arc.scene.ui.ImageButton; import io.anuke.arc.scene.ui.layout.Table; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.units.BaseUnit; @@ -35,7 +35,7 @@ public class CommandCenter extends Block{ protected TextureRegion[] commandRegions = new TextureRegion[UnitCommand.values().length]; protected Color topColor = Palette.command; protected Color bottomColor = Color.valueOf("5e5e5e"); - protected Effect effect = BlockFx.commandSend; + protected Effect effect = Fx.commandSend; public CommandCenter(String name){ super(name); diff --git a/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java b/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java index 822b8d96bc..38257657d4 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java @@ -12,7 +12,7 @@ import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.Mechs; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -24,7 +24,6 @@ import io.anuke.mindustry.graphics.Shaders; import io.anuke.mindustry.type.Mech; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.meta.BlockStat; import java.io.DataInput; import java.io.DataOutput; diff --git a/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java b/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java index 75d69c255b..de7753e644 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java @@ -11,7 +11,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; diff --git a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java index b29ecab1b0..5df8efceee 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java @@ -10,7 +10,7 @@ import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.entities.units.UnitType; @@ -64,7 +64,7 @@ public class UnitFactory extends Block{ entity.buildTime = 0f; Effects.shake(2f, 3f, entity); - Effects.effect(BlockFx.producesmoke, tile.drawx(), tile.drawy()); + Effects.effect(Fx.producesmoke, tile.drawx(), tile.drawy()); if(!Net.client()){ BaseUnit unit = factory.type.create(tile.getTeam()); From ee9f65d4a3e1a2ee6856e740156e9ad60fdce1b6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jan 2019 18:39:06 -0500 Subject: [PATCH 5/6] Block class merge --- .../io/anuke/mindustry/ai/BlockIndexer.java | 2 +- .../io/anuke/mindustry/ai/WaveSpawner.java | 2 +- .../io/anuke/mindustry/content/Blocks.java | 1191 +++++++++++++++++ .../io/anuke/mindustry/content/Bullets.java | 6 - core/src/io/anuke/mindustry/content/Fx.java | 9 +- .../src/io/anuke/mindustry/content/Items.java | 6 - .../io/anuke/mindustry/content/Liquids.java | 6 - .../src/io/anuke/mindustry/content/Mechs.java | 6 - .../io/anuke/mindustry/content/Recipes.java | 233 ++-- .../mindustry/content/StatusEffects.java | 6 - .../io/anuke/mindustry/content/UnitTypes.java | 6 - .../io/anuke/mindustry/content/Weapons.java | 6 - .../mindustry/content/blocks/BlockList.java | 12 - .../mindustry/content/blocks/Blocks.java | 177 --- .../content/blocks/CraftingBlocks.java | 235 ---- .../mindustry/content/blocks/DebugBlocks.java | 180 --- .../content/blocks/DefenseBlocks.java | 98 -- .../content/blocks/DistributionBlocks.java | 57 - .../content/blocks/LiquidBlocks.java | 70 - .../mindustry/content/blocks/OreBlocks.java | 36 - .../mindustry/content/blocks/PowerBlocks.java | 81 -- .../content/blocks/ProductionBlocks.java | 112 -- .../content/blocks/StorageBlocks.java | 33 - .../content/blocks/TurretBlocks.java | 256 ---- .../mindustry/content/blocks/UnitBlocks.java | 95 -- .../content/blocks/UpgradeBlocks.java | 61 - .../anuke/mindustry/core/ContentLoader.java | 13 - .../io/anuke/mindustry/core/NetServer.java | 2 +- core/src/io/anuke/mindustry/core/World.java | 2 +- .../io/anuke/mindustry/editor/EditorTool.java | 2 +- .../io/anuke/mindustry/editor/MapEditor.java | 2 +- .../mindustry/editor/MapEditorDialog.java | 4 +- .../src/io/anuke/mindustry/entities/Unit.java | 2 +- .../mindustry/entities/effect/Puddle.java | 2 +- .../entities/traits/BuilderTrait.java | 2 +- .../mindustry/entities/units/types/Drone.java | 2 +- .../io/anuke/mindustry/game/ContentList.java | 5 - .../mindustry/graphics/BlockRenderer.java | 2 +- .../mindustry/graphics/OverlayRenderer.java | 2 +- .../anuke/mindustry/input/DesktopInput.java | 2 +- .../anuke/mindustry/input/InputHandler.java | 2 +- .../io/anuke/mindustry/input/MobileInput.java | 2 +- core/src/io/anuke/mindustry/io/MapIO.java | 5 +- .../anuke/mindustry/io/SaveFileVersion.java | 5 +- .../io/anuke/mindustry/maps/MapTileData.java | 2 +- .../anuke/mindustry/maps/SectorPresets.java | 21 +- .../anuke/mindustry/maps/TutorialSector.java | 15 +- .../maps/generation/FortressGenerator.java | 30 +- .../maps/generation/WorldGenerator.java | 12 +- .../missions/MissionWithStartingCore.java | 4 +- .../src/io/anuke/mindustry/net/NetworkIO.java | 2 +- .../ui/fragments/BlockConfigFragment.java | 2 +- core/src/io/anuke/mindustry/world/Build.java | 2 +- .../io/anuke/mindustry/world/ColorMapper.java | 6 - .../mindustry/world/LegacyColorMapper.java | 18 +- core/src/io/anuke/mindustry/world/Tile.java | 2 +- .../mindustry/world/blocks/OreBlock.java | 16 +- .../world/blocks/production/Cultivator.java | 2 +- .../world/blocks/sandbox/ItemSource.java | 34 + .../world/blocks/sandbox/ItemVoid.java | 21 + .../world/blocks/sandbox/LiquidSource.java | 105 ++ .../world/blocks/sandbox/PowerSource.java | 20 + .../world/blocks/sandbox/PowerVoid.java | 18 + tests/src/test/java/ApplicationTests.java | 22 +- .../src/test/java/power/PowerTestFixture.java | 2 +- 65 files changed, 1597 insertions(+), 1799 deletions(-) create mode 100644 core/src/io/anuke/mindustry/content/Blocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/BlockList.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/Blocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/LiquidBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/OreBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java delete mode 100644 core/src/io/anuke/mindustry/content/blocks/UpgradeBlocks.java create mode 100644 core/src/io/anuke/mindustry/world/blocks/sandbox/ItemSource.java create mode 100644 core/src/io/anuke/mindustry/world/blocks/sandbox/ItemVoid.java create mode 100644 core/src/io/anuke/mindustry/world/blocks/sandbox/LiquidSource.java create mode 100644 core/src/io/anuke/mindustry/world/blocks/sandbox/PowerSource.java create mode 100644 core/src/io/anuke/mindustry/world/blocks/sandbox/PowerVoid.java diff --git a/core/src/io/anuke/mindustry/ai/BlockIndexer.java b/core/src/io/anuke/mindustry/ai/BlockIndexer.java index 9269a205bc..6e96b6cb36 100644 --- a/core/src/io/anuke/mindustry/ai/BlockIndexer.java +++ b/core/src/io/anuke/mindustry/ai/BlockIndexer.java @@ -5,7 +5,7 @@ import io.anuke.arc.collection.*; import io.anuke.arc.function.Predicate; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.game.EventType.TileChangeEvent; import io.anuke.mindustry.game.EventType.WorldLoadEvent; diff --git a/core/src/io/anuke/mindustry/ai/WaveSpawner.java b/core/src/io/anuke/mindustry/ai/WaveSpawner.java index 414daba785..5096d1c670 100644 --- a/core/src/io/anuke/mindustry/ai/WaveSpawner.java +++ b/core/src/io/anuke/mindustry/ai/WaveSpawner.java @@ -5,7 +5,7 @@ import io.anuke.arc.collection.Array; import io.anuke.arc.collection.GridBits; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Structs; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.entities.units.Squad; import io.anuke.mindustry.game.EventType.WorldLoadEvent; diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java new file mode 100644 index 0000000000..3f29b85afe --- /dev/null +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -0,0 +1,1191 @@ +package io.anuke.mindustry.content; + +import io.anuke.arc.graphics.Color; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.graphics.g2d.Lines; +import io.anuke.arc.math.Mathf; +import io.anuke.arc.util.Time; +import io.anuke.mindustry.game.ContentList; +import io.anuke.mindustry.graphics.CacheLayer; +import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.type.ItemStack; +import io.anuke.mindustry.world.Block; +import io.anuke.mindustry.world.Tile; +import io.anuke.mindustry.world.blocks.*; +import io.anuke.mindustry.world.blocks.defense.*; +import io.anuke.mindustry.world.blocks.defense.turrets.*; +import io.anuke.mindustry.world.blocks.distribution.*; +import io.anuke.mindustry.world.blocks.power.*; +import io.anuke.mindustry.world.blocks.production.*; +import io.anuke.mindustry.world.blocks.sandbox.*; +import io.anuke.mindustry.world.blocks.storage.CoreBlock; +import io.anuke.mindustry.world.blocks.storage.SortedUnloader; +import io.anuke.mindustry.world.blocks.storage.Vault; +import io.anuke.mindustry.world.blocks.units.*; + +import static io.anuke.mindustry.Vars.content; + +public class Blocks implements ContentList{ + public static Block + + air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone, + blackstone, dirt, sand, ice, snow, grass, shrub, rock, icerock, blackrock, smelter, arcsmelter, siliconsmelter, + plastaniumCompressor, phaseWeaver, alloySmelter, pyratiteMixer, blastMixer, cryofluidmixer, melter, separator, + centrifuge, biomatterCompressor, pulverizer, solidifier, incinerator, powerVoid, powerSource, itemSource, liquidSource, + itemVoid, copperWall, copperWallLarge, denseAlloyWall, denseAlloyWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, + phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine, conveyor, + titaniumconveyor, distributor, junction, itemBridge, phaseConveyor, sorter, router, overflowGate, massDriver, mechanicalPump, + rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidtank, liquidJunction, bridgeConduit, phaseConduit, + combustionGenerator, thermalGenerator, turbineGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor, + fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge, mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, + 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, + revenantFactory, daggerFactory, titanFactory, fortressFactory, reconstructor, repairPoint, commandCenter, alphaPad, deltaPad, + tauPad, omegaPad, dartPad, javelinPad, tridentPad, glaivePad; + + @Override + public void load(){ + //region environment blocks + + //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); + } + } + } + + air = new Floor("air"){ + { + blend = false; + alwaysReplace = true; + } + + public void draw(Tile tile){} + public void load(){} + public void init(){} + }; + + blockpart = new BlockPart(); + + spawn = new Block("spawn"){ + + public void drawShadow(Tile tile){} + + public void draw(Tile tile){ + Draw.color(Color.SCARLET); + Lines.circle(tile.worldx(), tile.worldy(), 4f +Mathf.absin(Time.time(), 6f, 6f)); + Draw.color(); + } + }; + + //Registers build blocks from size 1-6 + //no reference is needed here since they can be looked up by name later + for(int i = 1; i <= 6; i++){ + new BuildBlock("build" + i); + } + + space = new Floor("space"){{ + placeableOn = false; + variants = 0; + cacheLayer = CacheLayer.space; + solid = true; + blend = false; + minimapColor = Color.valueOf("000001"); + }}; + + metalfloor = new Floor("metalfloor"){{ + variants = 6; + }}; + + deepwater = new Floor("deepwater"){{ + liquidColor = Color.valueOf("546bb3"); + speedMultiplier = 0.2f; + variants = 0; + liquidDrop = Liquids.water; + isLiquid = true; + status = StatusEffects.wet; + statusIntensity = 1f; + drownTime = 140f; + cacheLayer = CacheLayer.water; + minimapColor = Color.valueOf("465a96"); + }}; + + water = new Floor("water"){{ + liquidColor = Color.valueOf("546bb3"); + speedMultiplier = 0.5f; + variants = 0; + status = StatusEffects.wet; + statusIntensity = 0.9f; + liquidDrop = Liquids.water; + isLiquid = true; + cacheLayer = CacheLayer.water; + minimapColor = Color.valueOf("506eb4"); + }}; + + lava = new Floor("lava"){{ + drownTime = 100f; + liquidColor = Color.valueOf("ed5334"); + speedMultiplier = 0.2f; + damageTaken = 0.5f; + status = StatusEffects.melting; + statusIntensity = 0.8f; + variants = 0; + liquidDrop = Liquids.lava; + isLiquid = true; + cacheLayer = CacheLayer.lava; + minimapColor = Color.valueOf("ed5334"); + }}; + + tar = new Floor("tar"){{ + drownTime = 150f; + liquidColor = Color.valueOf("292929"); + status = StatusEffects.tarred; + statusIntensity = 1f; + speedMultiplier = 0.19f; + variants = 0; + liquidDrop = Liquids.oil; + isLiquid = true; + cacheLayer = CacheLayer.oil; + minimapColor = Color.valueOf("292929"); + }}; + + stone = new Floor("stone"){{ + hasOres = true; + drops = new ItemStack(Items.stone, 1); + blends = block -> block != this && !(block instanceof OreBlock); + minimapColor = Color.valueOf("323232"); + playerUnmineable = true; + }}; + + blackstone = new Floor("blackstone"){{ + drops = new ItemStack(Items.stone, 1); + minimapColor = Color.valueOf("252525"); + playerUnmineable = true; + hasOres = true; + }}; + + dirt = new Floor("dirt"){{ + minimapColor = Color.valueOf("6e501e"); + }}; + + sand = new Floor("sand"){{ + drops = new ItemStack(Items.sand, 1); + minimapColor = Color.valueOf("988a67"); + hasOres = true; + playerUnmineable = true; + }}; + + ice = new Floor("ice"){{ + dragMultiplier = 0.2f; + speedMultiplier = 0.4f; + minimapColor = Color.valueOf("b8eef8"); + hasOres = true; + }}; + + snow = new Floor("snow"){{ + minimapColor = Color.valueOf("c2d1d2"); + hasOres = true; + }}; + + grass = new Floor("grass"){{ + hasOres = true; + minimapColor = Color.valueOf("549d5b"); + }}; + + shrub = new Rock("shrub"); + + rock = new Rock("rock"){{ + variants = 2; + }}; + + icerock = new Rock("icerock"){{ + variants = 2; + }}; + + blackrock = new Rock("blackrock"){{ + variants = 1; + }}; + + //endregion + //region crafting + + smelter = new Smelter("smelter"){{ + health = 70; + result = Items.densealloy; + craftTime = 45f; + burnDuration = 46f; + useFlux = true; + + consumes.items(new ItemStack(Items.copper, 1), new ItemStack(Items.lead, 2)); + consumes.item(Items.coal).optional(true); + }}; + + arcsmelter = new PowerSmelter("arc-smelter"){{ + health = 90; + craftEffect = Fx.smeltsmoke; + result = Items.densealloy; + craftTime = 30f; + size = 2; + + useFlux = true; + fluxNeeded = 2; + + consumes.items(new ItemStack(Items.copper, 1), new ItemStack(Items.lead, 2)); + consumes.power(0.1f); + }}; + + siliconsmelter = new PowerSmelter("silicon-smelter"){{ + health = 90; + craftEffect = Fx.smeltsmoke; + result = Items.silicon; + craftTime = 40f; + size = 2; + hasLiquids = false; + flameColor = Color.valueOf("ffef99"); + + consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)); + consumes.power(0.05f); + }}; + + plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{ + hasItems = true; + liquidCapacity = 60f; + craftTime = 60f; + output = Items.plastanium; + itemCapacity = 30; + size = 2; + health = 320; + hasPower = hasLiquids = true; + craftEffect = Fx.formsmoke; + updateEffect = Fx.plasticburn; + + consumes.liquid(Liquids.oil, 0.25f); + consumes.power(0.3f); + consumes.item(Items.titanium, 2); + }}; + + phaseWeaver = new PhaseWeaver("phase-weaver"){{ + craftEffect = Fx.smeltsmoke; + result = Items.phasefabric; + craftTime = 120f; + size = 2; + + consumes.items(new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10)); + consumes.power(0.5f); + }}; + + alloySmelter = new PowerSmelter("alloy-smelter"){{ + craftEffect = Fx.smeltsmoke; + result = Items.surgealloy; + craftTime = 75f; + size = 2; + + useFlux = true; + fluxNeeded = 3; + + consumes.power(0.4f); + consumes.items(new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.copper, 3)); + }}; + + cryofluidmixer = new LiquidMixer("cryofluidmixer"){{ + outputLiquid = Liquids.cryofluid; + liquidPerItem = 50f; + itemCapacity = 50; + size = 2; + hasPower = true; + + consumes.power(0.1f); + consumes.item(Items.titanium); + consumes.liquid(Liquids.water, 0.3f); + }}; + + blastMixer = new GenericCrafter("blast-mixer"){{ + itemCapacity = 20; + hasItems = true; + hasPower = true; + hasLiquids = true; + output = Items.blastCompound; + size = 2; + + consumes.liquid(Liquids.oil, 0.05f); + consumes.item(Items.pyratite, 1); + consumes.power(0.04f); + }}; + + pyratiteMixer = new PowerSmelter("pyratite-mixer"){{ + flameColor = Color.CLEAR; + itemCapacity = 20; + hasItems = true; + hasPower = true; + result = Items.pyratite; + + size = 2; + + consumes.power(0.02f); + consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 2), new ItemStack(Items.sand, 2)); + }}; + + melter = new PowerCrafter("melter"){{ + health = 200; + outputLiquid = Liquids.lava; + outputLiquidAmount = 1f; + itemCapacity = 20; + craftTime = 10f; + hasLiquids = hasPower = true; + + consumes.power(0.1f); + consumes.item(Items.stone, 1); + }}; + + separator = new Separator("separator"){{ + results = new ItemStack[]{ + new ItemStack(null, 10), + new ItemStack(Items.sand, 10), + new ItemStack(Items.stone, 9), + new ItemStack(Items.copper, 4), + new ItemStack(Items.lead, 2), + new ItemStack(Items.coal, 2), + new ItemStack(Items.titanium, 1), + }; + filterTime = 40f; + itemCapacity = 40; + health = 50; + + consumes.item(Items.stone, 2); + consumes.liquid(Liquids.water, 0.3f); + }}; + + centrifuge = new Separator("centrifuge"){{ + results = new ItemStack[]{ + new ItemStack(null, 13), + new ItemStack(Items.sand, 12), + new ItemStack(Items.stone, 11), + new ItemStack(Items.copper, 5), + new ItemStack(Items.lead, 3), + new ItemStack(Items.coal, 3), + new ItemStack(Items.titanium, 2), + new ItemStack(Items.thorium, 1) + }; + + hasPower = true; + filterTime = 15f; + itemCapacity = 60; + health = 50 * 4; + spinnerLength = 1.5f; + spinnerRadius = 3.5f; + spinnerThickness = 1.5f; + spinnerSpeed = 3f; + size = 2; + + consumes.item(Items.stone, 2); + consumes.power(0.2f); + consumes.liquid(Liquids.water, 0.5f); + }}; + + biomatterCompressor = new Compressor("biomattercompressor"){{ + liquidCapacity = 60f; + itemCapacity = 50; + craftTime = 20f; + outputLiquid = Liquids.oil; + outputLiquidAmount = 2.5f; + size = 2; + health = 320; + hasLiquids = true; + + consumes.item(Items.biomatter, 1); + consumes.power(0.06f); + }}; + + pulverizer = new Pulverizer("pulverizer"){{ + itemCapacity = 40; + output = Items.sand; + health = 80; + craftEffect = Fx.pulverize; + craftTime = 40f; + updateEffect = Fx.pulverizeSmall; + hasItems = hasPower = true; + + consumes.item(Items.stone, 1); + consumes.power(0.05f); + }}; + + solidifier = new GenericCrafter("solidifer"){{ + liquidCapacity = 21f; + craftTime = 14; + output = Items.stone; + itemCapacity = 20; + health = 80; + craftEffect = Fx.purifystone; + hasLiquids = hasItems = true; + + consumes.liquid(Liquids.lava, 1f); + }}; + + incinerator = new Incinerator("incinerator"){{ + health = 90; + }}; + + //endregion + //region sandbox + + powerVoid = new PowerVoid("power-void"); + powerSource = new PowerSource("power-source"); + itemSource = new ItemSource("item-source"); + itemVoid = new ItemVoid("item-void"); + liquidSource = new LiquidSource("liquid-source"); + + //endregion + //region defense + + int wallHealthMultiplier = 3; + + copperWall = new Wall("copper-wall"){{ + health = 80 * wallHealthMultiplier; + }}; + + copperWallLarge = new Wall("copper-wall-large"){{ + health = 80 * 4 * wallHealthMultiplier; + size = 2; + }}; + + denseAlloyWall = new Wall("dense-alloy-wall"){{ + health = 110 * wallHealthMultiplier; + }}; + + denseAlloyWallLarge = new Wall("dense-alloy-wall-large"){{ + health = 110 * wallHealthMultiplier * 4; + size = 2; + }}; + + thoriumWall = new Wall("thorium-wall"){{ + health = 200 * wallHealthMultiplier; + }}; + + thoriumWallLarge = new Wall("thorium-wall-large"){{ + health = 200 * wallHealthMultiplier * 4; + size = 2; + }}; + + phaseWall = new DeflectorWall("phase-wall"){{ + health = 150 * wallHealthMultiplier; + }}; + + phaseWallLarge = new DeflectorWall("phase-wall-large"){{ + health = 150 * 4 * wallHealthMultiplier; + size = 2; + }}; + + surgeWall = new SurgeWall("surge-wall"){{ + health = 230 * wallHealthMultiplier; + }}; + + surgeWallLarge = new SurgeWall("surge-wall-large"){{ + health = 230 * 4 * wallHealthMultiplier; + size = 2; + }}; + + door = new Door("door"){{ + health = 100 * wallHealthMultiplier; + }}; + + doorLarge = new Door("door-large"){{ + openfx = Fx.dooropenlarge; + closefx = Fx.doorcloselarge; + health = 100 * 4 * wallHealthMultiplier; + size = 2; + }}; + + mendProjector = new MendProjector("mend-projector"){{ + consumes.power(0.2f, 1.0f); + size = 2; + consumes.item(Items.phasefabric).optional(true); + }}; + + overdriveProjector = new OverdriveProjector("overdrive-projector"){{ + consumes.power(0.35f, 1.0f); + size = 2; + consumes.item(Items.phasefabric).optional(true); + }}; + + forceProjector = new ForceProjector("force-projector"){{ + size = 3; + consumes.item(Items.phasefabric).optional(true); + }}; + + shockMine = new ShockMine("shock-mine"){{ + health = 40; + damage = 11; + tileDamage = 7f; + length = 10; + tendrils = 5; + }}; + + //endregion + //region distribution + + + conveyor = new Conveyor("conveyor"){{ + health = 45; + speed = 0.03f; + }}; + + titaniumconveyor = new Conveyor("titanium-conveyor"){{ + health = 65; + speed = 0.07f; + }}; + + junction = new Junction("junction"){{ + speed = 26; + capacity = 32; + }}; + + itemBridge = new BufferedItemBridge("bridge-conveyor"){{ + range = 4; + speed = 60f; + bufferCapacity = 15; + }}; + + phaseConveyor = new ItemBridge("phase-conveyor"){{ + range = 12; + hasPower = true; + consumes.power(0.03f, 1.0f); + }}; + + sorter = new Sorter("sorter"); + + router = new Router("router"); + + distributor = new Router("distributor"){{ + size = 2; + }}; + + overflowGate = new OverflowGate("overflow-gate"); + + massDriver = new MassDriver("mass-driver"){{ + size = 3; + itemCapacity = 60; + range = 440f; + }}; + + //endregion + //region liquid + + + mechanicalPump = new Pump("mechanical-pump"){{ + pumpAmount = 0.1f; + tier = 0; + }}; + + rotaryPump = new Pump("rotary-pump"){{ + pumpAmount = 0.2f; + consumes.power(0.015f); + liquidCapacity = 30f; + hasPower = true; + size = 2; + tier = 1; + }}; + + thermalPump = new Pump("thermal-pump"){{ + pumpAmount = 0.275f; + consumes.power(0.03f); + liquidCapacity = 40f; + hasPower = true; + size = 2; + tier = 2; + }}; + + conduit = new Conduit("conduit"){{ + health = 45; + }}; + + pulseConduit = new Conduit("pulse-conduit"){{ + liquidCapacity = 16f; + liquidFlowFactor = 4.9f; + health = 90; + }}; + + liquidRouter = new LiquidRouter("liquid-router"){{ + liquidCapacity = 20f; + }}; + + liquidtank = new LiquidTank("liquid-tank"){{ + size = 3; + liquidCapacity = 1500f; + health = 500; + }}; + + liquidJunction = new LiquidJunction("liquid-junction"); + + bridgeConduit = new LiquidExtendingBridge("bridge-conduit"){{ + range = 4; + hasPower = false; + }}; + + phaseConduit = new LiquidBridge("phase-conduit"){{ + range = 12; + hasPower = true; + consumes.power(0.03f, 1.0f); + }}; + + //endregion + //region power + + combustionGenerator = new BurnerGenerator("combustion-generator"){{ + powerProduction = 0.09f; + itemDuration = 40f; + }}; + + thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{ + maxLiquidGenerate = 2f; + powerProduction = 2f; + generateEffect = Fx.redgeneratespark; + size = 2; + }}; + + turbineGenerator = new TurbineGenerator("turbine-generator"){{ + powerProduction = 0.28f; + itemDuration = 30f; + consumes.liquid(Liquids.water, 0.05f); + size = 2; + }}; + + rtgGenerator = new DecayGenerator("rtg-generator"){{ + size = 2; + powerProduction = 0.3f; + itemDuration = 220f; + }}; + + solarPanel = new SolarGenerator("solar-panel"){{ + powerProduction = 0.0045f; + }}; + + largeSolarPanel = new SolarGenerator("solar-panel-large"){{ + size = 3; + powerProduction = 0.055f; + }}; + + thoriumReactor = new NuclearReactor("thorium-reactor"){{ + size = 3; + health = 700; + powerProduction = 1.1f; + }}; + + fusionReactor = new FusionReactor("fusion-reactor"){{ + size = 4; + health = 600; + }}; + + battery = new Battery("battery"){{ + consumes.powerBuffered(320f, 1f); + }}; + + batteryLarge = new Battery("battery-large"){{ + size = 3; + consumes.powerBuffered(2000f, 1f); + }}; + + powerNode = new PowerNode("power-node"){{ + maxNodes = 4; + laserRange = 6; + }}; + + powerNodeLarge = new PowerNode("power-node-large"){{ + size = 2; + maxNodes = 6; + laserRange = 9.5f; + }}; + + //endregion power + //region production + + mechanicalDrill = new Drill("mechanical-drill"){{ + tier = 2; + drillTime = 300; + size = 2; + drawMineItem = true; + }}; + + pneumaticDrill = new Drill("pneumatic-drill"){{ + tier = 3; + drillTime = 240; + size = 2; + drawMineItem = true; + }}; + + laserDrill = new Drill("laser-drill"){{ + drillTime = 140; + size = 2; + hasPower = true; + tier = 4; + updateEffect = Fx.pulverizeMedium; + drillEffect = Fx.mineBig; + + consumes.power(0.11f); + }}; + + blastDrill = new Drill("blast-drill"){{ + drillTime = 60; + size = 3; + drawRim = true; + hasPower = true; + tier = 5; + updateEffect = Fx.pulverizeRed; + updateEffectChance = 0.03f; + drillEffect = Fx.mineHuge; + rotateSpeed = 6f; + warmupSpeed = 0.01f; + + consumes.power(0.3f); + }}; + + plasmaDrill = new Drill("plasma-drill"){{ + heatColor = Color.valueOf("ff461b"); + drillTime = 50; + size = 4; + hasLiquids = true; + hasPower = true; + tier = 5; + rotateSpeed = 9f; + drawRim = true; + updateEffect = Fx.pulverizeRedder; + updateEffectChance = 0.04f; + drillEffect = Fx.mineHuge; + warmupSpeed = 0.005f; + + consumes.power(0.7f); + }}; + + waterExtractor = new SolidPump("water-extractor"){{ + result = Liquids.water; + pumpAmount = 0.065f; + size = 2; + liquidCapacity = 30f; + rotateSpeed = 1.4f; + + consumes.power(0.09f); + }}; + + oilExtractor = new Fracker("oil-extractor"){{ + result = Liquids.oil; + updateEffect = Fx.pulverize; + liquidCapacity = 50f; + updateEffectChance = 0.05f; + pumpAmount = 0.09f; + size = 3; + liquidCapacity = 30f; + + consumes.item(Items.sand); + consumes.power(0.3f); + consumes.liquid(Liquids.water, 0.15f); + }}; + + cultivator = new Cultivator("cultivator"){{ + result = Items.biomatter; + drillTime = 200; + size = 2; + hasLiquids = true; + hasPower = true; + + consumes.power(0.08f); + consumes.liquid(Liquids.water, 0.15f); + }}; + + //endregion + //region storage + + core = new CoreBlock("core"){{ + health = 1100; + itemCapacity = 3000; + }}; + + vault = new Vault("vault"){{ + size = 3; + itemCapacity = 1000; + }}; + + container = new Vault("container"){{ + size = 2; + itemCapacity = 300; + }}; + + unloader = new SortedUnloader("unloader"){{ + speed = 7f; + }}; + + //endregion + //region turrets + + duo = new DoubleTurret("duo"){{ + ammo( + Items.copper, Bullets.standardCopper, + Items.densealloy, Bullets.standardDense, + Items.pyratite, Bullets.standardIncendiary, + Items.silicon, Bullets.standardHoming + ); + reload = 25f; + restitution = 0.03f; + range = 90f; + shootCone = 15f; + ammoUseEffect = Fx.shellEjectSmall; + health = 80; + inaccuracy = 2f; + rotatespeed = 10f; + }}; + + hail = new ArtilleryTurret("hail"){{ + ammo( + Items.densealloy, Bullets.artilleryDense, + Items.silicon, Bullets.artilleryHoming, + Items.pyratite, Bullets.artlleryIncendiary + ); + reload = 60f; + recoil = 2f; + range = 230f; + inaccuracy = 1f; + shootCone = 10f; + health = 120; + }}; + + scorch = new LiquidTurret("scorch"){{ + ammo(Liquids.oil, Bullets.basicFlame); + recoil = 0f; + reload = 4f; + shootCone = 50f; + ammoUseEffect = Fx.shellEjectSmall; + health = 160; + }}; + + wave = new LiquidTurret("wave"){{ + ammo( + Liquids.water, Bullets.waterShot, + Liquids.lava, Bullets.lavaShot, + Liquids.cryofluid, Bullets.cryoShot, + Liquids.oil, Bullets.oilShot + ); + size = 2; + recoil = 0f; + reload = 4f; + inaccuracy = 5f; + shootCone = 50f; + shootEffect = Fx.shootLiquid; + range = 90f; + health = 360; + + drawer = (tile, entity) -> { + Draw.rect(region, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); + + Draw.color(entity.liquids.current().color); + Draw.alpha(entity.liquids.total() / liquidCapacity); + Draw.rect(name + "-liquid", tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); + Draw.color(); + }; + }}; + + lancer = new ChargeTurret("lancer"){{ + range = 90f; + chargeTime = 60f; + chargeMaxDelay = 30f; + chargeEffects = 7; + shootType = Bullets.lancerLaser; + recoil = 2f; + reload = 100f; + cooldown = 0.03f; + powerUsed = 1 / 3f; + consumes.powerBuffered(60f); + shootShake = 2f; + shootEffect = Fx.lancerLaserShoot; + smokeEffect = Fx.lancerLaserShootSmoke; + chargeEffect = Fx.lancerLaserCharge; + chargeBeginEffect = Fx.lancerLaserChargeBegin; + heatColor = Color.RED; + size = 2; + health = 320; + targetAir = false; + }}; + + arc = new PowerTurret("arc"){{ + shootType = Bullets.arc; + reload = 85f; + shootShake = 1f; + shootCone = 40f; + rotatespeed = 8f; + powerUsed = 1f / 3f; + consumes.powerBuffered(30f); + range = 150f; + shootEffect = Fx.lightningShoot; + heatColor = Color.RED; + recoil = 1f; + size = 1; + }}; + + swarmer = new BurstTurret("swarmer"){{ + ammo( + Items.blastCompound, Bullets.missileExplosive, + Items.pyratite, Bullets.missileIncendiary, + Items.surgealloy, Bullets.missileSurge + ); + reload = 50f; + shots = 4; + burstSpacing = 5; + inaccuracy = 10f; + range = 140f; + xRand = 6f; + size = 2; + health = 380; + }}; + + salvo = new BurstTurret("salvo"){{ + ammo( + Items.copper, Bullets.standardCopper, + Items.densealloy, Bullets.standardDense, + Items.pyratite, Bullets.standardIncendiary, + Items.silicon, Bullets.standardHoming, + Items.thorium, Bullets.standardThorium + ); + + size = 2; + range = 120f; + reload = 35f; + restitution = 0.03f; + ammoEjectBack = 3f; + cooldown = 0.03f; + recoil = 3f; + shootShake = 2f; + burstSpacing = 4; + shots = 3; + ammoUseEffect = Fx.shellEjectBig; + health = 360; + }}; + + ripple = new ArtilleryTurret("ripple"){{ + ammo( + Items.densealloy, Bullets.artilleryDense, + Items.silicon, Bullets.artilleryHoming, + Items.pyratite, Bullets.artlleryIncendiary, + Items.blastCompound, Bullets.artilleryExplosive, + Items.plastanium, Bullets.arilleryPlastic + ); + size = 3; + shots = 4; + inaccuracy = 12f; + reload = 60f; + ammoEjectBack = 5f; + ammoUseEffect = Fx.shellEjectBig; + cooldown = 0.03f; + velocityInaccuracy = 0.2f; + restitution = 0.02f; + recoil = 6f; + shootShake = 2f; + range = 320f; + + health = 550; + }}; + + cyclone = new ItemTurret("cyclone"){{ + ammo( + Items.blastCompound, Bullets.flakExplosive, + Items.plastanium, Bullets.flakPlastic, + Items.surgealloy, Bullets.flakSurge + ); + xRand = 4f; + reload = 8f; + range = 145f; + size = 3; + recoil = 3f; + rotatespeed = 10f; + inaccuracy = 13f; + shootCone = 30f; + + health = 145 * size * size; + }}; + + fuse = new ItemTurret("fuse"){{ + ammo(Items.densealloy, Bullets.fuseShot); + reload = 50f; + shootShake = 4f; + range = 80f; + recoil = 5f; + restitution = 0.1f; + size = 3; + + health = 155 * size * size; + }}; + + spectre = new DoubleTurret("spectre"){{ + ammo( + Items.densealloy, Bullets.standardDenseBig, + Items.pyratite, Bullets.standardIncendiaryBig, + Items.thorium, Bullets.standardThoriumBig + ); + reload = 6f; + coolantMultiplier = 0.5f; + maxCoolantUsed = 1.5f; + restitution = 0.1f; + ammoUseEffect = Fx.shellEjectBig; + range = 200f; + inaccuracy = 3f; + recoil = 3f; + xRand = 3f; + shotWidth = 4f; + shootShake = 2f; + shots = 2; + size = 4; + shootCone = 24f; + + health = 155 * size * size; + }}; + + meltdown = new LaserTurret("meltdown"){{ + shootType = Bullets.meltdownLaser; + shootEffect = Fx.shootBigSmoke2; + shootCone = 40f; + recoil = 4f; + size = 4; + shootShake = 2f; + powerUsed = 0.5f; + consumes.powerBuffered(120f); + range = 160f; + reload = 200f; + firingMoveFract = 0.1f; + shootDuration = 220f; + + health = 165 * size * size; + }}; + + //endregion + //region units + + spiritFactory = new UnitFactory("spirit-factory"){{ + type = UnitTypes.spirit; + produceTime = 5700; + size = 2; + consumes.power(0.08f); + consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)); + }}; + + phantomFactory = new UnitFactory("phantom-factory"){{ + type = UnitTypes.phantom; + produceTime = 7300; + size = 2; + consumes.power(0.2f); + consumes.items(new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)); + }}; + + wraithFactory = new UnitFactory("wraith-factory"){{ + type = UnitTypes.wraith; + produceTime = 1800; + size = 2; + consumes.power(0.1f); + consumes.items(new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 10)); + }}; + + ghoulFactory = new UnitFactory("ghoul-factory"){{ + type = UnitTypes.ghoul; + produceTime = 3600; + size = 3; + consumes.power(0.2f); + consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.titanium, 30), new ItemStack(Items.plastanium, 20)); + }}; + + revenantFactory = new UnitFactory("revenant-factory"){{ + type = UnitTypes.revenant; + produceTime = 8000; + size = 4; + consumes.power(0.3f); + consumes.items(new ItemStack(Items.silicon, 80), new ItemStack(Items.titanium, 80), new ItemStack(Items.plastanium, 50)); + }}; + + daggerFactory = new UnitFactory("dagger-factory"){{ + type = UnitTypes.dagger; + produceTime = 1700; + size = 2; + consumes.power(0.05f); + consumes.items(new ItemStack(Items.silicon, 10)); + }}; + + titanFactory = new UnitFactory("titan-factory"){{ + type = UnitTypes.titan; + produceTime = 3400; + size = 3; + consumes.power(0.15f); + consumes.items(new ItemStack(Items.silicon, 20), new ItemStack(Items.thorium, 30)); + }}; + + fortressFactory = new UnitFactory("fortress-factory"){{ + type = UnitTypes.fortress; + produceTime = 5000; + size = 3; + consumes.power(0.2f); + consumes.items(new ItemStack(Items.silicon, 40), new ItemStack(Items.thorium, 50)); + }}; + + repairPoint = new RepairPoint("repair-point"){{ + repairSpeed = 0.1f; + }}; + + reconstructor = new Reconstructor("reconstructor"){{ + size = 2; + }}; + + commandCenter = new CommandCenter("command-center"){{ + size = 2; + }}; + + //endregion + //region upgrades + + alphaPad = new MechPad("alpha-mech-pad"){{ + mech = Mechs.alpha; + size = 2; + consumes.powerBuffered(50f); + }}; + + deltaPad = new MechPad("delta-mech-pad"){{ + mech = Mechs.delta; + size = 2; + consumes.powerBuffered(70f); + }}; + + tauPad = new MechPad("tau-mech-pad"){{ + mech = Mechs.tau; + size = 2; + consumes.powerBuffered(100f); + }}; + + omegaPad = new MechPad("omega-mech-pad"){{ + mech = Mechs.omega; + size = 3; + consumes.powerBuffered(120f); + }}; + + dartPad = new MechPad("dart-ship-pad"){{ + mech = Mechs.dart; + size = 2; + consumes.powerBuffered(50f); + }}; + + javelinPad = new MechPad("javelin-ship-pad"){{ + mech = Mechs.javelin; + size = 2; + consumes.powerBuffered(80f); + }}; + + tridentPad = new MechPad("trident-ship-pad"){{ + mech = Mechs.trident; + size = 2; + consumes.powerBuffered(100f); + }}; + + glaivePad = new MechPad("glaive-ship-pad"){{ + mech = Mechs.glaive; + size = 3; + consumes.powerBuffered(120f); + }}; + + //endregion + } +} diff --git a/core/src/io/anuke/mindustry/content/Bullets.java b/core/src/io/anuke/mindustry/content/Bullets.java index e8551c7978..d8f2749edc 100644 --- a/core/src/io/anuke/mindustry/content/Bullets.java +++ b/core/src/io/anuke/mindustry/content/Bullets.java @@ -17,7 +17,6 @@ import io.anuke.mindustry.entities.effect.Puddle; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.graphics.Shapes; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.BuildBlock; @@ -644,9 +643,4 @@ public class Bullets implements ContentList{ } }; } - - @Override - public ContentType type(){ - return ContentType.bullet; - } } diff --git a/core/src/io/anuke/mindustry/content/Fx.java b/core/src/io/anuke/mindustry/content/Fx.java index ee3985365e..589a774286 100644 --- a/core/src/io/anuke/mindustry/content/Fx.java +++ b/core/src/io/anuke/mindustry/content/Fx.java @@ -8,12 +8,10 @@ import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.Liquids; import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.graphics.Shapes; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Item; import static io.anuke.mindustry.Vars.tilesize; @@ -24,7 +22,7 @@ public class Fx implements ContentList{ none, placeBlock, breakBlock, smoke, spawn, tapBlock, select, vtolHover, unitDrop, unitPickup, unitLand, pickup, healWave, heal, landShock, reactorsmoke, nuclearsmoke, nuclearcloud, redgeneratespark, generatespark, fuelburn, plasticburn, pulverize, pulverizeRed, pulverizeRedder, pulverizeSmall, pulverizeMedium, - producesmoke, smeltsmoke, formsmoke, blastsmoke, lava, doorclose, dooropenlarge, doorcloselarge, purify, purifyoil, purifystone, generate, + producesmoke, smeltsmoke, formsmoke, blastsmoke, lava, doorclose, dooropen, dooropenlarge, doorcloselarge, purify, purifyoil, purifystone, generate, mine, mineBig, mineHuge, smelt, teleportActivate, teleport, teleportOut, ripple, bubble, commandSend, healBlock, healBlockFull, healWaveMend, overdriveWave, overdriveBlockFull, shieldBreak, hitBulletSmall, hitFuse, hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, hitMeltdown, despawn, flakExplosion, blastExplosion, @@ -806,9 +804,4 @@ public class Fx implements ContentList{ Draw.reset(); }); } - - @Override - public ContentType type(){ - return ContentType.effect; - } } diff --git a/core/src/io/anuke/mindustry/content/Items.java b/core/src/io/anuke/mindustry/content/Items.java index 5dd7220a32..db42768218 100644 --- a/core/src/io/anuke/mindustry/content/Items.java +++ b/core/src/io/anuke/mindustry/content/Items.java @@ -2,7 +2,6 @@ package io.anuke.mindustry.content; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemType; @@ -101,9 +100,4 @@ public class Items implements ContentList{ explosiveness = 0.2f; }}; } - - @Override - public ContentType type(){ - return ContentType.item; - } } diff --git a/core/src/io/anuke/mindustry/content/Liquids.java b/core/src/io/anuke/mindustry/content/Liquids.java index 9ff4a489ea..9da8727e5d 100644 --- a/core/src/io/anuke/mindustry/content/Liquids.java +++ b/core/src/io/anuke/mindustry/content/Liquids.java @@ -2,7 +2,6 @@ package io.anuke.mindustry.content; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Liquid; public class Liquids implements ContentList{ @@ -53,9 +52,4 @@ public class Liquids implements ContentList{ } }; } - - @Override - public ContentType type(){ - return ContentType.liquid; - } } diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index 01df597434..9124d484d3 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -15,7 +15,6 @@ import io.anuke.mindustry.entities.effect.Lightning; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.graphics.Shaders; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Mech; public class Mechs implements ContentList{ @@ -291,9 +290,4 @@ public class Mechs implements ContentList{ starterDesktop = alpha; starterMobile = dart; } - - @Override - public ContentType type(){ - return ContentType.mech; - } } diff --git a/core/src/io/anuke/mindustry/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index 19e30d8037..8cb0be7fc6 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -1,9 +1,7 @@ package io.anuke.mindustry.content; -import io.anuke.mindustry.content.blocks.*; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.game.GameMode; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.type.Recipe.RecipeVisibility; @@ -15,186 +13,181 @@ public class Recipes implements ContentList{ @Override public void load(){ //DEBUG - new Recipe(distribution, DebugBlocks.itemSource).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); - new Recipe(distribution, DebugBlocks.itemVoid).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); - new Recipe(liquid, DebugBlocks.liquidSource).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); - new Recipe(power, DebugBlocks.powerVoid).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); - new Recipe(power, DebugBlocks.powerInfinite).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); + new Recipe(distribution, Blocks.itemSource).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); + new Recipe(distribution, Blocks.itemVoid).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); + new Recipe(liquid, Blocks.liquidSource).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); + new Recipe(power, Blocks.powerVoid).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); + new Recipe(power, Blocks.powerSource).setMode(GameMode.sandbox).setHidden(true).setAlwaysUnlocked(true); //DEFENSE //walls - new Recipe(defense, DefenseBlocks.copperWall, new ItemStack(Items.copper, 12)).setAlwaysUnlocked(true); - new Recipe(defense, DefenseBlocks.copperWallLarge, new ItemStack(Items.copper, 12 * 4)).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, DefenseBlocks.denseAlloyWall, new ItemStack(Items.densealloy, 12)); - new Recipe(defense, DefenseBlocks.denseAlloyWallLarge, new ItemStack(Items.densealloy, 12 * 4)); + new Recipe(defense, Blocks.denseAlloyWall, new ItemStack(Items.densealloy, 12)); + new Recipe(defense, Blocks.denseAlloyWallLarge, new ItemStack(Items.densealloy, 12 * 4)); - new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.densealloy, 12), new ItemStack(Items.silicon, 8)); - new Recipe(defense, DefenseBlocks.doorLarge, new ItemStack(Items.densealloy, 12 * 4), new ItemStack(Items.silicon, 8 * 4)); + new Recipe(defense, Blocks.door, new ItemStack(Items.densealloy, 12), new ItemStack(Items.silicon, 8)); + new Recipe(defense, Blocks.doorLarge, new ItemStack(Items.densealloy, 12 * 4), new ItemStack(Items.silicon, 8 * 4)); - new Recipe(defense, DefenseBlocks.thoriumWall, new ItemStack(Items.thorium, 12)); - new Recipe(defense, DefenseBlocks.thoriumWallLarge, new ItemStack(Items.thorium, 12 * 4)); + new Recipe(defense, Blocks.thoriumWall, new ItemStack(Items.thorium, 12)); + new Recipe(defense, Blocks.thoriumWallLarge, new ItemStack(Items.thorium, 12 * 4)); - new Recipe(defense, DefenseBlocks.phaseWall, new ItemStack(Items.phasefabric, 12)); - new Recipe(defense, DefenseBlocks.phaseWallLarge, new ItemStack(Items.phasefabric, 12 * 4)); + new Recipe(defense, Blocks.phaseWall, new ItemStack(Items.phasefabric, 12)); + new Recipe(defense, Blocks.phaseWallLarge, new ItemStack(Items.phasefabric, 12 * 4)); - new Recipe(defense, DefenseBlocks.surgeWall, new ItemStack(Items.surgealloy, 12)); - new Recipe(defense, DefenseBlocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4)); + new Recipe(defense, Blocks.surgeWall, new ItemStack(Items.surgealloy, 12)); + new Recipe(defense, Blocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4)); - new Recipe(effect, StorageBlocks.container, new ItemStack(Items.densealloy, 200)); - new Recipe(effect, StorageBlocks.vault, new ItemStack(Items.densealloy, 500), new ItemStack(Items.thorium, 250)); + new Recipe(effect, Blocks.container, new ItemStack(Items.densealloy, 200)); + new Recipe(effect, Blocks.vault, new ItemStack(Items.densealloy, 500), new ItemStack(Items.thorium, 250)); - new Recipe(effect, StorageBlocks.core, + new Recipe(effect, Blocks.core, new ItemStack(Items.copper, 2000), new ItemStack(Items.densealloy, 2000), new ItemStack(Items.silicon, 1750), new ItemStack(Items.thorium, 1000), new ItemStack(Items.surgealloy, 500), new ItemStack(Items.phasefabric, 750) ); //projectors - new Recipe(effect, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 180)); - new Recipe(effect, DefenseBlocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); - new Recipe(effect, DefenseBlocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); + new Recipe(effect, Blocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 180)); + new Recipe(effect, Blocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); + new Recipe(effect, Blocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); - new Recipe(effect, DefenseBlocks.shockMine, new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 25)) + new Recipe(effect, Blocks.shockMine, new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 25)) .setDependencies(Items.blastCompound); //TURRETS - new Recipe(turret, TurretBlocks.duo, new ItemStack(Items.copper, 40)).setAlwaysUnlocked(true); - new Recipe(turret, TurretBlocks.arc, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 20)); - new Recipe(turret, TurretBlocks.hail, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 35)); - new Recipe(turret, TurretBlocks.lancer, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 90)); - new Recipe(turret, TurretBlocks.wave, new ItemStack(Items.densealloy, 60), new ItemStack(Items.titanium, 70), new ItemStack(Items.lead, 150)); - new Recipe(turret, TurretBlocks.salvo, new ItemStack(Items.copper, 210), new ItemStack(Items.densealloy, 190), new ItemStack(Items.thorium, 130)); - new Recipe(turret, TurretBlocks.swarmer, new ItemStack(Items.densealloy, 70), new ItemStack(Items.titanium, 70), new ItemStack(Items.plastanium, 90), new ItemStack(Items.silicon, 60)); - new Recipe(turret, TurretBlocks.ripple, new ItemStack(Items.copper, 300), new ItemStack(Items.densealloy, 220), new ItemStack(Items.thorium, 120)); - new Recipe(turret, TurretBlocks.cyclone, new ItemStack(Items.copper, 400), new ItemStack(Items.densealloy, 400), new ItemStack(Items.surgealloy, 200), new ItemStack(Items.plastanium, 150)); - new Recipe(turret, TurretBlocks.fuse, new ItemStack(Items.copper, 450), new ItemStack(Items.densealloy, 450), new ItemStack(Items.surgealloy, 250)); - new Recipe(turret, TurretBlocks.spectre, new ItemStack(Items.copper, 700), new ItemStack(Items.densealloy, 600), new ItemStack(Items.surgealloy, 500), new ItemStack(Items.plastanium, 350), new ItemStack(Items.thorium, 500)); - new Recipe(turret, TurretBlocks.meltdown, new ItemStack(Items.copper, 500), new ItemStack(Items.lead, 700), new ItemStack(Items.densealloy, 600), new ItemStack(Items.surgealloy, 650), new ItemStack(Items.silicon, 650)); + new Recipe(turret, Blocks.duo, new ItemStack(Items.copper, 40)).setAlwaysUnlocked(true); + new Recipe(turret, Blocks.arc, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 20)); + new Recipe(turret, Blocks.hail, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 35)); + new Recipe(turret, Blocks.lancer, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 90)); + new Recipe(turret, Blocks.wave, new ItemStack(Items.densealloy, 60), new ItemStack(Items.titanium, 70), new ItemStack(Items.lead, 150)); + new Recipe(turret, Blocks.salvo, new ItemStack(Items.copper, 210), new ItemStack(Items.densealloy, 190), new ItemStack(Items.thorium, 130)); + new Recipe(turret, Blocks.swarmer, new ItemStack(Items.densealloy, 70), new ItemStack(Items.titanium, 70), new ItemStack(Items.plastanium, 90), new ItemStack(Items.silicon, 60)); + new Recipe(turret, Blocks.ripple, new ItemStack(Items.copper, 300), new ItemStack(Items.densealloy, 220), new ItemStack(Items.thorium, 120)); + new Recipe(turret, Blocks.cyclone, new ItemStack(Items.copper, 400), new ItemStack(Items.densealloy, 400), new ItemStack(Items.surgealloy, 200), new ItemStack(Items.plastanium, 150)); + new Recipe(turret, Blocks.fuse, new ItemStack(Items.copper, 450), new ItemStack(Items.densealloy, 450), new ItemStack(Items.surgealloy, 250)); + new Recipe(turret, Blocks.spectre, new ItemStack(Items.copper, 700), new ItemStack(Items.densealloy, 600), new ItemStack(Items.surgealloy, 500), new ItemStack(Items.plastanium, 350), new ItemStack(Items.thorium, 500)); + new Recipe(turret, Blocks.meltdown, new ItemStack(Items.copper, 500), new ItemStack(Items.lead, 700), new ItemStack(Items.densealloy, 600), new ItemStack(Items.surgealloy, 650), new ItemStack(Items.silicon, 650)); //DISTRIBUTION - new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.copper, 1)).setAlwaysUnlocked(true); - new Recipe(distribution, DistributionBlocks.titaniumconveyor, new ItemStack(Items.copper, 2), new ItemStack(Items.titanium, 1)); - new Recipe(distribution, DistributionBlocks.phaseConveyor, new ItemStack(Items.phasefabric, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.densealloy, 20)); + new Recipe(distribution, Blocks.conveyor, new ItemStack(Items.copper, 1)).setAlwaysUnlocked(true); + new Recipe(distribution, Blocks.titaniumconveyor, new ItemStack(Items.copper, 2), new ItemStack(Items.titanium, 1)); + new Recipe(distribution, Blocks.phaseConveyor, new ItemStack(Items.phasefabric, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.densealloy, 20)); //starter transport - new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.copper, 2)).setAlwaysUnlocked(true); - new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.copper, 6)).setAlwaysUnlocked(true); + new Recipe(distribution, Blocks.junction, new ItemStack(Items.copper, 2)).setAlwaysUnlocked(true); + new Recipe(distribution, Blocks.router, new ItemStack(Items.copper, 6)).setAlwaysUnlocked(true); //advanced densealloy transport - new Recipe(distribution, DistributionBlocks.distributor, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8)); - new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 4)); - new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 8)); - new Recipe(distribution, DistributionBlocks.itemBridge, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8)); - new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.densealloy, 50), new ItemStack(Items.silicon, 60)); - new Recipe(distribution, DistributionBlocks.massDriver, new ItemStack(Items.densealloy, 250), new ItemStack(Items.silicon, 150), new ItemStack(Items.lead, 250), new ItemStack(Items.thorium, 100)); + new Recipe(distribution, Blocks.distributor, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8)); + new Recipe(distribution, Blocks.sorter, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 4)); + new Recipe(distribution, Blocks.overflowGate, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 8)); + new Recipe(distribution, Blocks.itemBridge, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8)); + new Recipe(distribution, Blocks.unloader, new ItemStack(Items.densealloy, 50), new ItemStack(Items.silicon, 60)); + new Recipe(distribution, Blocks.massDriver, new ItemStack(Items.densealloy, 250), new ItemStack(Items.silicon, 150), new ItemStack(Items.lead, 250), new ItemStack(Items.thorium, 100)); //CRAFTING //smelting - new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.copper, 100)); - new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.copper, 110), new ItemStack(Items.densealloy, 70), new ItemStack(Items.lead, 50)); - new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 50)); + new Recipe(crafting, Blocks.smelter, new ItemStack(Items.copper, 100)); + new Recipe(crafting, Blocks.arcsmelter, new ItemStack(Items.copper, 110), new ItemStack(Items.densealloy, 70), new ItemStack(Items.lead, 50)); + new Recipe(crafting, Blocks.siliconsmelter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 50)); //advanced fabrication - new Recipe(crafting, CraftingBlocks.plastaniumCompressor, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 230), new ItemStack(Items.densealloy, 120), new ItemStack(Items.titanium, 160)); - new Recipe(crafting, CraftingBlocks.phaseWeaver, new ItemStack(Items.silicon, 260), new ItemStack(Items.lead, 240), new ItemStack(Items.thorium, 150)); - new Recipe(crafting, CraftingBlocks.alloySmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140)); + new Recipe(crafting, Blocks.plastaniumCompressor, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 230), new ItemStack(Items.densealloy, 120), new ItemStack(Items.titanium, 160)); + new Recipe(crafting, Blocks.phaseWeaver, new ItemStack(Items.silicon, 260), new ItemStack(Items.lead, 240), new ItemStack(Items.thorium, 150)); + new Recipe(crafting, Blocks.alloySmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140)); //misc - new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 50)); - new Recipe(crafting, CraftingBlocks.pyratiteMixer, new ItemStack(Items.copper, 100), new ItemStack(Items.lead, 50)); - new Recipe(crafting, CraftingBlocks.blastMixer, new ItemStack(Items.lead, 60), new ItemStack(Items.densealloy, 40)); - new Recipe(crafting, CraftingBlocks.cryofluidmixer, new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 80), new ItemStack(Items.thorium, 90)); + new Recipe(crafting, Blocks.pulverizer, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 50)); + new Recipe(crafting, Blocks.pyratiteMixer, new ItemStack(Items.copper, 100), new ItemStack(Items.lead, 50)); + new Recipe(crafting, Blocks.blastMixer, new ItemStack(Items.lead, 60), new ItemStack(Items.densealloy, 40)); + new Recipe(crafting, Blocks.cryofluidmixer, new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 80), new ItemStack(Items.thorium, 90)); - new Recipe(crafting, CraftingBlocks.solidifier, new ItemStack(Items.densealloy, 30), new ItemStack(Items.copper, 20)); - new Recipe(crafting, CraftingBlocks.melter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.densealloy, 90)); - new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.densealloy, 10), new ItemStack(Items.lead, 30)); + new Recipe(crafting, Blocks.solidifier, new ItemStack(Items.densealloy, 30), new ItemStack(Items.copper, 20)); + new Recipe(crafting, Blocks.melter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.densealloy, 90)); + new Recipe(crafting, Blocks.incinerator, new ItemStack(Items.densealloy, 10), new ItemStack(Items.lead, 30)); //processing - new Recipe(crafting, CraftingBlocks.biomatterCompressor, new ItemStack(Items.lead, 70), new ItemStack(Items.silicon, 60)); - new Recipe(crafting, CraftingBlocks.separator, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50)); - new Recipe(crafting, CraftingBlocks.centrifuge, new ItemStack(Items.copper, 130), new ItemStack(Items.densealloy, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); + new Recipe(crafting, Blocks.biomatterCompressor, new ItemStack(Items.lead, 70), new ItemStack(Items.silicon, 60)); + new Recipe(crafting, Blocks.separator, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50)); + new Recipe(crafting, Blocks.centrifuge, new ItemStack(Items.copper, 130), new ItemStack(Items.densealloy, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); //POWER - new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6)) - .setDependencies(PowerBlocks.combustionGenerator); - new Recipe(power, PowerBlocks.powerNodeLarge, new ItemStack(Items.densealloy, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6)) - .setDependencies(PowerBlocks.powerNode); - new Recipe(power, PowerBlocks.battery, new ItemStack(Items.copper, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4)) - .setDependencies(PowerBlocks.powerNode); - new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.densealloy, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30)) - .setDependencies(PowerBlocks.powerNode); + new Recipe(power, Blocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6)) + .setDependencies(Blocks.combustionGenerator); + new Recipe(power, Blocks.powerNodeLarge, new ItemStack(Items.densealloy, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6)) + .setDependencies(Blocks.powerNode); + new Recipe(power, Blocks.battery, new ItemStack(Items.copper, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4)) + .setDependencies(Blocks.powerNode); + new Recipe(power, Blocks.batteryLarge, new ItemStack(Items.densealloy, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30)) + .setDependencies(Blocks.powerNode); //generators - combustion - new Recipe(power, PowerBlocks.combustionGenerator, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 30)); - new Recipe(power, PowerBlocks.turbineGenerator, new ItemStack(Items.copper, 70), new ItemStack(Items.densealloy, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60)); - new Recipe(power, PowerBlocks.thermalGenerator, new ItemStack(Items.copper, 80), new ItemStack(Items.densealloy, 70), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 70), new ItemStack(Items.thorium, 70)); + new Recipe(power, Blocks.combustionGenerator, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 30)); + new Recipe(power, Blocks.turbineGenerator, new ItemStack(Items.copper, 70), new ItemStack(Items.densealloy, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60)); + new Recipe(power, Blocks.thermalGenerator, new ItemStack(Items.copper, 80), new ItemStack(Items.densealloy, 70), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 70), new ItemStack(Items.thorium, 70)); //generators - solar - new Recipe(power, PowerBlocks.solarPanel, new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 30)); - new Recipe(power, PowerBlocks.largeSolarPanel, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 290), new ItemStack(Items.phasefabric, 30)); + new Recipe(power, Blocks.solarPanel, new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 30)); + new Recipe(power, Blocks.largeSolarPanel, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 290), new ItemStack(Items.phasefabric, 30)); //generators - nuclear - new Recipe(power, PowerBlocks.thoriumReactor, new ItemStack(Items.lead, 600), new ItemStack(Items.silicon, 400), new ItemStack(Items.densealloy, 300), new ItemStack(Items.thorium, 300)); - new Recipe(power, PowerBlocks.rtgGenerator, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 150), new ItemStack(Items.phasefabric, 50), new ItemStack(Items.plastanium, 150), new ItemStack(Items.thorium, 100)); + new Recipe(power, Blocks.thoriumReactor, new ItemStack(Items.lead, 600), new ItemStack(Items.silicon, 400), new ItemStack(Items.densealloy, 300), new ItemStack(Items.thorium, 300)); + new Recipe(power, Blocks.rtgGenerator, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 150), new ItemStack(Items.phasefabric, 50), new ItemStack(Items.plastanium, 150), new ItemStack(Items.thorium, 100)); //DRILLS, PRODUCERS - new Recipe(production, ProductionBlocks.mechanicalDrill, new ItemStack(Items.copper, 45)).setAlwaysUnlocked(true); - new Recipe(production, ProductionBlocks.pneumaticDrill, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50)); - new Recipe(production, ProductionBlocks.laserDrill, new ItemStack(Items.copper, 70), new ItemStack(Items.densealloy, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); - new Recipe(production, ProductionBlocks.blastDrill, new ItemStack(Items.copper, 130), new ItemStack(Items.densealloy, 180), new ItemStack(Items.silicon, 120), new ItemStack(Items.titanium, 100), new ItemStack(Items.thorium, 60)); + new Recipe(production, Blocks.mechanicalDrill, new ItemStack(Items.copper, 45)).setAlwaysUnlocked(true); + new Recipe(production, Blocks.pneumaticDrill, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50)); + new Recipe(production, Blocks.laserDrill, new ItemStack(Items.copper, 70), new ItemStack(Items.densealloy, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); + new Recipe(production, Blocks.blastDrill, new ItemStack(Items.copper, 130), new ItemStack(Items.densealloy, 180), new ItemStack(Items.silicon, 120), new ItemStack(Items.titanium, 100), new ItemStack(Items.thorium, 60)); - new Recipe(production, ProductionBlocks.waterExtractor, new ItemStack(Items.copper, 50), new ItemStack(Items.densealloy, 50), new ItemStack(Items.lead, 40)); - new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.copper, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20)); - new Recipe(production, ProductionBlocks.oilExtractor, new ItemStack(Items.copper, 300), new ItemStack(Items.densealloy, 350), new ItemStack(Items.lead, 230), new ItemStack(Items.thorium, 230), new ItemStack(Items.silicon, 150)); + new Recipe(production, Blocks.waterExtractor, new ItemStack(Items.copper, 50), new ItemStack(Items.densealloy, 50), new ItemStack(Items.lead, 40)); + new Recipe(production, Blocks.cultivator, new ItemStack(Items.copper, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20)); + new Recipe(production, Blocks.oilExtractor, new ItemStack(Items.copper, 300), new ItemStack(Items.densealloy, 350), new ItemStack(Items.lead, 230), new ItemStack(Items.thorium, 230), new ItemStack(Items.silicon, 150)); //UNITS //upgrades - new Recipe(upgrade, UpgradeBlocks.dartPad, new ItemStack(Items.lead, 150), new ItemStack(Items.copper, 150), new ItemStack(Items.silicon, 200), new ItemStack(Items.titanium, 240)).setVisible(RecipeVisibility.desktopOnly); - new Recipe(upgrade, UpgradeBlocks.tridentPad, new ItemStack(Items.lead, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250), new ItemStack(Items.titanium, 300), new ItemStack(Items.plastanium, 200)); - new Recipe(upgrade, UpgradeBlocks.javelinPad, new ItemStack(Items.lead, 350), new ItemStack(Items.silicon, 450), new ItemStack(Items.titanium, 500), new ItemStack(Items.plastanium, 400), new ItemStack(Items.phasefabric, 200)); - new Recipe(upgrade, UpgradeBlocks.glaivePad, new ItemStack(Items.lead, 450), new ItemStack(Items.silicon, 650), new ItemStack(Items.titanium, 700), new ItemStack(Items.plastanium, 600), new ItemStack(Items.surgealloy, 200)); + new Recipe(upgrade, Blocks.dartPad, new ItemStack(Items.lead, 150), new ItemStack(Items.copper, 150), new ItemStack(Items.silicon, 200), new ItemStack(Items.titanium, 240)).setVisible(RecipeVisibility.desktopOnly); + new Recipe(upgrade, Blocks.tridentPad, new ItemStack(Items.lead, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250), new ItemStack(Items.titanium, 300), new ItemStack(Items.plastanium, 200)); + new Recipe(upgrade, Blocks.javelinPad, new ItemStack(Items.lead, 350), new ItemStack(Items.silicon, 450), new ItemStack(Items.titanium, 500), new ItemStack(Items.plastanium, 400), new ItemStack(Items.phasefabric, 200)); + new Recipe(upgrade, Blocks.glaivePad, new ItemStack(Items.lead, 450), new ItemStack(Items.silicon, 650), new ItemStack(Items.titanium, 700), new ItemStack(Items.plastanium, 600), new ItemStack(Items.surgealloy, 200)); - new Recipe(upgrade, UpgradeBlocks.alphaPad, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 100), new ItemStack(Items.copper, 150)).setVisible(RecipeVisibility.mobileOnly); - new Recipe(upgrade, UpgradeBlocks.tauPad, new ItemStack(Items.lead, 250), new ItemStack(Items.densealloy, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)); - new Recipe(upgrade, UpgradeBlocks.deltaPad, new ItemStack(Items.lead, 350), new ItemStack(Items.densealloy, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)); - new Recipe(upgrade, UpgradeBlocks.omegaPad, new ItemStack(Items.lead, 450), new ItemStack(Items.densealloy, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)); + new Recipe(upgrade, Blocks.alphaPad, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 100), new ItemStack(Items.copper, 150)).setVisible(RecipeVisibility.mobileOnly); + new Recipe(upgrade, Blocks.tauPad, new ItemStack(Items.lead, 250), new ItemStack(Items.densealloy, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)); + new Recipe(upgrade, Blocks.deltaPad, new ItemStack(Items.lead, 350), new ItemStack(Items.densealloy, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)); + new Recipe(upgrade, Blocks.omegaPad, new ItemStack(Items.lead, 450), new ItemStack(Items.densealloy, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)); //actual unit related stuff - new Recipe(units, UnitBlocks.spiritFactory, new ItemStack(Items.copper, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130)); - new Recipe(units, UnitBlocks.phantomFactory, new ItemStack(Items.densealloy, 90), new ItemStack(Items.thorium, 80), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 210)); + new Recipe(units, Blocks.spiritFactory, new ItemStack(Items.copper, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130)); + new Recipe(units, Blocks.phantomFactory, new ItemStack(Items.densealloy, 90), new ItemStack(Items.thorium, 80), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 210)); - new Recipe(units, UnitBlocks.daggerFactory, new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 70)); - new Recipe(units, UnitBlocks.titanFactory, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 90)); - new Recipe(units, UnitBlocks.fortressFactory, new ItemStack(Items.thorium, 200), new ItemStack(Items.lead, 220), new ItemStack(Items.silicon, 150), new ItemStack(Items.surgealloy, 100), new ItemStack(Items.phasefabric, 50)); + new Recipe(units, Blocks.daggerFactory, new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 70)); + new Recipe(units, Blocks.titanFactory, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 90)); + new Recipe(units, Blocks.fortressFactory, new ItemStack(Items.thorium, 200), new ItemStack(Items.lead, 220), new ItemStack(Items.silicon, 150), new ItemStack(Items.surgealloy, 100), new ItemStack(Items.phasefabric, 50)); - new Recipe(units, UnitBlocks.wraithFactory, new ItemStack(Items.titanium, 60), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 90)); - new Recipe(units, UnitBlocks.ghoulFactory, new ItemStack(Items.plastanium, 80), new ItemStack(Items.titanium, 100), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 220)); - new Recipe(units, UnitBlocks.revenantFactory, new ItemStack(Items.plastanium, 300), new ItemStack(Items.titanium, 400), new ItemStack(Items.lead, 300), new ItemStack(Items.silicon, 400), new ItemStack(Items.surgealloy, 100)); + new Recipe(units, Blocks.wraithFactory, new ItemStack(Items.titanium, 60), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 90)); + new Recipe(units, Blocks.ghoulFactory, new ItemStack(Items.plastanium, 80), new ItemStack(Items.titanium, 100), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 220)); + new Recipe(units, Blocks.revenantFactory, new ItemStack(Items.plastanium, 300), new ItemStack(Items.titanium, 400), new ItemStack(Items.lead, 300), new ItemStack(Items.silicon, 400), new ItemStack(Items.surgealloy, 100)); - new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.copper, 30), new ItemStack(Items.silicon, 30)); - new Recipe(units, UnitBlocks.commandCenter, new ItemStack(Items.lead, 100), new ItemStack(Items.densealloy, 100), new ItemStack(Items.silicon, 200)); + new Recipe(units, Blocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.copper, 30), new ItemStack(Items.silicon, 30)); + new Recipe(units, Blocks.commandCenter, new ItemStack(Items.lead, 100), new ItemStack(Items.densealloy, 100), new ItemStack(Items.silicon, 200)); //LIQUIDS - new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1)).setDependencies(CraftingBlocks.smelter); - new Recipe(liquid, LiquidBlocks.pulseConduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.lead, 1)); - new Recipe(liquid, LiquidBlocks.phaseConduit, new ItemStack(Items.phasefabric, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.titanium, 20)); + new Recipe(liquid, Blocks.conduit, new ItemStack(Items.lead, 1)).setDependencies(Blocks.smelter); + new Recipe(liquid, Blocks.pulseConduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.lead, 1)); + new Recipe(liquid, Blocks.phaseConduit, new ItemStack(Items.phasefabric, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.titanium, 20)); - new Recipe(liquid, LiquidBlocks.liquidRouter, new ItemStack(Items.titanium, 4), new ItemStack(Items.lead, 4)); - new Recipe(liquid, LiquidBlocks.liquidtank, new ItemStack(Items.titanium, 50), new ItemStack(Items.lead, 50)); - new Recipe(liquid, LiquidBlocks.liquidJunction, new ItemStack(Items.titanium, 4), new ItemStack(Items.lead, 4)); - new Recipe(liquid, LiquidBlocks.bridgeConduit, new ItemStack(Items.titanium, 8), new ItemStack(Items.lead, 8)); + new Recipe(liquid, Blocks.liquidRouter, new ItemStack(Items.titanium, 4), new ItemStack(Items.lead, 4)); + new Recipe(liquid, Blocks.liquidtank, new ItemStack(Items.titanium, 50), new ItemStack(Items.lead, 50)); + new Recipe(liquid, Blocks.liquidJunction, new ItemStack(Items.titanium, 4), new ItemStack(Items.lead, 4)); + new Recipe(liquid, Blocks.bridgeConduit, new ItemStack(Items.titanium, 8), new ItemStack(Items.lead, 8)); - new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.copper, 30), new ItemStack(Items.lead, 20)).setDependencies(CraftingBlocks.smelter); - new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.copper, 140), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 70)); - new Recipe(liquid, LiquidBlocks.thermalPump, new ItemStack(Items.copper, 160), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 80), new ItemStack(Items.thorium, 70)); - } - - @Override - public ContentType type(){ - return ContentType.recipe; + new Recipe(liquid, Blocks.mechanicalPump, new ItemStack(Items.copper, 30), new ItemStack(Items.lead, 20)).setDependencies(Blocks.smelter); + new Recipe(liquid, Blocks.rotaryPump, new ItemStack(Items.copper, 140), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 70)); + new Recipe(liquid, Blocks.thermalPump, new ItemStack(Items.copper, 160), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 80), new ItemStack(Items.thorium, 70)); } } diff --git a/core/src/io/anuke/mindustry/content/StatusEffects.java b/core/src/io/anuke/mindustry/content/StatusEffects.java index eb37c73e11..bc4f0c420a 100644 --- a/core/src/io/anuke/mindustry/content/StatusEffects.java +++ b/core/src/io/anuke/mindustry/content/StatusEffects.java @@ -6,7 +6,6 @@ import io.anuke.arc.util.Time; import io.anuke.mindustry.entities.StatusController.StatusEntry; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.StatusEffect; public class StatusEffects implements ContentList{ @@ -168,9 +167,4 @@ public class StatusEffects implements ContentList{ freezing.setOpposites(burning, melting); burning.setOpposites(wet, freezing); } - - @Override - public ContentType type(){ - return ContentType.status; - } } diff --git a/core/src/io/anuke/mindustry/content/UnitTypes.java b/core/src/io/anuke/mindustry/content/UnitTypes.java index 9fcee1977e..0bbbb20e4a 100644 --- a/core/src/io/anuke/mindustry/content/UnitTypes.java +++ b/core/src/io/anuke/mindustry/content/UnitTypes.java @@ -4,7 +4,6 @@ import io.anuke.arc.collection.ObjectSet; import io.anuke.mindustry.entities.units.UnitType; import io.anuke.mindustry.entities.units.types.*; import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; public class UnitTypes implements ContentList{ public static UnitType @@ -106,9 +105,4 @@ public class UnitTypes implements ContentList{ toMine = ObjectSet.with(Items.lead, Items.copper, Items.titanium); }}; } - - @Override - public ContentType type(){ - return ContentType.unit; - } } diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index e731067a45..1d4d3b5153 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -1,7 +1,6 @@ package io.anuke.mindustry.content; import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Weapon; public class Weapons implements ContentList{ @@ -180,9 +179,4 @@ public class Weapons implements ContentList{ ammo = Bullets.healBullet; }}; } - - @Override - public ContentType type(){ - return ContentType.weapon; - } } diff --git a/core/src/io/anuke/mindustry/content/blocks/BlockList.java b/core/src/io/anuke/mindustry/content/blocks/BlockList.java deleted file mode 100644 index 85cf617fd9..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/BlockList.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; - -public abstract class BlockList implements ContentList{ - - @Override - public ContentType type(){ - return ContentType.item; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/Blocks.java b/core/src/io/anuke/mindustry/content/blocks/Blocks.java deleted file mode 100644 index 16618bb039..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/Blocks.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.graphics.CacheLayer; -import io.anuke.mindustry.type.ItemStack; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.*; -import io.anuke.arc.util.Time; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Mathf; - -public class Blocks extends BlockList implements ContentList{ - public static Block air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone, - blackstone, dirt, sand, ice, snow, grass, shrub, rock, icerock, blackrock; - - - @Override - public void load(){ - air = new Floor("air"){ - { - blend = false; - alwaysReplace = true; - } - - public void draw(Tile tile){} - public void load(){} - public void init(){} - }; - - blockpart = new BlockPart(); - - spawn = new Block("spawn"){ - - public void drawShadow(Tile tile){} - - public void draw(Tile tile){ - Draw.color(Color.SCARLET); - Lines.circle(tile.worldx(), tile.worldy(), 4f +Mathf.absin(Time.time(), 6f, 6f)); - Draw.color(); - } - }; - - //Registers build blocks from size 1-6 - //no reference is needed here since they can be looked up by name later - for(int i = 1; i <= 6; i++){ - new BuildBlock("build" + i); - } - - space = new Floor("space"){{ - placeableOn = false; - variants = 0; - cacheLayer = CacheLayer.space; - solid = true; - blend = false; - minimapColor = Color.valueOf("000001"); - }}; - - metalfloor = new Floor("metalfloor"){{ - variants = 6; - }}; - - deepwater = new Floor("deepwater"){{ - liquidColor = Color.valueOf("546bb3"); - speedMultiplier = 0.2f; - variants = 0; - liquidDrop = Liquids.water; - isLiquid = true; - status = StatusEffects.wet; - statusIntensity = 1f; - drownTime = 140f; - cacheLayer = CacheLayer.water; - minimapColor = Color.valueOf("465a96"); - }}; - - water = new Floor("water"){{ - liquidColor = Color.valueOf("546bb3"); - speedMultiplier = 0.5f; - variants = 0; - status = StatusEffects.wet; - statusIntensity = 0.9f; - liquidDrop = Liquids.water; - isLiquid = true; - cacheLayer = CacheLayer.water; - minimapColor = Color.valueOf("506eb4"); - }}; - - lava = new Floor("lava"){{ - drownTime = 100f; - liquidColor = Color.valueOf("ed5334"); - speedMultiplier = 0.2f; - damageTaken = 0.5f; - status = StatusEffects.melting; - statusIntensity = 0.8f; - variants = 0; - liquidDrop = Liquids.lava; - isLiquid = true; - cacheLayer = CacheLayer.lava; - minimapColor = Color.valueOf("ed5334"); - }}; - - tar = new Floor("tar"){{ - drownTime = 150f; - liquidColor = Color.valueOf("292929"); - status = StatusEffects.tarred; - statusIntensity = 1f; - speedMultiplier = 0.19f; - variants = 0; - liquidDrop = Liquids.oil; - isLiquid = true; - cacheLayer = CacheLayer.oil; - minimapColor = Color.valueOf("292929"); - }}; - - stone = new Floor("stone"){{ - hasOres = true; - drops = new ItemStack(Items.stone, 1); - blends = block -> block != this && !(block instanceof OreBlock); - minimapColor = Color.valueOf("323232"); - playerUnmineable = true; - }}; - - blackstone = new Floor("blackstone"){{ - drops = new ItemStack(Items.stone, 1); - minimapColor = Color.valueOf("252525"); - playerUnmineable = true; - hasOres = true; - }}; - - dirt = new Floor("dirt"){{ - minimapColor = Color.valueOf("6e501e"); - }}; - - sand = new Floor("sand"){{ - drops = new ItemStack(Items.sand, 1); - minimapColor = Color.valueOf("988a67"); - hasOres = true; - playerUnmineable = true; - }}; - - ice = new Floor("ice"){{ - dragMultiplier = 0.2f; - speedMultiplier = 0.4f; - minimapColor = Color.valueOf("b8eef8"); - hasOres = true; - }}; - - snow = new Floor("snow"){{ - minimapColor = Color.valueOf("c2d1d2"); - hasOres = true; - }}; - - grass = new Floor("grass"){{ - hasOres = true; - minimapColor = Color.valueOf("549d5b"); - }}; - - shrub = new Rock("shrub"); - - rock = new Rock("rock"){{ - variants = 2; - }}; - - icerock = new Rock("icerock"){{ - variants = 2; - }}; - - blackrock = new Rock("blackrock"){{ - variants = 1; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java deleted file mode 100644 index 034480bdcf..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java +++ /dev/null @@ -1,235 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.Fx; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ItemStack; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.production.*; - -public class CraftingBlocks extends BlockList implements ContentList{ - public static Block smelter, arcsmelter, siliconsmelter, plastaniumCompressor, phaseWeaver, alloySmelter, - pyratiteMixer, blastMixer, - cryofluidmixer, melter, separator, centrifuge, biomatterCompressor, pulverizer, solidifier, incinerator; - - @Override - public void load(){ - smelter = new Smelter("smelter"){{ - health = 70; - result = Items.densealloy; - craftTime = 45f; - burnDuration = 46f; - useFlux = true; - - consumes.items(new ItemStack(Items.copper, 1), new ItemStack(Items.lead, 2)); - consumes.item(Items.coal).optional(true); - }}; - - arcsmelter = new PowerSmelter("arc-smelter"){{ - health = 90; - craftEffect = Fx.smeltsmoke; - result = Items.densealloy; - craftTime = 30f; - size = 2; - - useFlux = true; - fluxNeeded = 2; - - consumes.items(new ItemStack(Items.copper, 1), new ItemStack(Items.lead, 2)); - consumes.power(0.1f); - }}; - - siliconsmelter = new PowerSmelter("silicon-smelter"){{ - health = 90; - craftEffect = Fx.smeltsmoke; - result = Items.silicon; - craftTime = 40f; - size = 2; - hasLiquids = false; - flameColor = Color.valueOf("ffef99"); - - consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)); - consumes.power(0.05f); - }}; - - plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{ - hasItems = true; - liquidCapacity = 60f; - craftTime = 60f; - output = Items.plastanium; - itemCapacity = 30; - size = 2; - health = 320; - hasPower = hasLiquids = true; - craftEffect = Fx.formsmoke; - updateEffect = Fx.plasticburn; - - consumes.liquid(Liquids.oil, 0.25f); - consumes.power(0.3f); - consumes.item(Items.titanium, 2); - }}; - - phaseWeaver = new PhaseWeaver("phase-weaver"){{ - craftEffect = Fx.smeltsmoke; - result = Items.phasefabric; - craftTime = 120f; - size = 2; - - consumes.items(new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10)); - consumes.power(0.5f); - }}; - - alloySmelter = new PowerSmelter("alloy-smelter"){{ - craftEffect = Fx.smeltsmoke; - result = Items.surgealloy; - craftTime = 75f; - size = 2; - - useFlux = true; - fluxNeeded = 3; - - consumes.power(0.4f); - consumes.items(new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.copper, 3)); - }}; - - cryofluidmixer = new LiquidMixer("cryofluidmixer"){{ - outputLiquid = Liquids.cryofluid; - liquidPerItem = 50f; - itemCapacity = 50; - size = 2; - hasPower = true; - - consumes.power(0.1f); - consumes.item(Items.titanium); - consumes.liquid(Liquids.water, 0.3f); - }}; - - blastMixer = new GenericCrafter("blast-mixer"){{ - itemCapacity = 20; - hasItems = true; - hasPower = true; - hasLiquids = true; - output = Items.blastCompound; - size = 2; - - consumes.liquid(Liquids.oil, 0.05f); - consumes.item(Items.pyratite, 1); - consumes.power(0.04f); - }}; - - pyratiteMixer = new PowerSmelter("pyratite-mixer"){{ - flameColor = Color.CLEAR; - itemCapacity = 20; - hasItems = true; - hasPower = true; - result = Items.pyratite; - - size = 2; - - consumes.power(0.02f); - consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 2), new ItemStack(Items.sand, 2)); - }}; - - melter = new PowerCrafter("melter"){{ - health = 200; - outputLiquid = Liquids.lava; - outputLiquidAmount = 1f; - itemCapacity = 20; - craftTime = 10f; - hasLiquids = hasPower = true; - - consumes.power(0.1f); - consumes.item(Items.stone, 1); - }}; - - separator = new Separator("separator"){{ - results = new ItemStack[]{ - new ItemStack(null, 10), - new ItemStack(Items.sand, 10), - new ItemStack(Items.stone, 9), - new ItemStack(Items.copper, 4), - new ItemStack(Items.lead, 2), - new ItemStack(Items.coal, 2), - new ItemStack(Items.titanium, 1), - }; - filterTime = 40f; - itemCapacity = 40; - health = 50; - - consumes.item(Items.stone, 2); - consumes.liquid(Liquids.water, 0.3f); - }}; - - centrifuge = new Separator("centrifuge"){{ - results = new ItemStack[]{ - new ItemStack(null, 13), - new ItemStack(Items.sand, 12), - new ItemStack(Items.stone, 11), - new ItemStack(Items.copper, 5), - new ItemStack(Items.lead, 3), - new ItemStack(Items.coal, 3), - new ItemStack(Items.titanium, 2), - new ItemStack(Items.thorium, 1) - }; - - hasPower = true; - filterTime = 15f; - itemCapacity = 60; - health = 50 * 4; - spinnerLength = 1.5f; - spinnerRadius = 3.5f; - spinnerThickness = 1.5f; - spinnerSpeed = 3f; - size = 2; - - consumes.item(Items.stone, 2); - consumes.power(0.2f); - consumes.liquid(Liquids.water, 0.5f); - }}; - - biomatterCompressor = new Compressor("biomattercompressor"){{ - liquidCapacity = 60f; - itemCapacity = 50; - craftTime = 20f; - outputLiquid = Liquids.oil; - outputLiquidAmount = 2.5f; - size = 2; - health = 320; - hasLiquids = true; - - consumes.item(Items.biomatter, 1); - consumes.power(0.06f); - }}; - - pulverizer = new Pulverizer("pulverizer"){{ - itemCapacity = 40; - output = Items.sand; - health = 80; - craftEffect = Fx.pulverize; - craftTime = 40f; - updateEffect = Fx.pulverizeSmall; - hasItems = hasPower = true; - - consumes.item(Items.stone, 1); - consumes.power(0.05f); - }}; - - solidifier = new GenericCrafter("solidifer"){{ - liquidCapacity = 21f; - craftTime = 14; - output = Items.stone; - itemCapacity = 20; - health = 80; - craftEffect = Fx.purifystone; - hasLiquids = hasItems = true; - - consumes.liquid(Liquids.lava, 1f); - }}; - - incinerator = new Incinerator("incinerator"){{ - health = 90; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java deleted file mode 100644 index b3906fb184..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java +++ /dev/null @@ -1,180 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.arc.collection.Array; -import io.anuke.annotations.Annotations.Loc; -import io.anuke.annotations.Annotations.Remote; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.entities.Player; -import io.anuke.mindustry.entities.TileEntity; -import io.anuke.mindustry.gen.Call; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.Item; -import io.anuke.mindustry.type.Liquid; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.PowerBlock; -import io.anuke.mindustry.world.blocks.distribution.Sorter; -import io.anuke.mindustry.world.blocks.power.PowerNode; -import io.anuke.mindustry.world.meta.BlockStat; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.scene.ui.ButtonGroup; -import io.anuke.arc.scene.ui.ImageButton; -import io.anuke.arc.scene.ui.layout.Table; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; -import static io.anuke.mindustry.Vars.*; - -public class DebugBlocks extends BlockList implements ContentList{ - public static Block powerVoid, powerInfinite, itemSource, liquidSource, itemVoid; - - @Remote(targets = Loc.both, called = Loc.both, forward = true) - public static void setLiquidSourceLiquid(Player player, Tile tile, Liquid liquid){ - LiquidSourceEntity entity = tile.entity(); - entity.source = liquid; - } - - @Override - public void load(){ - powerVoid = new PowerBlock("powervoid"){ - { - consumes.power(Float.MAX_VALUE); - } - - @Override - public void init(){ - super.init(); - stats.remove(BlockStat.powerUse); - } - }; - - powerInfinite = new PowerNode("powerinfinite"){ - { - maxNodes = 100; - outputsPower = true; - consumesPower = false; - } - - @Override - public float getPowerProduction(Tile tile){ - return 10000f; - } - }; - - itemSource = new Sorter("itemsource"){ - { - hasItems = true; - } - - @Override - public boolean outputsItems(){ - return true; - } - - @Override - public void update(Tile tile){ - SorterEntity entity = tile.entity(); - if(entity.sortItem == null) return; - - entity.items.set(entity.sortItem, 1); - tryDump(tile, entity.sortItem); - entity.items.set(entity.sortItem, 0); - } - - @Override - public boolean acceptItem(Item item, Tile tile, Tile source){ - return false; - } - }; - - liquidSource = new Block("liquidsource"){ - { - update = true; - solid = true; - hasLiquids = true; - liquidCapacity = 100f; - configurable = true; - outputsLiquid = true; - } - - @Override - public void update(Tile tile){ - LiquidSourceEntity entity = tile.entity(); - - tile.entity.liquids.add(entity.source, liquidCapacity); - tryDumpLiquid(tile, entity.source); - } - - @Override - public void draw(Tile tile){ - super.draw(tile); - - LiquidSourceEntity entity = tile.entity(); - - Draw.color(entity.source.color); - Draw.rect("blank", tile.worldx(), tile.worldy(), 4f, 4f); - Draw.color(); - } - - @Override - public void buildTable(Tile tile, Table table){ - LiquidSourceEntity entity = tile.entity(); - - Array items = content.liquids(); - - ButtonGroup group = new ButtonGroup<>(); - Table cont = new Table(); - - for(int i = 0; i < items.size; i++){ - if(!control.unlocks.isUnlocked(items.get(i))) continue; - - final int f = i; - ImageButton button = cont.addImageButton("liquid-icon-" + items.get(i).name, "clear-toggle", 24, - () -> Call.setLiquidSourceLiquid(null, tile, items.get(f))).size(38).group(group).get(); - button.setChecked(entity.source.id == f); - - if(i % 4 == 3){ - cont.row(); - } - } - - table.add(cont); - } - - @Override - public TileEntity newEntity(){ - return new LiquidSourceEntity(); - } - }; - - itemVoid = new Block("itemvoid"){ - { - update = solid = true; - } - - @Override - public void handleItem(Item item, Tile tile, Tile source){ - } - - @Override - public boolean acceptItem(Item item, Tile tile, Tile source){ - return true; - } - }; - } - - class LiquidSourceEntity extends TileEntity{ - public Liquid source = Liquids.water; - - @Override - public void writeConfig(DataOutput stream) throws IOException{ - stream.writeByte(source.id); - } - - @Override - public void readConfig(DataInput stream) throws IOException{ - source = content.liquid(stream.readByte()); - } - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java deleted file mode 100644 index 84e48c3207..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java +++ /dev/null @@ -1,98 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.Fx; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.defense.*; - -public class DefenseBlocks extends BlockList implements ContentList{ - public static Block copperWall, copperWallLarge, denseAlloyWall, denseAlloyWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, - phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine; - - @Override - public void load(){ - int wallHealthMultiplier = 3; - - copperWall = new Wall("copper-wall"){{ - health = 80 * wallHealthMultiplier; - }}; - - copperWallLarge = new Wall("copper-wall-large"){{ - health = 80 * 4 * wallHealthMultiplier; - size = 2; - }}; - - denseAlloyWall = new Wall("dense-alloy-wall"){{ - health = 110 * wallHealthMultiplier; - }}; - - denseAlloyWallLarge = new Wall("dense-alloy-wall-large"){{ - health = 110 * wallHealthMultiplier * 4; - size = 2; - }}; - - thoriumWall = new Wall("thorium-wall"){{ - health = 200 * wallHealthMultiplier; - }}; - - thoriumWallLarge = new Wall("thorium-wall-large"){{ - health = 200 * wallHealthMultiplier * 4; - size = 2; - }}; - - phaseWall = new DeflectorWall("phase-wall"){{ - health = 150 * wallHealthMultiplier; - }}; - - phaseWallLarge = new DeflectorWall("phase-wall-large"){{ - health = 150 * 4 * wallHealthMultiplier; - size = 2; - }}; - - surgeWall = new SurgeWall("surge-wall"){{ - health = 230 * wallHealthMultiplier; - }}; - - surgeWallLarge = new SurgeWall("surge-wall-large"){{ - health = 230 * 4 * wallHealthMultiplier; - size = 2; - }}; - - door = new Door("door"){{ - health = 100 * wallHealthMultiplier; - }}; - - doorLarge = new Door("door-large"){{ - openfx = Fx.dooropenlarge; - closefx = Fx.doorcloselarge; - health = 100 * 4 * wallHealthMultiplier; - size = 2; - }}; - - mendProjector = new MendProjector("mend-projector"){{ - consumes.power(0.2f, 1.0f); - size = 2; - consumes.item(Items.phasefabric).optional(true); - }}; - - overdriveProjector = new OverdriveProjector("overdrive-projector"){{ - consumes.power(0.35f, 1.0f); - size = 2; - consumes.item(Items.phasefabric).optional(true); - }}; - - forceProjector = new ForceProjector("force-projector"){{ - size = 3; - consumes.item(Items.phasefabric).optional(true); - }}; - - shockMine = new ShockMine("shock-mine"){{ - health = 40; - damage = 11; - tileDamage = 7f; - length = 10; - tendrils = 5; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java deleted file mode 100644 index 0266642557..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.distribution.*; - -public class DistributionBlocks extends BlockList implements ContentList{ - public static Block conveyor, titaniumconveyor, distributor, junction, - itemBridge, phaseConveyor, sorter, router, overflowGate, massDriver; - - @Override - public void load(){ - - conveyor = new Conveyor("conveyor"){{ - health = 45; - speed = 0.03f; - }}; - - titaniumconveyor = new Conveyor("titanium-conveyor"){{ - health = 65; - speed = 0.07f; - }}; - - junction = new Junction("junction"){{ - speed = 26; - capacity = 32; - }}; - - itemBridge = new BufferedItemBridge("bridge-conveyor"){{ - range = 4; - speed = 60f; - bufferCapacity = 15; - }}; - - phaseConveyor = new ItemBridge("phase-conveyor"){{ - range = 12; - hasPower = true; - consumes.power(0.03f, 1.0f); - }}; - - sorter = new Sorter("sorter"); - - router = new Router("router"); - - distributor = new Router("distributor"){{ - size = 2; - }}; - - overflowGate = new OverflowGate("overflow-gate"); - - massDriver = new MassDriver("mass-driver"){{ - size = 3; - itemCapacity = 60; - range = 440f; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/LiquidBlocks.java b/core/src/io/anuke/mindustry/content/blocks/LiquidBlocks.java deleted file mode 100644 index 164f72fa44..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/LiquidBlocks.java +++ /dev/null @@ -1,70 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.distribution.*; -import io.anuke.mindustry.world.blocks.production.Pump; - -public class LiquidBlocks extends BlockList implements ContentList{ - public static Block mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidtank, liquidJunction, bridgeConduit, phaseConduit; - - @Override - public void load(){ - - mechanicalPump = new Pump("mechanical-pump"){{ - pumpAmount = 0.1f; - tier = 0; - }}; - - rotaryPump = new Pump("rotary-pump"){{ - pumpAmount = 0.2f; - consumes.power(0.015f); - liquidCapacity = 30f; - hasPower = true; - size = 2; - tier = 1; - }}; - - thermalPump = new Pump("thermal-pump"){{ - pumpAmount = 0.275f; - consumes.power(0.03f); - liquidCapacity = 40f; - hasPower = true; - size = 2; - tier = 2; - }}; - - conduit = new Conduit("conduit"){{ - health = 45; - }}; - - pulseConduit = new Conduit("pulse-conduit"){{ - liquidCapacity = 16f; - liquidFlowFactor = 4.9f; - health = 90; - }}; - - liquidRouter = new LiquidRouter("liquid-router"){{ - liquidCapacity = 20f; - }}; - - liquidtank = new LiquidTank("liquid-tank"){{ - size = 3; - liquidCapacity = 1500f; - health = 500; - }}; - - liquidJunction = new LiquidJunction("liquid-junction"); - - bridgeConduit = new LiquidExtendingBridge("bridge-conduit"){{ - range = 4; - hasPower = false; - }}; - - phaseConduit = new LiquidBridge("phase-conduit"){{ - range = 12; - hasPower = true; - consumes.power(0.03f, 1.0f); - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/OreBlocks.java b/core/src/io/anuke/mindustry/content/blocks/OreBlocks.java deleted file mode 100644 index 515542e9fd..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/OreBlocks.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.arc.collection.ObjectMap; -import io.anuke.mindustry.type.Item; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.Floor; -import io.anuke.mindustry.world.blocks.OreBlock; - -import static io.anuke.mindustry.Vars.content; - -public class OreBlocks extends BlockList{ - private static final ObjectMap> oreBlockMap = new ObjectMap<>(); - - public static Block get(Block floor, Item item){ - if(!oreBlockMap.containsKey(item)) throw new IllegalArgumentException("Item '" + item + "' is not an ore!"); - if(!oreBlockMap.get(item).containsKey(floor)) - throw new IllegalArgumentException("Block '" + floor.name + "' does not support ores!"); - return oreBlockMap.get(item).get(floor); - } - - @Override - public void load(){ - - for(Item item : content.items()){ - if(!item.genOre) continue; - ObjectMap map = new ObjectMap<>(); - oreBlockMap.put(item, map); - - for(Block block : content.blocks()){ - if(block instanceof Floor && ((Floor) block).hasOres){ - map.put(block, new OreBlock(item, (Floor) block)); - } - } - } - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java deleted file mode 100644 index af35629803..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java +++ /dev/null @@ -1,81 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.Fx; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.power.*; - -public class PowerBlocks extends BlockList implements ContentList{ - public static Block combustionGenerator, thermalGenerator, turbineGenerator, rtgGenerator, solarPanel, largeSolarPanel, - thoriumReactor, fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge; - - @Override - public void load(){ - combustionGenerator = new BurnerGenerator("combustion-generator"){{ - powerProduction = 0.09f; - itemDuration = 40f; - }}; - - thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{ - maxLiquidGenerate = 2f; - powerProduction = 2f; - generateEffect = Fx.redgeneratespark; - size = 2; - }}; - - turbineGenerator = new TurbineGenerator("turbine-generator"){{ - powerProduction = 0.28f; - itemDuration = 30f; - consumes.liquid(Liquids.water, 0.05f); - size = 2; - }}; - - rtgGenerator = new DecayGenerator("rtg-generator"){{ - size = 2; - powerProduction = 0.3f; - itemDuration = 220f; - }}; - - solarPanel = new SolarGenerator("solar-panel"){{ - powerProduction = 0.0045f; - }}; - - largeSolarPanel = new SolarGenerator("solar-panel-large"){{ - size = 3; - powerProduction = 0.055f; - }}; - - thoriumReactor = new NuclearReactor("thorium-reactor"){{ - size = 3; - health = 700; - powerProduction = 1.1f; - }}; - - fusionReactor = new FusionReactor("fusion-reactor"){{ - size = 4; - health = 600; - }}; - - battery = new Battery("battery"){{ - consumes.powerBuffered(320f, 1f); - }}; - - batteryLarge = new Battery("battery-large"){{ - size = 3; - consumes.powerBuffered(2000f, 1f); - }}; - - powerNode = new PowerNode("power-node"){{ - maxNodes = 4; - laserRange = 6; - }}; - - powerNodeLarge = new PowerNode("power-node-large"){{ - size = 2; - maxNodes = 6; - laserRange = 9.5f; - }}; - - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java deleted file mode 100644 index 30a5f8f5a5..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java +++ /dev/null @@ -1,112 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.Fx; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.production.Cultivator; -import io.anuke.mindustry.world.blocks.production.Drill; -import io.anuke.mindustry.world.blocks.production.Fracker; -import io.anuke.mindustry.world.blocks.production.SolidPump; - -public class ProductionBlocks extends BlockList implements ContentList{ - public static Block mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, plasmaDrill, waterExtractor, oilExtractor, cultivator; - - @Override - public void load(){ - mechanicalDrill = new Drill("mechanical-drill"){{ - tier = 2; - drillTime = 300; - size = 2; - drawMineItem = true; - }}; - - pneumaticDrill = new Drill("pneumatic-drill"){{ - tier = 3; - drillTime = 240; - size = 2; - drawMineItem = true; - }}; - - laserDrill = new Drill("laser-drill"){{ - drillTime = 140; - size = 2; - hasPower = true; - tier = 4; - updateEffect = Fx.pulverizeMedium; - drillEffect = Fx.mineBig; - - consumes.power(0.11f); - }}; - - blastDrill = new Drill("blast-drill"){{ - drillTime = 60; - size = 3; - drawRim = true; - hasPower = true; - tier = 5; - updateEffect = Fx.pulverizeRed; - updateEffectChance = 0.03f; - drillEffect = Fx.mineHuge; - rotateSpeed = 6f; - warmupSpeed = 0.01f; - - consumes.power(0.3f); - }}; - - plasmaDrill = new Drill("plasma-drill"){{ - heatColor = Color.valueOf("ff461b"); - drillTime = 50; - size = 4; - hasLiquids = true; - hasPower = true; - tier = 5; - rotateSpeed = 9f; - drawRim = true; - updateEffect = Fx.pulverizeRedder; - updateEffectChance = 0.04f; - drillEffect = Fx.mineHuge; - warmupSpeed = 0.005f; - - consumes.power(0.7f); - }}; - - waterExtractor = new SolidPump("water-extractor"){{ - result = Liquids.water; - pumpAmount = 0.065f; - size = 2; - liquidCapacity = 30f; - rotateSpeed = 1.4f; - - consumes.power(0.09f); - }}; - - oilExtractor = new Fracker("oil-extractor"){{ - result = Liquids.oil; - updateEffect = Fx.pulverize; - liquidCapacity = 50f; - updateEffectChance = 0.05f; - pumpAmount = 0.09f; - size = 3; - liquidCapacity = 30f; - - consumes.item(Items.sand); - consumes.power(0.3f); - consumes.liquid(Liquids.water, 0.15f); - }}; - - cultivator = new Cultivator("cultivator"){{ - result = Items.biomatter; - drillTime = 200; - size = 2; - hasLiquids = true; - hasPower = true; - - consumes.power(0.08f); - consumes.liquid(Liquids.water, 0.15f); - }}; - - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java b/core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java deleted file mode 100644 index 9972317a99..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java +++ /dev/null @@ -1,33 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.storage.CoreBlock; -import io.anuke.mindustry.world.blocks.storage.SortedUnloader; -import io.anuke.mindustry.world.blocks.storage.Vault; - -public class StorageBlocks extends BlockList implements ContentList{ - public static Block core, vault, container, unloader; - - @Override - public void load(){ - core = new CoreBlock("core"){{ - health = 1100; - itemCapacity = 3000; - }}; - - vault = new Vault("vault"){{ - size = 3; - itemCapacity = 1000; - }}; - - container = new Vault("container"){{ - size = 2; - itemCapacity = 300; - }}; - - unloader = new SortedUnloader("unloader"){{ - speed = 7f; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java deleted file mode 100644 index dd963b0a6e..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java +++ /dev/null @@ -1,256 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.arc.graphics.Color; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.Fx; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.defense.turrets.*; - -public class TurretBlocks extends BlockList implements ContentList{ - public static Block duo, scorch, hail, wave, lancer, arc, swarmer, salvo, - fuse, ripple, cyclone, spectre, meltdown; - - @Override - public void load(){ - duo = new DoubleTurret("duo"){{ - ammo( - Items.copper, Bullets.standardCopper, - Items.densealloy, Bullets.standardDense, - Items.pyratite, Bullets.standardIncendiary, - Items.silicon, Bullets.standardHoming - ); - reload = 25f; - restitution = 0.03f; - range = 90f; - shootCone = 15f; - ammoUseEffect = Fx.shellEjectSmall; - health = 80; - inaccuracy = 2f; - rotatespeed = 10f; - }}; - - hail = new ArtilleryTurret("hail"){{ - ammo( - Items.densealloy, Bullets.artilleryDense, - Items.silicon, Bullets.artilleryHoming, - Items.pyratite, Bullets.artlleryIncendiary - ); - reload = 60f; - recoil = 2f; - range = 230f; - inaccuracy = 1f; - shootCone = 10f; - health = 120; - }}; - - scorch = new LiquidTurret("scorch"){{ - ammo(Liquids.oil, Bullets.basicFlame); - recoil = 0f; - reload = 4f; - shootCone = 50f; - ammoUseEffect = Fx.shellEjectSmall; - health = 160; - }}; - - wave = new LiquidTurret("wave"){{ - ammo( - Liquids.water, Bullets.waterShot, - Liquids.lava, Bullets.lavaShot, - Liquids.cryofluid, Bullets.cryoShot, - Liquids.oil, Bullets.oilShot - ); - size = 2; - recoil = 0f; - reload = 4f; - inaccuracy = 5f; - shootCone = 50f; - shootEffect = Fx.shootLiquid; - range = 90f; - health = 360; - - drawer = (tile, entity) -> { - Draw.rect(region, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); - - Draw.color(entity.liquids.current().color); - Draw.alpha(entity.liquids.total() / liquidCapacity); - Draw.rect(name + "-liquid", tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); - Draw.color(); - }; - }}; - - lancer = new ChargeTurret("lancer"){{ - range = 90f; - chargeTime = 60f; - chargeMaxDelay = 30f; - chargeEffects = 7; - shootType = Bullets.lancerLaser; - recoil = 2f; - reload = 100f; - cooldown = 0.03f; - powerUsed = 1 / 3f; - consumes.powerBuffered(60f); - shootShake = 2f; - shootEffect = Fx.lancerLaserShoot; - smokeEffect = Fx.lancerLaserShootSmoke; - chargeEffect = Fx.lancerLaserCharge; - chargeBeginEffect = Fx.lancerLaserChargeBegin; - heatColor = Color.RED; - size = 2; - health = 320; - targetAir = false; - }}; - - arc = new PowerTurret("arc"){{ - shootType = Bullets.arc; - reload = 85f; - shootShake = 1f; - shootCone = 40f; - rotatespeed = 8f; - powerUsed = 1f / 3f; - consumes.powerBuffered(30f); - range = 150f; - shootEffect = Fx.lightningShoot; - heatColor = Color.RED; - recoil = 1f; - size = 1; - }}; - - swarmer = new BurstTurret("swarmer"){{ - ammo( - Items.blastCompound, Bullets.missileExplosive, - Items.pyratite, Bullets.missileIncendiary, - Items.surgealloy, Bullets.missileSurge - ); - reload = 50f; - shots = 4; - burstSpacing = 5; - inaccuracy = 10f; - range = 140f; - xRand = 6f; - size = 2; - health = 380; - }}; - - salvo = new BurstTurret("salvo"){{ - ammo( - Items.copper, Bullets.standardCopper, - Items.densealloy, Bullets.standardDense, - Items.pyratite, Bullets.standardIncendiary, - Items.silicon, Bullets.standardHoming, - Items.thorium, Bullets.standardThorium - ); - - size = 2; - range = 120f; - reload = 35f; - restitution = 0.03f; - ammoEjectBack = 3f; - cooldown = 0.03f; - recoil = 3f; - shootShake = 2f; - burstSpacing = 4; - shots = 3; - ammoUseEffect = Fx.shellEjectBig; - health = 360; - }}; - - ripple = new ArtilleryTurret("ripple"){{ - ammo( - Items.densealloy, Bullets.artilleryDense, - Items.silicon, Bullets.artilleryHoming, - Items.pyratite, Bullets.artlleryIncendiary, - Items.blastCompound, Bullets.artilleryExplosive, - Items.plastanium, Bullets.arilleryPlastic - ); - size = 3; - shots = 4; - inaccuracy = 12f; - reload = 60f; - ammoEjectBack = 5f; - ammoUseEffect = Fx.shellEjectBig; - cooldown = 0.03f; - velocityInaccuracy = 0.2f; - restitution = 0.02f; - recoil = 6f; - shootShake = 2f; - range = 320f; - - health = 550; - }}; - - cyclone = new ItemTurret("cyclone"){{ - ammo( - Items.blastCompound, Bullets.flakExplosive, - Items.plastanium, Bullets.flakPlastic, - Items.surgealloy, Bullets.flakSurge - ); - xRand = 4f; - reload = 8f; - range = 145f; - size = 3; - recoil = 3f; - rotatespeed = 10f; - inaccuracy = 13f; - shootCone = 30f; - - health = 145 * size * size; - }}; - - fuse = new ItemTurret("fuse"){{ - ammo(Items.densealloy, Bullets.fuseShot); - reload = 50f; - shootShake = 4f; - range = 80f; - recoil = 5f; - restitution = 0.1f; - size = 3; - - health = 155 * size * size; - }}; - - spectre = new DoubleTurret("spectre"){{ - ammo( - Items.densealloy, Bullets.standardDenseBig, - Items.pyratite, Bullets.standardIncendiaryBig, - Items.thorium, Bullets.standardThoriumBig - ); - reload = 6f; - coolantMultiplier = 0.5f; - maxCoolantUsed = 1.5f; - restitution = 0.1f; - ammoUseEffect = Fx.shellEjectBig; - range = 200f; - inaccuracy = 3f; - recoil = 3f; - xRand = 3f; - shotWidth = 4f; - shootShake = 2f; - shots = 2; - size = 4; - shootCone = 24f; - - health = 155 * size * size; - }}; - - meltdown = new LaserTurret("meltdown"){{ - shootType = Bullets.meltdownLaser; - shootEffect = Fx.shootBigSmoke2; - shootCone = 40f; - recoil = 4f; - size = 4; - shootShake = 2f; - powerUsed = 0.5f; - consumes.powerBuffered(120f); - range = 160f; - reload = 200f; - firingMoveFract = 0.1f; - shootDuration = 220f; - - health = 165 * size * size; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java b/core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java deleted file mode 100644 index 14ad6cbafa..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java +++ /dev/null @@ -1,95 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.UnitTypes; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ItemStack; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.units.*; - -public class UnitBlocks extends BlockList implements ContentList{ - public static Block - spiritFactory, phantomFactory, - wraithFactory, ghoulFactory, revenantFactory, - daggerFactory, titanFactory, fortressFactory, - reconstructor, repairPoint, commandCenter; - - @Override - public void load(){ - spiritFactory = new UnitFactory("spirit-factory"){{ - type = UnitTypes.spirit; - produceTime = 5700; - size = 2; - consumes.power(0.08f); - consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)); - }}; - - phantomFactory = new UnitFactory("phantom-factory"){{ - type = UnitTypes.phantom; - produceTime = 7300; - size = 2; - consumes.power(0.2f); - consumes.items(new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)); - }}; - - wraithFactory = new UnitFactory("wraith-factory"){{ - type = UnitTypes.wraith; - produceTime = 1800; - size = 2; - consumes.power(0.1f); - consumes.items(new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 10)); - }}; - - ghoulFactory = new UnitFactory("ghoul-factory"){{ - type = UnitTypes.ghoul; - produceTime = 3600; - size = 3; - consumes.power(0.2f); - consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.titanium, 30), new ItemStack(Items.plastanium, 20)); - }}; - - revenantFactory = new UnitFactory("revenant-factory"){{ - type = UnitTypes.revenant; - produceTime = 8000; - size = 4; - consumes.power(0.3f); - consumes.items(new ItemStack(Items.silicon, 80), new ItemStack(Items.titanium, 80), new ItemStack(Items.plastanium, 50)); - }}; - - daggerFactory = new UnitFactory("dagger-factory"){{ - type = UnitTypes.dagger; - produceTime = 1700; - size = 2; - consumes.power(0.05f); - consumes.items(new ItemStack(Items.silicon, 10)); - }}; - - titanFactory = new UnitFactory("titan-factory"){{ - type = UnitTypes.titan; - produceTime = 3400; - size = 3; - consumes.power(0.15f); - consumes.items(new ItemStack(Items.silicon, 20), new ItemStack(Items.thorium, 30)); - }}; - - fortressFactory = new UnitFactory("fortress-factory"){{ - type = UnitTypes.fortress; - produceTime = 5000; - size = 3; - consumes.power(0.2f); - consumes.items(new ItemStack(Items.silicon, 40), new ItemStack(Items.thorium, 50)); - }}; - - repairPoint = new RepairPoint("repair-point"){{ - repairSpeed = 0.1f; - }}; - - reconstructor = new Reconstructor("reconstructor"){{ - size = 2; - }}; - - commandCenter = new CommandCenter("command-center"){{ - size = 2; - }}; - } -} diff --git a/core/src/io/anuke/mindustry/content/blocks/UpgradeBlocks.java b/core/src/io/anuke/mindustry/content/blocks/UpgradeBlocks.java deleted file mode 100644 index 359033c45e..0000000000 --- a/core/src/io/anuke/mindustry/content/blocks/UpgradeBlocks.java +++ /dev/null @@ -1,61 +0,0 @@ -package io.anuke.mindustry.content.blocks; - -import io.anuke.mindustry.content.Mechs; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.units.MechPad; - -public class UpgradeBlocks extends BlockList{ - public static Block alphaPad, deltaPad, tauPad, omegaPad, dartPad, javelinPad, tridentPad, glaivePad; - - @Override - public void load(){ - - alphaPad = new MechPad("alpha-mech-pad"){{ - mech = Mechs.alpha; - size = 2; - consumes.powerBuffered(50f); - }}; - - deltaPad = new MechPad("delta-mech-pad"){{ - mech = Mechs.delta; - size = 2; - consumes.powerBuffered(70f); - }}; - - tauPad = new MechPad("tau-mech-pad"){{ - mech = Mechs.tau; - size = 2; - consumes.powerBuffered(100f); - }}; - - omegaPad = new MechPad("omega-mech-pad"){{ - mech = Mechs.omega; - size = 3; - consumes.powerBuffered(120f); - }}; - - dartPad = new MechPad("dart-ship-pad"){{ - mech = Mechs.dart; - size = 2; - consumes.powerBuffered(50f); - }}; - - javelinPad = new MechPad("javelin-ship-pad"){{ - mech = Mechs.javelin; - size = 2; - consumes.powerBuffered(80f); - }}; - - tridentPad = new MechPad("trident-ship-pad"){{ - mech = Mechs.trident; - size = 2; - consumes.powerBuffered(100f); - }}; - - glaivePad = new MechPad("glaive-ship-pad"){{ - mech = Mechs.glaive; - size = 3; - consumes.powerBuffered(120f); - }}; - } -} diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index bb7b015539..7f9091e0e7 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -6,7 +6,6 @@ import io.anuke.arc.collection.ObjectSet; import io.anuke.arc.function.Consumer; import io.anuke.arc.util.Log; import io.anuke.mindustry.content.*; -import io.anuke.mindustry.content.blocks.*; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; @@ -65,18 +64,6 @@ public class ContentLoader{ //blocks new Blocks(), - new DefenseBlocks(), - new DistributionBlocks(), - new ProductionBlocks(), - new TurretBlocks(), - new DebugBlocks(), - new LiquidBlocks(), - new StorageBlocks(), - new UnitBlocks(), - new PowerBlocks(), - new CraftingBlocks(), - new UpgradeBlocks(), - new OreBlocks(), //not really a content class, but this makes initialization easier new ColorMapper(), diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index 16f0b1185c..c942397815 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -22,7 +22,7 @@ import io.anuke.arc.util.Time; import io.anuke.arc.util.io.ByteBufferOutput; import io.anuke.arc.util.io.CountableByteArrayOutputStream; import io.anuke.mindustry.content.Mechs; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; diff --git a/core/src/io/anuke/mindustry/core/World.java b/core/src/io/anuke/mindustry/core/World.java index 490ac28612..9fadff2f44 100644 --- a/core/src/io/anuke/mindustry/core/World.java +++ b/core/src/io/anuke/mindustry/core/World.java @@ -15,7 +15,7 @@ import io.anuke.arc.util.Tmp; import io.anuke.mindustry.ai.BlockIndexer; import io.anuke.mindustry.ai.Pathfinder; import io.anuke.mindustry.ai.WaveSpawner; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.game.EventType.TileChangeEvent; import io.anuke.mindustry.game.EventType.WorldLoadEvent; diff --git a/core/src/io/anuke/mindustry/editor/EditorTool.java b/core/src/io/anuke/mindustry/editor/EditorTool.java index 3693f03266..981fa88057 100644 --- a/core/src/io/anuke/mindustry/editor/EditorTool.java +++ b/core/src/io/anuke/mindustry/editor/EditorTool.java @@ -4,7 +4,7 @@ import io.anuke.arc.collection.IntArray; import io.anuke.arc.function.IntPositionConsumer; import io.anuke.arc.util.Pack; import io.anuke.arc.util.Structs; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.maps.MapTileData; import io.anuke.mindustry.maps.MapTileData.DataPosition; import io.anuke.mindustry.maps.MapTileData.TileDataMarker; diff --git a/core/src/io/anuke/mindustry/editor/MapEditor.java b/core/src/io/anuke/mindustry/editor/MapEditor.java index 369f9f6682..e7fee69dbd 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditor.java +++ b/core/src/io/anuke/mindustry/editor/MapEditor.java @@ -5,7 +5,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Pack; import io.anuke.arc.util.Structs; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.editor.DrawOperation.TileOperation; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.maps.MapTileData; diff --git a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java index 8f3818e5f1..0d413c84cf 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java +++ b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java @@ -18,7 +18,7 @@ import io.anuke.arc.scene.ui.layout.Unit; import io.anuke.arc.scene.utils.UIUtils; import io.anuke.arc.util.*; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.blocks.StorageBlocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.core.Platform; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.io.MapIO; @@ -521,7 +521,7 @@ public class MapEditorDialog extends Dialog implements Disposable{ for(Block block : Vars.content.blocks()){ TextureRegion[] regions = block.getCompactIcon(); if((block.synthetic() && (Recipe.getByResult(block) == null || !control.unlocks.isUnlocked(Recipe.getByResult(block)))) - && block != StorageBlocks.core){ + && block != Blocks.core){ continue; } diff --git a/core/src/io/anuke/mindustry/entities/Unit.java b/core/src/io/anuke/mindustry/entities/Unit.java index de4427b37a..8a10379838 100644 --- a/core/src/io/anuke/mindustry/entities/Unit.java +++ b/core/src/io/anuke/mindustry/entities/Unit.java @@ -15,7 +15,7 @@ import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.traits.*; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.game.Teams.TeamData; diff --git a/core/src/io/anuke/mindustry/entities/effect/Puddle.java b/core/src/io/anuke/mindustry/entities/effect/Puddle.java index 167d6f08e9..8ca9022031 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Puddle.java +++ b/core/src/io/anuke/mindustry/entities/effect/Puddle.java @@ -19,7 +19,7 @@ import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Units; diff --git a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java index 73dedf309d..dc1f1ba96b 100644 --- a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java @@ -15,7 +15,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; diff --git a/core/src/io/anuke/mindustry/entities/units/types/Drone.java b/core/src/io/anuke/mindustry/entities/units/types/Drone.java index 7d6ffb133a..ea0458ab54 100644 --- a/core/src/io/anuke/mindustry/entities/units/types/Drone.java +++ b/core/src/io/anuke/mindustry/entities/units/types/Drone.java @@ -6,7 +6,7 @@ import io.anuke.arc.entities.EntityGroup; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.util.Structs; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Units; diff --git a/core/src/io/anuke/mindustry/game/ContentList.java b/core/src/io/anuke/mindustry/game/ContentList.java index 838777cb84..8fc59c8bf2 100644 --- a/core/src/io/anuke/mindustry/game/ContentList.java +++ b/core/src/io/anuke/mindustry/game/ContentList.java @@ -1,12 +1,7 @@ package io.anuke.mindustry.game; -import io.anuke.mindustry.type.ContentType; - /**Interface for a list of content to be loaded in {@link io.anuke.mindustry.core.ContentLoader}.*/ public interface ContentList{ /**This method should create all the content.*/ void load(); - - /**This method should return the type of content being loaded.*/ - ContentType type(); } diff --git a/core/src/io/anuke/mindustry/graphics/BlockRenderer.java b/core/src/io/anuke/mindustry/graphics/BlockRenderer.java index 680c007cfa..6a7e2a258b 100644 --- a/core/src/io/anuke/mindustry/graphics/BlockRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/BlockRenderer.java @@ -8,7 +8,7 @@ import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.glutils.FrameBuffer; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.game.EventType.TileChangeEvent; import io.anuke.mindustry.game.EventType.WorldLoadEvent; import io.anuke.mindustry.game.Team; diff --git a/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java b/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java index ed56e89b1c..84aebcb6eb 100644 --- a/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java @@ -9,7 +9,7 @@ import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.input.InputHandler; diff --git a/core/src/io/anuke/mindustry/input/DesktopInput.java b/core/src/io/anuke/mindustry/input/DesktopInput.java index 034a896272..84e23a5d00 100644 --- a/core/src/io/anuke/mindustry/input/DesktopInput.java +++ b/core/src/io/anuke/mindustry/input/DesktopInput.java @@ -7,7 +7,7 @@ import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.graphics.Palette; diff --git a/core/src/io/anuke/mindustry/input/InputHandler.java b/core/src/io/anuke/mindustry/input/InputHandler.java index b10d48a36e..d349b52ec7 100644 --- a/core/src/io/anuke/mindustry/input/InputHandler.java +++ b/core/src/io/anuke/mindustry/input/InputHandler.java @@ -11,7 +11,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.scene.ui.layout.Table; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.effect.ItemTransfer; diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index e4fbee2f6e..0919175024 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -18,7 +18,7 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.scene.ui.layout.Table; import io.anuke.arc.util.Align; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; diff --git a/core/src/io/anuke/mindustry/io/MapIO.java b/core/src/io/anuke/mindustry/io/MapIO.java index 87e8c228ec..6a0ac1367f 100644 --- a/core/src/io/anuke/mindustry/io/MapIO.java +++ b/core/src/io/anuke/mindustry/io/MapIO.java @@ -8,8 +8,7 @@ import io.anuke.arc.graphics.Pixmap; import io.anuke.arc.graphics.Pixmap.Format; import io.anuke.arc.util.Pack; import io.anuke.arc.util.Structs; -import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.blocks.StorageBlocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.maps.Map; import io.anuke.mindustry.maps.MapMeta; @@ -96,7 +95,7 @@ public class MapIO{ } } - data.write(x, y, DataPosition.wall, StorageBlocks.core.id); + data.write(x, y, DataPosition.wall, Blocks.core.id); data.write(x, y, DataPosition.rotationTeam, Pack.byteByte((byte)0, (byte)Team.blue.ordinal())); } } diff --git a/core/src/io/anuke/mindustry/io/SaveFileVersion.java b/core/src/io/anuke/mindustry/io/SaveFileVersion.java index 73ad0f5ddb..f7e048f446 100644 --- a/core/src/io/anuke/mindustry/io/SaveFileVersion.java +++ b/core/src/io/anuke/mindustry/io/SaveFileVersion.java @@ -5,8 +5,7 @@ import io.anuke.arc.entities.Entities; import io.anuke.arc.entities.EntityGroup; import io.anuke.arc.entities.trait.Entity; import io.anuke.arc.util.Pack; -import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.blocks.StorageBlocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.traits.SaveTrait; import io.anuke.mindustry.entities.traits.TypeTrait; import io.anuke.mindustry.game.Content; @@ -134,7 +133,7 @@ public abstract class SaveFileVersion{ tile.entity.readConfig(stream); tile.entity.read(stream); - if(tile.block() == StorageBlocks.core){ + if(tile.block() == Blocks.core){ state.teams.get(t).cores.add(tile); } }else if(wallid == 0){ diff --git a/core/src/io/anuke/mindustry/maps/MapTileData.java b/core/src/io/anuke/mindustry/maps/MapTileData.java index 25398e561b..2948522b95 100644 --- a/core/src/io/anuke/mindustry/maps/MapTileData.java +++ b/core/src/io/anuke/mindustry/maps/MapTileData.java @@ -4,7 +4,7 @@ import io.anuke.arc.collection.IntIntMap; import io.anuke.arc.util.Pack; import io.anuke.arc.util.Structs; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.world.Block; import java.nio.ByteBuffer; diff --git a/core/src/io/anuke/mindustry/maps/SectorPresets.java b/core/src/io/anuke/mindustry/maps/SectorPresets.java index c60115e2e2..c6fd850b7b 100644 --- a/core/src/io/anuke/mindustry/maps/SectorPresets.java +++ b/core/src/io/anuke/mindustry/maps/SectorPresets.java @@ -2,14 +2,7 @@ package io.anuke.mindustry.maps; import io.anuke.arc.collection.Array; import io.anuke.arc.collection.GridMap; -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.Mechs; -import io.anuke.mindustry.content.UnitTypes; -import io.anuke.mindustry.content.blocks.CraftingBlocks; -import io.anuke.mindustry.content.blocks.ProductionBlocks; -import io.anuke.mindustry.content.blocks.UnitBlocks; -import io.anuke.mindustry.content.blocks.UpgradeBlocks; +import io.anuke.mindustry.content.*; import io.anuke.mindustry.entities.units.UnitCommand; import io.anuke.mindustry.maps.missions.*; import io.anuke.mindustry.type.Item; @@ -30,9 +23,9 @@ public class SectorPresets{ //command center mission add(new SectorPreset(0, 1, Array.ofRecursive( - Missions.blockRecipe(UnitBlocks.daggerFactory), + Missions.blockRecipe(Blocks.daggerFactory), new UnitMission(UnitTypes.dagger), - Missions.blockRecipe(UnitBlocks.commandCenter), + Missions.blockRecipe(Blocks.commandCenter), new CommandMission(UnitCommand.retreat), new CommandMission(UnitCommand.attack), new BattleMission() @@ -42,7 +35,7 @@ public class SectorPresets{ //pad mission add(new SectorPreset(0, -2, Array.ofRecursive( - Missions.blockRecipe(mobile ? UpgradeBlocks.alphaPad : UpgradeBlocks.dartPad), + Missions.blockRecipe(mobile ? Blocks.alphaPad : Blocks.dartPad), new MechMission(mobile ? Mechs.alpha : Mechs.dart), new WaveMission(15) ), @@ -51,10 +44,10 @@ public class SectorPresets{ //oil mission add(new SectorPreset(-2, 0, Array.ofRecursive( - Missions.blockRecipe(ProductionBlocks.cultivator), - Missions.blockRecipe(ProductionBlocks.waterExtractor), + Missions.blockRecipe(Blocks.cultivator), + Missions.blockRecipe(Blocks.waterExtractor), new ContentMission(Items.biomatter), - Missions.blockRecipe(CraftingBlocks.biomatterCompressor), + Missions.blockRecipe(Blocks.biomatterCompressor), new ContentMission(Liquids.oil), new BattleMission() ), diff --git a/core/src/io/anuke/mindustry/maps/TutorialSector.java b/core/src/io/anuke/mindustry/maps/TutorialSector.java index 436f0678c2..8d9f81b4db 100644 --- a/core/src/io/anuke/mindustry/maps/TutorialSector.java +++ b/core/src/io/anuke/mindustry/maps/TutorialSector.java @@ -1,11 +1,8 @@ package io.anuke.mindustry.maps; import io.anuke.arc.collection.Array; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.blocks.CraftingBlocks; -import io.anuke.mindustry.content.blocks.ProductionBlocks; -import io.anuke.mindustry.content.blocks.StorageBlocks; -import io.anuke.mindustry.content.blocks.UnitBlocks; import io.anuke.mindustry.maps.missions.BlockMission; import io.anuke.mindustry.maps.missions.ItemMission; import io.anuke.mindustry.maps.missions.Mission; @@ -92,12 +89,12 @@ public class TutorialSector{ //intentionally unlocalized new ItemMission(Items.copper, 50).setMessage("An updated tutorial will return next build.\nFor now, you'll have to deal with... this."), - new BlockMission(ProductionBlocks.mechanicalDrill), + new BlockMission(Blocks.mechanicalDrill), new ItemMission(Items.copper, 100), new ItemMission(Items.lead, 50), - new BlockMission(CraftingBlocks.smelter), + new BlockMission(Blocks.smelter), new ItemMission(Items.densealloy, 10), new WaveMission(5) ); @@ -109,9 +106,9 @@ public class TutorialSector{ private static void generateBase(){ int x = sectorSize - 50, y = sectorSize - 50; - world.setBlock(world.tile(x, y), StorageBlocks.core, waveTeam); - world.setBlock(world.tile(x - 1, y + 2), UnitBlocks.daggerFactory, waveTeam); - world.setBlock(world.tile(x - 1, y - 3), UnitBlocks.daggerFactory, waveTeam); + world.setBlock(world.tile(x, y), Blocks.core, waveTeam); + world.setBlock(world.tile(x - 1, y + 2), Blocks.daggerFactory, waveTeam); + world.setBlock(world.tile(x - 1, y - 3), Blocks.daggerFactory, waveTeam); //since placed() is not called here, add core manually state.teams.get(waveTeam).cores.add(world.tile(x, y)); diff --git a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java index 2c3449ca0e..bfd360bcf8 100644 --- a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java @@ -9,9 +9,9 @@ import io.anuke.arc.function.TriFunction; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Point2; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.blocks.*; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.world.Block; @@ -54,7 +54,7 @@ public class FortressGenerator{ } void gen(){ - gen.setBlock(enemyX, enemyY, StorageBlocks.core, team); + gen.setBlock(enemyX, enemyY, Blocks.core, team); gen.random.nextBoolean(); float difficultyScl = Mathf.clamp(gen.sector.difficulty / 20f + gen.random.range(0.25f), 0f, 0.9999f); @@ -109,25 +109,25 @@ public class FortressGenerator{ Array passes = Array.with( //initial seeding solar panels - placer.get(PowerBlocks.largeSolarPanel, 0.001f), + placer.get(Blocks.largeSolarPanel, 0.001f), //extra seeding - seeder.get(PowerBlocks.solarPanel, tile -> tile.block() == PowerBlocks.largeSolarPanel && gen.random.chance(0.3)), + seeder.get(Blocks.solarPanel, tile -> tile.block() == Blocks.largeSolarPanel && gen.random.chance(0.3)), //coal gens - seeder.get(PowerBlocks.combustionGenerator, tile -> tile.block() instanceof SolarGenerator && gen.random.chance(0.2)), + seeder.get(Blocks.combustionGenerator, tile -> tile.block() instanceof SolarGenerator && gen.random.chance(0.2)), //water extractors - seeder.get(ProductionBlocks.waterExtractor, tile -> tile.block() instanceof NuclearReactor && gen.random.chance(0.5)), + seeder.get(Blocks.waterExtractor, tile -> tile.block() instanceof NuclearReactor && gen.random.chance(0.5)), //mend projectors - seeder.get(DefenseBlocks.mendProjector, tile -> tile.block() instanceof PowerGenerator && gen.random.chance(0.04)), + seeder.get(Blocks.mendProjector, tile -> tile.block() instanceof PowerGenerator && gen.random.chance(0.04)), //power turrets seeder.get(powerTurret, tile -> tile.block() instanceof PowerGenerator && gen.random.chance(0.04)), //repair point - seeder.get(UnitBlocks.repairPoint, tile -> tile.block() instanceof PowerGenerator && gen.random.chance(0.1)), + seeder.get(Blocks.repairPoint, tile -> tile.block() instanceof PowerGenerator && gen.random.chance(0.1)), //turrets1 seeder.get(turret1, tile -> tile.block() instanceof PowerBlock && gen.random.chance(0.22 - turret1.size*0.02)), @@ -136,22 +136,22 @@ public class FortressGenerator{ seeder.get(turret2, tile -> tile.block() instanceof PowerBlock && gen.random.chance(0.12 - turret2.size*0.02)), //shields - seeder.get(DefenseBlocks.forceProjector, tile -> (tile.block() instanceof CoreBlock || tile.block() instanceof UnitFactory) && gen.random.chance(0.2 * dscl2)), + seeder.get(Blocks.forceProjector, tile -> (tile.block() instanceof CoreBlock || tile.block() instanceof UnitFactory) && gen.random.chance(0.2 * dscl2)), //unit pads (assorted) - seeder.get(UnitBlocks.daggerFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.3 * dscl2)), + seeder.get(Blocks.daggerFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.3 * dscl2)), //unit pads (assorted) - seeder.get(UnitBlocks.wraithFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.3 * dscl2)), + seeder.get(Blocks.wraithFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.3 * dscl2)), //unit pads (assorted) - seeder.get(UnitBlocks.titanFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.23 * dscl2)), + seeder.get(Blocks.titanFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.23 * dscl2)), //unit pads (assorted) - seeder.get(UnitBlocks.ghoulFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.23 * dscl2)), + seeder.get(Blocks.ghoulFactory, tile -> (tile.block() instanceof MendProjector || tile.block() instanceof ForceProjector) && gen.random.chance(0.23 * dscl2)), //vaults - seeder.get(StorageBlocks.vault, tile -> (tile.block() instanceof CoreBlock || tile.block() instanceof ForceProjector) && gen.random.chance(0.4)), + seeder.get(Blocks.vault, tile -> (tile.block() instanceof CoreBlock || tile.block() instanceof ForceProjector) && gen.random.chance(0.4)), //big turrets seeder.get(bigTurret, tile -> tile.block() instanceof StorageBlock && gen.random.chance(0.65)), @@ -173,7 +173,7 @@ public class FortressGenerator{ }, //mines - placer.get(DefenseBlocks.shockMine, 0.02f * difficultyScl), + placer.get(Blocks.shockMine, 0.02f * difficultyScl), //fill up turrets w/ ammo (x, y) -> { diff --git a/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java b/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java index d397cd83c5..7b3e5b8796 100644 --- a/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java @@ -11,9 +11,7 @@ import io.anuke.arc.util.Structs; import io.anuke.arc.util.noise.RidgedPerlin; import io.anuke.arc.util.noise.Simplex; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.blocks.OreBlocks; -import io.anuke.mindustry.content.blocks.StorageBlocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.maps.Map; import io.anuke.mindustry.maps.MapTileData; @@ -191,10 +189,10 @@ public class WorldGenerator{ } } - world.setBlock(tiles[spawns.get(0).x][spawns.get(0).y], StorageBlocks.core, Team.blue); + world.setBlock(tiles[spawns.get(0).x][spawns.get(0).y], Blocks.core, Team.blue); if(state.mode.isPvp){ - world.setBlock(tiles[spawns.get(1).x][spawns.get(1).y], StorageBlocks.core, Team.red); + world.setBlock(tiles[spawns.get(1).x][spawns.get(1).y], Blocks.core, Team.red); } world.endMapLoad(); @@ -237,7 +235,7 @@ public class WorldGenerator{ if(entry.noise.octaveNoise2D(1, 0.7, 1f / (4 + i * 2), x, y) / 4f + Math.abs(0.5f - entry.noise.octaveNoise2D(2, 0.7, 1f / (50 + i * 2), x, y)) > 0.48f && Math.abs(0.5f - entry.noise.octaveNoise2D(1, 1, 1f / (55 + i * 4), x, y)) > 0.22f){ - tile.setFloor((Floor) OreBlocks.get(tile.floor(), entry.item)); + tile.setFloor((Floor) OreBlock.get(tile.floor(), entry.item)); break; } } @@ -393,7 +391,7 @@ public class WorldGenerator{ Item entry = ores.get(i); if(Math.abs(0.5f - sim.octaveNoise2D(2, 0.7, 1f / (50 + i * 2), offsetX, offsetY)) > 0.23f && Math.abs(0.5f - sim2.octaveNoise2D(1, 1, 1f / (40 + i * 4), offsetX, offsetY)) > 0.32f){ - floor = OreBlocks.get(floor, entry); + floor = OreBlock.get(floor, entry); break; } } diff --git a/core/src/io/anuke/mindustry/maps/missions/MissionWithStartingCore.java b/core/src/io/anuke/mindustry/maps/missions/MissionWithStartingCore.java index 24a086d02a..a8d21a0633 100644 --- a/core/src/io/anuke/mindustry/maps/missions/MissionWithStartingCore.java +++ b/core/src/io/anuke/mindustry/maps/missions/MissionWithStartingCore.java @@ -2,7 +2,7 @@ package io.anuke.mindustry.maps.missions; import io.anuke.arc.math.geom.Point2; import io.anuke.arc.collection.Array; -import io.anuke.mindustry.content.blocks.StorageBlocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.maps.generation.Generation; import io.anuke.mindustry.world.Tile; @@ -39,7 +39,7 @@ public abstract class MissionWithStartingCore extends Mission{ } Tile startingCoreTile = gen.tiles[spawnPoints.first().x][spawnPoints.first().y]; - startingCoreTile.setBlock(StorageBlocks.core); + startingCoreTile.setBlock(Blocks.core); startingCoreTile.setTeam(team); state.teams.get(team).cores.add(startingCoreTile); diff --git a/core/src/io/anuke/mindustry/net/NetworkIO.java b/core/src/io/anuke/mindustry/net/NetworkIO.java index dc16abf908..659370dd32 100644 --- a/core/src/io/anuke/mindustry/net/NetworkIO.java +++ b/core/src/io/anuke/mindustry/net/NetworkIO.java @@ -6,7 +6,7 @@ import io.anuke.arc.collection.ObjectMap.Entry; import io.anuke.arc.entities.Entities; import io.anuke.arc.util.Pack; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.game.GameMode; import io.anuke.mindustry.game.Team; diff --git a/core/src/io/anuke/mindustry/ui/fragments/BlockConfigFragment.java b/core/src/io/anuke/mindustry/ui/fragments/BlockConfigFragment.java index 3a0c43a706..6617701231 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/BlockConfigFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/BlockConfigFragment.java @@ -8,7 +8,7 @@ import io.anuke.arc.scene.Group; import io.anuke.arc.scene.actions.Actions; import io.anuke.arc.scene.ui.layout.Table; import io.anuke.arc.util.Align; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.input.InputHandler; import io.anuke.mindustry.world.Block; diff --git a/core/src/io/anuke/mindustry/world/Build.java b/core/src/io/anuke/mindustry/world/Build.java index 4f16b48e00..008eb1bd8b 100644 --- a/core/src/io/anuke/mindustry/world/Build.java +++ b/core/src/io/anuke/mindustry/world/Build.java @@ -6,7 +6,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Point2; import io.anuke.arc.math.geom.Rectangle; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.game.EventType.BlockBuildBeginEvent; import io.anuke.mindustry.game.Team; diff --git a/core/src/io/anuke/mindustry/world/ColorMapper.java b/core/src/io/anuke/mindustry/world/ColorMapper.java index 2ed01898b6..c8cbb56f5b 100644 --- a/core/src/io/anuke/mindustry/world/ColorMapper.java +++ b/core/src/io/anuke/mindustry/world/ColorMapper.java @@ -5,7 +5,6 @@ import io.anuke.arc.collection.ObjectIntMap; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.game.Team; -import io.anuke.mindustry.type.ContentType; import static io.anuke.mindustry.Vars.content; @@ -49,9 +48,4 @@ public class ColorMapper implements ContentList{ colorMap.put(block, color); } } - - @Override - public ContentType type(){ - return ContentType.block; - } } diff --git a/core/src/io/anuke/mindustry/world/LegacyColorMapper.java b/core/src/io/anuke/mindustry/world/LegacyColorMapper.java index cafed297fe..794133e047 100644 --- a/core/src/io/anuke/mindustry/world/LegacyColorMapper.java +++ b/core/src/io/anuke/mindustry/world/LegacyColorMapper.java @@ -2,12 +2,11 @@ package io.anuke.mindustry.world; import io.anuke.arc.collection.IntMap; import io.anuke.arc.graphics.Color; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.blocks.OreBlocks; import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.world.blocks.Floor; +import io.anuke.mindustry.world.blocks.OreBlock; public class LegacyColorMapper implements ContentList{ private static IntMap blockMap = new IntMap<>(); @@ -39,15 +38,10 @@ public class LegacyColorMapper implements ContentList{ map("6e501e", Blocks.dirt, 0); map("ed5334", Blocks.lava, 0); map("292929", Blocks.tar, 0); - map("c3a490", OreBlocks.get(Blocks.stone, Items.copper), 0); - map("161616", OreBlocks.get(Blocks.stone, Items.coal), 0); - map("6277bc", OreBlocks.get(Blocks.stone, Items.titanium), 0); - map("83bc58", OreBlocks.get(Blocks.stone, Items.thorium), 0); - } - - @Override - public ContentType type(){ - return ContentType.block; + map("c3a490", OreBlock.get(Blocks.stone, Items.copper), 0); + map("161616", OreBlock.get(Blocks.stone, Items.coal), 0); + map("6277bc", OreBlock.get(Blocks.stone, Items.titanium), 0); + map("83bc58", OreBlock.get(Blocks.stone, Items.thorium), 0); } private void map(String color, Block block, int elevation){ diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index 976b0f0310..f857dc6367 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -7,7 +7,7 @@ import io.anuke.arc.math.geom.Point2; import io.anuke.arc.math.geom.Position; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Pack; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.traits.TargetTrait; import io.anuke.mindustry.game.Team; diff --git a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java index ec04c1ade7..4eb4687cca 100644 --- a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java @@ -1,13 +1,17 @@ package io.anuke.mindustry.world.blocks; +import io.anuke.arc.collection.ObjectMap; +import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; +import io.anuke.arc.math.Mathf; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; +import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.math.Mathf; public class OreBlock extends Floor{ + private static final ObjectMap> oreBlockMap = new ObjectMap<>(); + public Floor base; public OreBlock(Item ore, Floor base){ @@ -18,6 +22,8 @@ public class OreBlock extends Floor{ this.variants = 3; this.minimapColor = ore.color; this.edge = base.name; + + oreBlockMap.getOr(ore, ObjectMap::new).put(base, this); } @Override @@ -47,4 +53,10 @@ public class OreBlock extends Floor{ base.drawEdges(tile, true); } + public static Block get(Block floor, Item item){ + if(!oreBlockMap.containsKey(item)) throw new IllegalArgumentException("Item '" + item + "' is not an ore!"); + if(!oreBlockMap.get(item).containsKey(floor)) + throw new IllegalArgumentException("Block '" + floor.name + "' does not support ores!"); + return oreBlockMap.get(item).get(floor); + } } diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java index e900b092d5..323586d846 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java @@ -9,7 +9,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.RandomXS128; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; diff --git a/core/src/io/anuke/mindustry/world/blocks/sandbox/ItemSource.java b/core/src/io/anuke/mindustry/world/blocks/sandbox/ItemSource.java new file mode 100644 index 0000000000..dfb1aee3a7 --- /dev/null +++ b/core/src/io/anuke/mindustry/world/blocks/sandbox/ItemSource.java @@ -0,0 +1,34 @@ +package io.anuke.mindustry.world.blocks.sandbox; + +import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.world.Block; +import io.anuke.mindustry.world.Tile; +import io.anuke.mindustry.world.blocks.distribution.Sorter.SorterEntity; + +public class ItemSource extends Block{ + + public ItemSource(String name){ + super(name); + hasItems = true; + } + + @Override + public boolean outputsItems(){ + return true; + } + + @Override + public void update(Tile tile){ + SorterEntity entity = tile.entity(); + if(entity.sortItem == null) return; + + entity.items.set(entity.sortItem, 1); + tryDump(tile, entity.sortItem); + entity.items.set(entity.sortItem, 0); + } + + @Override + public boolean acceptItem(Item item, Tile tile, Tile source){ + return false; + } +} diff --git a/core/src/io/anuke/mindustry/world/blocks/sandbox/ItemVoid.java b/core/src/io/anuke/mindustry/world/blocks/sandbox/ItemVoid.java new file mode 100644 index 0000000000..aa4d55371b --- /dev/null +++ b/core/src/io/anuke/mindustry/world/blocks/sandbox/ItemVoid.java @@ -0,0 +1,21 @@ +package io.anuke.mindustry.world.blocks.sandbox; + +import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.world.Block; +import io.anuke.mindustry.world.Tile; + +public class ItemVoid extends Block{ + + public ItemVoid(String name){ + super(name); + update = solid = true; + } + + @Override + public void handleItem(Item item, Tile tile, Tile source){} + + @Override + public boolean acceptItem(Item item, Tile tile, Tile source){ + return true; + } +} diff --git a/core/src/io/anuke/mindustry/world/blocks/sandbox/LiquidSource.java b/core/src/io/anuke/mindustry/world/blocks/sandbox/LiquidSource.java new file mode 100644 index 0000000000..dba3df94e6 --- /dev/null +++ b/core/src/io/anuke/mindustry/world/blocks/sandbox/LiquidSource.java @@ -0,0 +1,105 @@ +package io.anuke.mindustry.world.blocks.sandbox; + +import io.anuke.annotations.Annotations.Loc; +import io.anuke.annotations.Annotations.Remote; +import io.anuke.arc.collection.Array; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.scene.ui.ButtonGroup; +import io.anuke.arc.scene.ui.ImageButton; +import io.anuke.arc.scene.ui.layout.Table; +import io.anuke.mindustry.content.Liquids; +import io.anuke.mindustry.entities.Player; +import io.anuke.mindustry.entities.TileEntity; +import io.anuke.mindustry.type.Liquid; +import io.anuke.mindustry.world.Block; +import io.anuke.mindustry.world.Tile; +import io.anuke.mindustry.gen.Call; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import static io.anuke.mindustry.Vars.content; +import static io.anuke.mindustry.Vars.control; + +public class LiquidSource extends Block{ + + public LiquidSource(String name){ + super(name); + update = true; + solid = true; + hasLiquids = true; + liquidCapacity = 100f; + configurable = true; + outputsLiquid = true; + } + + @Override + public void update(Tile tile){ + LiquidSourceEntity entity = tile.entity(); + + tile.entity.liquids.add(entity.source, liquidCapacity); + tryDumpLiquid(tile, entity.source); + } + + @Override + public void draw(Tile tile){ + super.draw(tile); + + LiquidSourceEntity entity = tile.entity(); + + Draw.color(entity.source.color); + Draw.rect("blank", tile.worldx(), tile.worldy(), 4f, 4f); + Draw.color(); + } + + @Override + public void buildTable(Tile tile, Table table){ + LiquidSourceEntity entity = tile.entity(); + + Array items = content.liquids(); + + ButtonGroup group = new ButtonGroup<>(); + Table cont = new Table(); + + for(int i = 0; i < items.size; i++){ + if(!control.unlocks.isUnlocked(items.get(i))) continue; + + final int f = i; + ImageButton button = cont.addImageButton("liquid-icon-" + items.get(i).name, "clear-toggle", 24, + () -> Call.setLiquidSourceLiquid(null, tile, items.get(f))).size(38).group(group).get(); + button.setChecked(entity.source.id == f); + + if(i % 4 == 3){ + cont.row(); + } + } + + table.add(cont); + } + + @Override + public TileEntity newEntity(){ + return new LiquidSourceEntity(); + } + + @Remote(targets = Loc.both, called = Loc.both, forward = true) + public static void setLiquidSourceLiquid(Player player, Tile tile, Liquid liquid){ + LiquidSourceEntity entity = tile.entity(); + entity.source = liquid; + } + + class LiquidSourceEntity extends TileEntity{ + public Liquid source = Liquids.water; + + @Override + public void writeConfig(DataOutput stream) throws IOException{ + stream.writeByte(source.id); + } + + @Override + public void readConfig(DataInput stream) throws IOException{ + source = content.liquid(stream.readByte()); + } + } +} diff --git a/core/src/io/anuke/mindustry/world/blocks/sandbox/PowerSource.java b/core/src/io/anuke/mindustry/world/blocks/sandbox/PowerSource.java new file mode 100644 index 0000000000..9c95ccd689 --- /dev/null +++ b/core/src/io/anuke/mindustry/world/blocks/sandbox/PowerSource.java @@ -0,0 +1,20 @@ +package io.anuke.mindustry.world.blocks.sandbox; + +import io.anuke.mindustry.world.Tile; +import io.anuke.mindustry.world.blocks.power.PowerNode; + +public class PowerSource extends PowerNode{ + + public PowerSource(String name){ + super(name); + maxNodes = 100; + outputsPower = true; + consumesPower = false; + } + + @Override + public float getPowerProduction(Tile tile){ + return 10000f; + } + +} diff --git a/core/src/io/anuke/mindustry/world/blocks/sandbox/PowerVoid.java b/core/src/io/anuke/mindustry/world/blocks/sandbox/PowerVoid.java new file mode 100644 index 0000000000..549183c0be --- /dev/null +++ b/core/src/io/anuke/mindustry/world/blocks/sandbox/PowerVoid.java @@ -0,0 +1,18 @@ +package io.anuke.mindustry.world.blocks.sandbox; + +import io.anuke.mindustry.world.blocks.PowerBlock; +import io.anuke.mindustry.world.meta.BlockStat; + +public class PowerVoid extends PowerBlock{ + + public PowerVoid(String name){ + super(name); + consumes.power(Float.MAX_VALUE); + } + + @Override + public void init(){ + super.init(); + stats.remove(BlockStat.powerUse); + } +} diff --git a/tests/src/test/java/ApplicationTests.java b/tests/src/test/java/ApplicationTests.java index c13c7c7f25..268925d3bc 100644 --- a/tests/src/test/java/ApplicationTests.java +++ b/tests/src/test/java/ApplicationTests.java @@ -5,9 +5,9 @@ import io.anuke.arc.math.geom.Point2; import io.anuke.arc.util.Log; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.UnitTypes; -import io.anuke.mindustry.content.blocks.*; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.core.Logic; import io.anuke.mindustry.core.NetServer; @@ -142,12 +142,12 @@ public class ApplicationTests{ createMap(); int bx = 4; int by = 4; - world.setBlock(world.tile(bx, by), StorageBlocks.core, Team.blue); + world.setBlock(world.tile(bx, by), Blocks.core, Team.blue); assertEquals(world.tile(bx, by).getTeam(), Team.blue); for(int x = bx-1; x <= bx + 1; x++){ for(int y = by-1; y <= by + 1; y++){ if(x == bx && by == y){ - assertEquals(world.tile(x, y).block(), StorageBlocks.core); + assertEquals(world.tile(x, y).block(), Blocks.core); }else{ assertTrue(world.tile(x, y).block() == Blocks.blockpart && world.tile(x, y).getLinked() == world.tile(bx, by)); } @@ -204,9 +204,9 @@ public class ApplicationTests{ @Test void inventoryDeposit(){ - depositTest(CraftingBlocks.smelter, Items.copper); - depositTest(StorageBlocks.vault, Items.copper); - depositTest(PowerBlocks.thoriumReactor, Items.thorium); + depositTest(Blocks.smelter, Items.copper); + depositTest(Blocks.vault, Items.copper); + depositTest(Blocks.thoriumReactor, Items.thorium); } @Test @@ -231,14 +231,14 @@ public class ApplicationTests{ d1.set(10f, 20f); d2.set(10f, 20f); - d1.addBuildRequest(new BuildRequest(0, 0, 0, Recipe.getByResult(DefenseBlocks.copperWallLarge))); - d2.addBuildRequest(new BuildRequest(1, 1, 0, Recipe.getByResult(DefenseBlocks.copperWallLarge))); + d1.addBuildRequest(new BuildRequest(0, 0, 0, Recipe.getByResult(Blocks.copperWallLarge))); + d2.addBuildRequest(new BuildRequest(1, 1, 0, Recipe.getByResult(Blocks.copperWallLarge))); Time.setDeltaProvider(() -> 9999999f); d1.updateBuilding(d1); d2.updateBuilding(d2); - assertEquals(DefenseBlocks.copperWallLarge, world.tile(0, 0).block()); + assertEquals(Blocks.copperWallLarge, world.tile(0, 0).block()); assertEquals(Blocks.air, world.tile(2, 2).block()); assertEquals(Blocks.blockpart, world.tile(1, 1).block()); } @@ -253,7 +253,7 @@ public class ApplicationTests{ d1.set(10f, 20f); d2.set(10f, 20f); - d1.addBuildRequest(new BuildRequest(0, 0, 0, Recipe.getByResult(DefenseBlocks.copperWallLarge))); + d1.addBuildRequest(new BuildRequest(0, 0, 0, Recipe.getByResult(Blocks.copperWallLarge))); d2.addBuildRequest(new BuildRequest(1, 1)); Time.setDeltaProvider(() -> 3f); @@ -277,7 +277,7 @@ public class ApplicationTests{ createMap(); Tile core = world.tile(5, 5); - world.setBlock(core, StorageBlocks.core, Team.blue); + world.setBlock(core, Blocks.core, Team.blue); for(Item item : content.items()){ core.entity.items.set(item, 3000); } diff --git a/tests/src/test/java/power/PowerTestFixture.java b/tests/src/test/java/power/PowerTestFixture.java index 3c4e6e9327..38db7cc8a6 100644 --- a/tests/src/test/java/power/PowerTestFixture.java +++ b/tests/src/test/java/power/PowerTestFixture.java @@ -3,7 +3,7 @@ package power; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.core.ContentLoader; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; From 351b8c24694afd9b4c62d101f2792fe68546a421 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jan 2019 18:48:55 -0500 Subject: [PATCH 6/6] Fixed content class errors --- .../{powerinfinite.png => power-source.png} | Bin .../power/{powervoid.png => power-void.png} | Bin .../{itemsource.png => item-source.png} | Bin .../{itemvoid.png => item-void.png} | Bin .../{liquidsource.png => liquid-source.png} | Bin core/assets/bundles/bundle.properties | 20 +- core/assets/bundles/bundle_cs.properties | 20 +- core/assets/bundles/bundle_de.properties | 20 +- core/assets/bundles/bundle_es.properties | 20 +- core/assets/bundles/bundle_fr.properties | 20 +- core/assets/bundles/bundle_fr_BE.properties | 20 +- core/assets/bundles/bundle_in_ID.properties | 20 +- core/assets/bundles/bundle_it.properties | 20 +- core/assets/bundles/bundle_ja.properties | 20 +- core/assets/bundles/bundle_ko.properties | 20 +- core/assets/bundles/bundle_pl.properties | 20 +- core/assets/bundles/bundle_pt_BR.properties | 20 +- core/assets/bundles/bundle_ru.properties | 20 +- core/assets/bundles/bundle_tk.properties | 20 +- core/assets/bundles/bundle_tr.properties | 20 +- core/assets/bundles/bundle_uk_UA.properties | 20 +- core/assets/bundles/bundle_zh_CN.properties | 20 +- core/assets/bundles/bundle_zh_TW.properties | 20 +- core/assets/sprites/sprites.atlas | 54 ++-- core/assets/sprites/sprites.png | Bin 345249 -> 345186 bytes .../io/anuke/mindustry/content/Blocks.java | 26 +- core/src/io/anuke/mindustry/content/Fx.java | 305 ++++++++++++++++++ .../mindustry/world/blocks/OreBlock.java | 3 +- 28 files changed, 535 insertions(+), 213 deletions(-) rename core/assets-raw/sprites/blocks/power/{powerinfinite.png => power-source.png} (100%) rename core/assets-raw/sprites/blocks/power/{powervoid.png => power-void.png} (100%) rename core/assets-raw/sprites/blocks/production/{itemsource.png => item-source.png} (100%) rename core/assets-raw/sprites/blocks/production/{itemvoid.png => item-void.png} (100%) rename core/assets-raw/sprites/blocks/production/{liquidsource.png => liquid-source.png} (100%) diff --git a/core/assets-raw/sprites/blocks/power/powerinfinite.png b/core/assets-raw/sprites/blocks/power/power-source.png similarity index 100% rename from core/assets-raw/sprites/blocks/power/powerinfinite.png rename to core/assets-raw/sprites/blocks/power/power-source.png diff --git a/core/assets-raw/sprites/blocks/power/powervoid.png b/core/assets-raw/sprites/blocks/power/power-void.png similarity index 100% rename from core/assets-raw/sprites/blocks/power/powervoid.png rename to core/assets-raw/sprites/blocks/power/power-void.png diff --git a/core/assets-raw/sprites/blocks/production/itemsource.png b/core/assets-raw/sprites/blocks/production/item-source.png similarity index 100% rename from core/assets-raw/sprites/blocks/production/itemsource.png rename to core/assets-raw/sprites/blocks/production/item-source.png diff --git a/core/assets-raw/sprites/blocks/production/itemvoid.png b/core/assets-raw/sprites/blocks/production/item-void.png similarity index 100% rename from core/assets-raw/sprites/blocks/production/itemvoid.png rename to core/assets-raw/sprites/blocks/production/item-void.png diff --git a/core/assets-raw/sprites/blocks/production/liquidsource.png b/core/assets-raw/sprites/blocks/production/liquid-source.png similarity index 100% rename from core/assets-raw/sprites/blocks/production/liquidsource.png rename to core/assets-raw/sprites/blocks/production/liquid-source.png diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 1226ab8965..d012ff4be7 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -580,11 +580,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = Conduit block.mechanical-pump.name = Mechanical Pump -block.itemsource.name = Item Source -block.itemvoid.name = Item Void -block.liquidsource.name = Liquid Source -block.powervoid.name = Power Void -block.powerinfinite.name = Power Infinite +block.item-source.name = Item Source +block.item-void.name = Item Void +block.liquid-source.name = Liquid Source +block.power-void.name = Power Void +block.power-source.name = Power Infinite block.unloader.name = Unloader block.vault.name = Vault block.wave.name = Wave @@ -782,11 +782,11 @@ block.router.description = Accepts items from one direction and outputs them to block.distributor.description = An advanced router which splits items to up to 7 other directions equally. block.bridge-conveyor.description = Advanced item transport block. Allows transporting items over up to 3 tiles of any terrain or building. block.alpha-mech-pad.description = When given enough power, rebuilds your ship into the[accent] Alpha[] mech. -block.itemsource.description = Infinitely outputs items. Sandbox only. -block.liquidsource.description = Infinitely outputs liquids. Sandbox only. -block.itemvoid.description = Destroys any items which go into it without using power. Sandbox only. -block.powerinfinite.description = Infinitely outputs power. Sandbox only. -block.powervoid.description = Voids all power inputted into it. Sandbox only. +block.item-source.description = Infinitely outputs items. Sandbox only. +block.liquid-source.description = Infinitely outputs liquids. Sandbox only. +block.item-void.description = Destroys any items which go into it without using power. Sandbox only. +block.power-source.description = Infinitely outputs power. Sandbox only. +block.power-void.description = Voids all power inputted into it. Sandbox only. liquid.water.description = Commonly used for cooling machines and waste processing. liquid.lava.description = Can be transformed into[LIGHT_GRAY] stone[], used for generating power or used as ammo for certain turrets. liquid.oil.description = Can be burnt, exploded or used as a coolant. diff --git a/core/assets/bundles/bundle_cs.properties b/core/assets/bundles/bundle_cs.properties index bc230d8ef4..db3fa556b1 100644 --- a/core/assets/bundles/bundle_cs.properties +++ b/core/assets/bundles/bundle_cs.properties @@ -578,11 +578,11 @@ block.omega-mech-pad.name = Plošina pro Omega Mech block.tau-mech-pad.name = Plošina pro Tau Mech block.conduit.name = Potrubí block.mechanical-pump.name = Mechanická pumpa -block.itemsource.name = Zdroj předmětů -block.itemvoid.name = Prázdnota pro předměty -block.liquidsource.name = Zdroj tekutin -block.powervoid.name = Prázdnota pro energii -block.powerinfinite.name = Nekonečný zdroj energie +block.item-source.name = Zdroj předmětů +block.item-void.name = Prázdnota pro předměty +block.liquid-source.name = Zdroj tekutin +block.power-void.name = Prázdnota pro energii +block.power-source.name = Nekonečný zdroj energie block.unloader.name = Odbavovač block.vault.name = Trezor block.wave.name = Vlna @@ -780,11 +780,11 @@ block.router.description = Příijmá předměty z jednoho směru a posílá je block.distributor.description = Pokročilý směrovač, který z libovolného počtu vstupů vytvoří libovolný počet výstupu a rozdělí přísun předmětů rovnoměrně do každého z nich, obdoba Multiplexeru a Demultiplexeru. block.bridge-conveyor.description = Pokročilý blok přepravy předmětů. Dovoluje transport předmětů až přez tři pole jakéhokoliv terénu nebo budovy. block.alpha-mech-pad.description = Když je dodán dostatek energie, Přestaví tvoji loď na[accent] Alfa[] mecha. -block.itemsource.description = Nekonečný zdroj předmětů. Jen pro Sandbox. -block.liquidsource.description = Nekonečný zdroj tekutin. Jen pro Sandbox. -block.itemvoid.description = Likviduje jakéhokoliv vstupní předmět bež použití energie. Jen pro Sandbox. -block.powerinfinite.description = Nekonečný zdroj energie. Jen pro Sandbox. -block.powervoid.description = Prázdnota pro veškerou energii vstupující do něj. Jen pro Sandbox. +block.item-source.description = Nekonečný zdroj předmětů. Jen pro Sandbox. +block.liquid-source.description = Nekonečný zdroj tekutin. Jen pro Sandbox. +block.item-void.description = Likviduje jakéhokoliv vstupní předmět bež použití energie. Jen pro Sandbox. +block.power-source.description = Nekonečný zdroj energie. Jen pro Sandbox. +block.power-void.description = Prázdnota pro veškerou energii vstupující do něj. Jen pro Sandbox. liquid.water.description = Nejčastěji se používá ke chlazení a zpracování odpadu. liquid.lava.description = Může být transformován na[LIGHT_GRAY] kámen[], nebo pro generátor energie nebo jako střelivo pro určitý druh střílen. liquid.oil.description = Může být spálen, vybouchnout nebo použit jako chlazení. diff --git a/core/assets/bundles/bundle_de.properties b/core/assets/bundles/bundle_de.properties index d7840e685c..60211fa662 100644 --- a/core/assets/bundles/bundle_de.properties +++ b/core/assets/bundles/bundle_de.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = Leitungsrohr block.mechanical-pump.name = Mechanische Pumpe -block.itemsource.name = Materialquelle -block.itemvoid.name = Materialschlucker -block.liquidsource.name = Flüssigkeitsquelle -block.powervoid.name = Stromsenke -block.powerinfinite.name = Unendliche Stromquelle +block.item-source.name = Materialquelle +block.item-void.name = Materialschlucker +block.liquid-source.name = Flüssigkeitsquelle +block.power-void.name = Stromsenke +block.power-source.name = Unendliche Stromquelle block.unloader.name = Entlader block.vault.name = Tresor block.wave.name = Welle @@ -769,11 +769,11 @@ block.router.description = Akzeptiert Materialien aus einer Richtung und leitet block.distributor.description = Ein weiterentwickelter Router, der Materialien in bis zu sieben Richtungen gleichmäßig verteilt. block.bridge-conveyor.description = Verbesserter Transportblock. Erlaubt es, Materialien über bis zu 3 Kacheln beliebigen Terrains oder Inhalts zu transportieren. block.alpha-mech-pad.description = Sofern genügend Strom zur Verfügung steht, baut dieses Pad deinen Schiff in einen [accent]Alpha[] mech zurück. -block.itemsource.description = Produziert unendlich items. Nur im Sandkasten verfügbar. -block.liquidsource.description = Produziert unendlich Flüssigkeiten. Nur im Sandkasten verfügbar. -block.itemvoid.description = Zerstört Materialien, die hereingegeben werden, ohne Strom zu verbrauchen. Nur im Sandkasten verfügbar. -block.powerinfinite.description = Erzeugt unendlich viel Strom. Nur im Sandkasten verfügbar. -block.powervoid.description = Verschlingt den kompletten übrigen Strom. Nur im Sandkasten verfügbar. +block.item-source.description = Produziert unendlich items. Nur im Sandkasten verfügbar. +block.liquid-source.description = Produziert unendlich Flüssigkeiten. Nur im Sandkasten verfügbar. +block.item-void.description = Zerstört Materialien, die hereingegeben werden, ohne Strom zu verbrauchen. Nur im Sandkasten verfügbar. +block.power-source.description = Erzeugt unendlich viel Strom. Nur im Sandkasten verfügbar. +block.power-void.description = Verschlingt den kompletten übrigen Strom. Nur im Sandkasten verfügbar. liquid.water.description = Wird überlicherweise zum Kühlen von Maschinen und zur Müllverarbeitung verwendet. liquid.lava.description = Kann zu [LIGHT_GRAY] Stein[] verarbeitet werden, zur Stromerzeugung verwendet werden oder als Munition für bestimmte Geschütztürme verwendet werden. liquid.oil.description = Kann verbrannt, zum explodieren gebracht, oder als Kühlung verwendet werden. diff --git a/core/assets/bundles/bundle_es.properties b/core/assets/bundles/bundle_es.properties index cd975d0fb1..e03d2ef7a8 100644 --- a/core/assets/bundles/bundle_es.properties +++ b/core/assets/bundles/bundle_es.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Pad de mecanoide Omega block.tau-mech-pad.name = Pad de mecanoide Tau block.conduit.name = Conducto block.mechanical-pump.name = Bomba Mecánica -block.itemsource.name = Fuente de objetos -block.itemvoid.name = Vacío de objetos -block.liquidsource.name = Fuente de líquidos -block.powervoid.name = Vacío de energía -block.powerinfinite.name = Energía Infinita +block.item-source.name = Fuente de objetos +block.item-void.name = Vacío de objetos +block.liquid-source.name = Fuente de líquidos +block.power-void.name = Vacío de energía +block.power-source.name = Energía Infinita block.unloader.name = Descargador block.vault.name = Bóveda block.wave.name = Horda @@ -769,11 +769,11 @@ block.router.description = Acepta objetos de una dirección y deja objetos equit block.distributor.description = Un enrutador avanzado que distribuye objetos equitativamente en hasta otras 7 direcciones. block.bridge-conveyor.description = Bloque avanado de transporte. Puede transportar objetos por encima hasta 3 casillas de cualquier terreno o construcción. block.alpha-mech-pad.description = Cuando se le da suficiente energía, reconstruye tu nave en el mecanoide[accent] Alpha[]. -block.itemsource.description = Da objetos infinitos. Solo en sandbox. -block.liquidsource.description = Da líquido infinito. Solo en sandbox. -block.itemvoid.description = Destruye cuanquier objeto que va a él sin necesitar energía. Solo en sandbox. -block.powerinfinite.description = Da energía infinita. Solo en sandbox. -block.powervoid.description = Elimina toda la energía que se le da. Solo en sandbox. +block.item-source.description = Da objetos infinitos. Solo en sandbox. +block.liquid-source.description = Da líquido infinito. Solo en sandbox. +block.item-void.description = Destruye cuanquier objeto que va a él sin necesitar energía. Solo en sandbox. +block.power-source.description = Da energía infinita. Solo en sandbox. +block.power-void.description = Elimina toda la energía que se le da. Solo en sandbox. liquid.water.description = Usado comúnmente para enfriar máquinas y para procesar residuos. liquid.lava.description = Puede usarse para ser transformado en[LIGHT_GRAY] stone[], para generar energía o para munición de ciertas torres. liquid.oil.description = Puede ser quemado, explotado o como un enfriador. diff --git a/core/assets/bundles/bundle_fr.properties b/core/assets/bundles/bundle_fr.properties index 42f1fd7640..c00f0245c7 100644 --- a/core/assets/bundles/bundle_fr.properties +++ b/core/assets/bundles/bundle_fr.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Reconstructeur de mécha "Oméga" block.tau-mech-pad.name = Reconstructeur de mécha "Tau" block.conduit.name = Conduit block.mechanical-pump.name = Pompe mécanique -block.itemsource.name = Source d'objets -block.itemvoid.name = Destructeur d'objets -block.liquidsource.name = Source de liquide -block.powervoid.name = absorbeur énergétique -block.powerinfinite.name = Puissance infinie +block.item-source.name = Source d'objets +block.item-void.name = Destructeur d'objets +block.liquid-source.name = Source de liquide +block.power-void.name = absorbeur énergétique +block.power-source.name = Puissance infinie block.unloader.name = Déchargeur block.vault.name = Coffre-Fort block.wave.name = Vague @@ -769,11 +769,11 @@ block.router.description = Accepte les objets depuis une ou plus directions et l block.distributor.description = Un routeur avancé qui sépare les objets jusqu'à 7 autres directions équitablement. block.bridge-conveyor.description = bloc de transport avancé permettant de traverser jusqu'à 3 blocs de n'importe quel terrain ou batiment. block.alpha-mech-pad.description = Avec assez d'énergie, reconstruit votre vaisseau en un mécha [accent] Alpha[]. -block.itemsource.description = Produit des objets à l'infini. Bac à sable uniquement . -block.liquidsource.description = Source de liquide infinie . Bac à sable uniquement. -block.itemvoid.description = Désintègre n'importe quel objet qui va à l'intérieur sans utiliser d'énergie. Bac à sable uniquement. -block.powerinfinite.description = Produit de l'énergie à l'infini. Bac à sable uniquement. -block.powervoid.description = Supprime toute l'énergie allant à l'intérieur.Bac à sable uniquement +block.item-source.description = Produit des objets à l'infini. Bac à sable uniquement . +block.liquid-source.description = Source de liquide infinie . Bac à sable uniquement. +block.item-void.description = Désintègre n'importe quel objet qui va à l'intérieur sans utiliser d'énergie. Bac à sable uniquement. +block.power-source.description = Produit de l'énergie à l'infini. Bac à sable uniquement. +block.power-void.description = Supprime toute l'énergie allant à l'intérieur.Bac à sable uniquement liquid.water.description = Couramment utilisé pour le refroidissement et le traitement des déchets. liquid.lava.description = Peut être transformé en [LIGHT_GRAY]pierre[], utilisé pour produire de l'énergie ou utilisé comme munition par certaines tourelles. liquid.oil.description = Peut être brûlé, utilisé comme explosif ou comme liquide de refroidissement. diff --git a/core/assets/bundles/bundle_fr_BE.properties b/core/assets/bundles/bundle_fr_BE.properties index a4af1a5971..aea8596d1a 100644 --- a/core/assets/bundles/bundle_fr_BE.properties +++ b/core/assets/bundles/bundle_fr_BE.properties @@ -575,11 +575,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = Conduit block.mechanical-pump.name = Pompe Méchanique -block.itemsource.name = Source d'objets -block.itemvoid.name = Destructeur d'objets -block.liquidsource.name = Source de liquide -block.powervoid.name = Absorbeur énergétique -block.powerinfinite.name = Puissance infinie +block.item-source.name = Source d'objets +block.item-void.name = Destructeur d'objets +block.liquid-source.name = Source de liquide +block.power-void.name = Absorbeur énergétique +block.power-source.name = Puissance infinie block.unloader.name = Déchargeur block.vault.name = Coffre-Fort block.wave.name = Vague @@ -777,11 +777,11 @@ block.router.description = Accepte les éléments d'une direction et les envoie block.distributor.description = Un routeur avancé qui divise les articles en 7 autres directions de manière égale. [scarlet]Seule et unique ![] block.bridge-conveyor.description = Bloc de transport d'articles avancé. Permet de transporter des objets sur plus de 3 tuiles de n'importe quel terrain ou bâtiment. block.alpha-mech-pad.description = Lorsque vous avez assez de puissance, reconstruisez votre vaisseau dans le [accent]Alpha[] mech. -block.itemsource.description = Sort infiniment les articles. Bac à sable seulement. -block.liquidsource.description = Débit infini de liquides. Bac à sable seulement. -block.itemvoid.description = Détruit tous les objets qui y entrent sans utiliser d'énergie. Bac à sable seulement. -block.powerinfinite.description = Débit infini d'énergie. Bac à sable seulement. -block.powervoid.description = Annule toute l'énergie qui y est introduite. Bac à sable seulement. +block.item-source.description = Sort infiniment les articles. Bac à sable seulement. +block.liquid-source.description = Débit infini de liquides. Bac à sable seulement. +block.item-void.description = Détruit tous les objets qui y entrent sans utiliser d'énergie. Bac à sable seulement. +block.power-source.description = Débit infini d'énergie. Bac à sable seulement. +block.power-void.description = Annule toute l'énergie qui y est introduite. Bac à sable seulement. liquid.water.description = Couramment utilisé pour les machines de refroidissement et le traitement des déchets. liquid.lava.description = Peut être transformé en [LIGHT_GRAY]pierre[], utilisé pour générer de l'énergie ou utilisé comme munition pour certaines tourelles. liquid.oil.description = Peut être brûlé, explosé ou utilisé comme liquide de refroidissement. diff --git a/core/assets/bundles/bundle_in_ID.properties b/core/assets/bundles/bundle_in_ID.properties index a3d1721f67..425feb8d32 100644 --- a/core/assets/bundles/bundle_in_ID.properties +++ b/core/assets/bundles/bundle_in_ID.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = saluran block.mechanical-pump.name = Mechanical Pump -block.itemsource.name = Item Source -block.itemvoid.name = Item Void -block.liquidsource.name = Liquid Source -block.powervoid.name = Power Void -block.powerinfinite.name = Power Infinite +block.item-source.name = Item Source +block.item-void.name = Item Void +block.liquid-source.name = Liquid Source +block.power-void.name = Power Void +block.power-source.name = Power Infinite block.unloader.name = Unloader block.vault.name = Vault block.wave.name = Wave @@ -769,11 +769,11 @@ block.router.description = Accepts items from one direction and outputs them to block.distributor.description = An advanced router which splits items to up to 7 other directions equally. block.bridge-conveyor.description = Advanced item transport block. Allows transporting items over up to 3 tiles of any terrain or building. block.alpha-mech-pad.description = When given enough power, rebuilds your ship into the[accent] Alpha[] mech. -block.itemsource.description = Infinitely outputs items. Sandbox only. -block.liquidsource.description = Infinitely outputs liquids. Sandbox only. -block.itemvoid.description = Destroys any items which go into it without using power. Sandbox only. -block.powerinfinite.description = Infinitely outputs power. Sandbox only. -block.powervoid.description = Voids all power inputted into it. Sandbox only. +block.item-source.description = Infinitely outputs items. Sandbox only. +block.liquid-source.description = Infinitely outputs liquids. Sandbox only. +block.item-void.description = Destroys any items which go into it without using power. Sandbox only. +block.power-source.description = Infinitely outputs power. Sandbox only. +block.power-void.description = Voids all power inputted into it. Sandbox only. liquid.water.description = Commonly used for cooling machines and waste processing. liquid.lava.description = Can be transformed into[LIGHT_GRAY] stone[], used for generating power or used as ammo for certain turrets. liquid.oil.description = Can be burnt, exploded or used as a coolant. diff --git a/core/assets/bundles/bundle_it.properties b/core/assets/bundles/bundle_it.properties index 514ff0569f..5e5b9be96f 100644 --- a/core/assets/bundles/bundle_it.properties +++ b/core/assets/bundles/bundle_it.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = Condotto block.mechanical-pump.name = Pompa meccanica -block.itemsource.name = Sorgente oggetti -block.itemvoid.name = Vuoto oggetti -block.liquidsource.name = Sorgente liquida -block.powervoid.name = Energia nulla -block.powerinfinite.name = Energia infinita +block.item-source.name = Sorgente oggetti +block.item-void.name = Vuoto oggetti +block.liquid-source.name = Sorgente liquida +block.power-void.name = Energia nulla +block.power-source.name = Energia infinita block.unloader.name = Scaricatore block.vault.name = Deposito block.wave.name = Idrogetto @@ -769,11 +769,11 @@ block.router.description = Accepts items from one direction and outputs them to block.distributor.description = An advanced router which splits items to up to 7 other directions equally. block.bridge-conveyor.description = Advanced item transport block. Allows transporting items over up to 3 tiles of any terrain or building. block.alpha-mech-pad.description = When given enough power, rebuilds your ship into the[accent] Alpha[] mech. -block.itemsource.description = Infinitely outputs items. Sandbox only. -block.liquidsource.description = Infinitely outputs liquids. Sandbox only. -block.itemvoid.description = Destroys any items which go into it without using power. Sandbox only. -block.powerinfinite.description = Infinitely outputs power. Sandbox only. -block.powervoid.description = Voids all power inputted into it. Sandbox only. +block.item-source.description = Infinitely outputs items. Sandbox only. +block.liquid-source.description = Infinitely outputs liquids. Sandbox only. +block.item-void.description = Destroys any items which go into it without using power. Sandbox only. +block.power-source.description = Infinitely outputs power. Sandbox only. +block.power-void.description = Voids all power inputted into it. Sandbox only. liquid.water.description = Commonly used for cooling machines and waste processing. liquid.lava.description = Can be transformed into[LIGHT_GRAY] stone[], used for generating power or used as ammo for certain turrets. liquid.oil.description = Can be burnt, exploded or used as a coolant. diff --git a/core/assets/bundles/bundle_ja.properties b/core/assets/bundles/bundle_ja.properties index ad32034bc4..a1c9a94c7a 100644 --- a/core/assets/bundles/bundle_ja.properties +++ b/core/assets/bundles/bundle_ja.properties @@ -576,11 +576,11 @@ block.omega-mech-pad.name = オメガパッド block.tau-mech-pad.name = タウパッド block.conduit.name = パイプ block.mechanical-pump.name = 機械ポンプ -block.itemsource.name = アイテムソース -block.itemvoid.name = アイテムボイド -block.liquidsource.name = 液体ソース -block.powervoid.name = 電力ボイド -block.powerinfinite.name = 無限電源 +block.item-source.name = アイテムソース +block.item-void.name = アイテムボイド +block.liquid-source.name = 液体ソース +block.power-void.name = 電力ボイド +block.power-source.name = 無限電源 block.unloader.name = アンローダー block.vault.name = ボールト block.wave.name = ウェーブ @@ -778,11 +778,11 @@ block.router.description = 一つの方向から受け取ったアイテムを block.distributor.description = 高度なルーターです。アイテムを7方向に均等に分けて搬出します。 block.bridge-conveyor.description = 高度な輸送ブロックです。地形や建物を超えて、3ブロック離れた場所にアイテムを輸送することができます。 block.alpha-mech-pad.description = 電力を使用して、機体を[accent]アルファ[]機体に作り替えます。 -block.itemsource.description = アイテムを無限に搬出します。サンドボックスのみ。 -block.liquidsource.description = 液体を無限に搬出します。サンドボックスのみ。 -block.itemvoid.description = 電力なしでアイテムを廃棄します。サンドボックスのみ。 -block.powerinfinite.description = 無限に電力を搬出します。サンドボックスのみ。 -block.powervoid.description = 入力されたすべての電力を破棄します。サンドボックスのみ。 +block.item-source.description = アイテムを無限に搬出します。サンドボックスのみ。 +block.liquid-source.description = 液体を無限に搬出します。サンドボックスのみ。 +block.item-void.description = 電力なしでアイテムを廃棄します。サンドボックスのみ。 +block.power-source.description = 無限に電力を搬出します。サンドボックスのみ。 +block.power-void.description = 入力されたすべての電力を破棄します。サンドボックスのみ。 liquid.water.description = 一般的に機械の冷却や廃棄物の処理などに使用されます。 liquid.lava.description = 冷却して石にしたり、発電や一部ターレットの弾薬として使用することができます。 liquid.oil.description = 燃焼させたり、爆発させたり、冷却水としても使われます。 diff --git a/core/assets/bundles/bundle_ko.properties b/core/assets/bundles/bundle_ko.properties index 00d11c78d8..a7b519112a 100644 --- a/core/assets/bundles/bundle_ko.properties +++ b/core/assets/bundles/bundle_ko.properties @@ -570,11 +570,11 @@ block.omega-mech-pad.name = 오메가 기체 패드 block.tau-mech-pad.name = 타우 기체 패드 block.conduit.name = 파이프 block.mechanical-pump.name = 기계식 펌프 -block.itemsource.name = 아이템 소스 -block.itemvoid.name = 아이템 삭제 장치 -block.liquidsource.name = 무한 액체공급 장치 -block.powervoid.name = 방전장치 -block.powerinfinite.name = 무한 전력공급 장치 +block.item-source.name = 아이템 소스 +block.item-void.name = 아이템 삭제 장치 +block.liquid-source.name = 무한 액체공급 장치 +block.power-void.name = 방전장치 +block.power-source.name = 무한 전력공급 장치 block.unloader.name = 언로더 block.vault.name = 창고 block.wave.name = 파도 @@ -772,11 +772,11 @@ block.router.description = 한 방향에서 아이템을 받은 후 최대 3개 block.distributor.description = 아이템을 최대 7개의 다른 방향으로 똑같이 분할하는 고급 분배기. block.bridge-conveyor.description = 고급 자원 수송 블록.\n지형이나 건물을 넘어 최대 3개 타일을 건너뛰고 자원을 운송할 수 있습니다. block.alpha-mech-pad.description = 알파 기체로 바꿀 수 있는 패드입니다. -block.itemsource.description = 자원을 선택하면 그 자원이 무한하게 생성되는 블록입니다. -block.liquidsource.description = 무한한 액체를 출력해냅니다. -block.itemvoid.description = 아이템을 사라지게 만듭니다. -block.powerinfinite.description = 무한한 전력을 공급해주는 블록입니다. -block.powervoid.description = 설정된 아이템을 계속해서 출력하는 블록입니다. +block.item-source.description = 자원을 선택하면 그 자원이 무한하게 생성되는 블록입니다. +block.liquid-source.description = 무한한 액체를 출력해냅니다. +block.item-void.description = 아이템을 사라지게 만듭니다. +block.power-source.description = 무한한 전력을 공급해주는 블록입니다. +block.power-void.description = 설정된 아이템을 계속해서 출력하는 블록입니다. liquid.water.description = 지상 유닛이 이 위를 지나가면 이동속도가 느려지고, 깊은 물에 빠지면 죽습니다. liquid.lava.description = 지상 유닛이 이 위를 지나가면 이동속도가 매우 느려지고, 지속적으로 데미지를 입습니다. liquid.oil.description = 일부 조합 블록에서 사용되는 자원입니다. diff --git a/core/assets/bundles/bundle_pl.properties b/core/assets/bundles/bundle_pl.properties index 5c602156e2..16defe23ae 100644 --- a/core/assets/bundles/bundle_pl.properties +++ b/core/assets/bundles/bundle_pl.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = Rura block.mechanical-pump.name = Mechaniczna Pompa -block.itemsource.name = Źródło przedmiotów -block.itemvoid.name = Próżnia przedmiotów -block.liquidsource.name = Źródło płynów -block.powervoid.name = Próżnia prądu -block.powerinfinite.name = Nieskończony Prąd +block.item-source.name = Źródło przedmiotów +block.item-void.name = Próżnia przedmiotów +block.liquid-source.name = Źródło płynów +block.power-void.name = Próżnia prądu +block.power-source.name = Nieskończony Prąd block.unloader.name = Wyciągacz block.vault.name = Magazyn block.wave.name = Działo Płynowe @@ -769,11 +769,11 @@ block.router.description = Akceptuje przedmioty z jednego miejsca i rozdziela je block.distributor.description = Zaawansowany rozdzielacz, rozdzielający przedmioty do 7 innych kierunków. block.bridge-conveyor.description = Zaawansowany blok transportujący. Pozwala na przenoszenie przedmiotów nawet do 3 bloków na każdym terenie, przez każdy budynek. block.alpha-mech-pad.description = When given enough power, rebuilds your ship into the[accent] Alpha[] mech. -block.itemsource.description = Wydziela przedmioty w nieskończoność. Dostępny tylko w trybie sandbox. -block.liquidsource.description = Wydziela ciecz w nieskończoność. Dostępny tylko w trybie sandbox. -block.itemvoid.description = Niszczy wszystkie przedmioty, które idą do tego bloku, który nie wymaga prądu. Dostępny tylko w trybie sandbox. -block.powerinfinite.description = Wydziela prąd w nieskończoność. Dostępny tylko w trybie sandbox. -block.powervoid.description = Niszczy całą energię wprowadzoną do tego bloku. Dostępny tylko w trybie sandbox. +block.item-source.description = Wydziela przedmioty w nieskończoność. Dostępny tylko w trybie sandbox. +block.liquid-source.description = Wydziela ciecz w nieskończoność. Dostępny tylko w trybie sandbox. +block.item-void.description = Niszczy wszystkie przedmioty, które idą do tego bloku, który nie wymaga prądu. Dostępny tylko w trybie sandbox. +block.power-source.description = Wydziela prąd w nieskończoność. Dostępny tylko w trybie sandbox. +block.power-void.description = Niszczy całą energię wprowadzoną do tego bloku. Dostępny tylko w trybie sandbox. liquid.water.description = Powszechnie używana do schładzania budowli i przetwarzania odpadów. liquid.lava.description = Może być przekształcona w [LIGHT_GRAY] kamień[]; używana do generowania prądu lub używana jako amunicja dla niektórych działek. liquid.oil.description = Może się palić, eksplodować lub być używana do schładzania. diff --git a/core/assets/bundles/bundle_pt_BR.properties b/core/assets/bundles/bundle_pt_BR.properties index cb44f65e08..51d539d334 100644 --- a/core/assets/bundles/bundle_pt_BR.properties +++ b/core/assets/bundles/bundle_pt_BR.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Controle do meca Omega block.tau-mech-pad.name = Controle do meca Tau block.conduit.name = Cano block.mechanical-pump.name = Bomba Mecanica -block.itemsource.name = Fonte do item -block.itemvoid.name = Item Void -block.liquidsource.name = Liquid Source -block.powervoid.name = Power Void -block.powerinfinite.name = Power Infinite +block.item-source.name = Fonte do item +block.item-void.name = Item Void +block.liquid-source.name = Liquid Source +block.power-void.name = Power Void +block.power-source.name = Power Infinite block.unloader.name = Unloader block.vault.name = Cofre block.wave.name = Wave @@ -769,11 +769,11 @@ block.router.description = Aceita itens de uma direção e os divide em 3 direç block.distributor.description = Um roteador avancada que espalhas os itens em 7 outras direções igualmente. block.bridge-conveyor.description = Bloco de transporte de itens avancado. Possibilita o transporte de itens acima de 3 blocos de construção ou paredes. block.alpha-mech-pad.description = Quando dado energia o suficiente, Reconstrua sua nave em [accent] Alpha[] mech. -block.itemsource.description = Infinivamente da itens. Apenas caixa de areia. -block.liquidsource.description = Infinitivamente da Liquidos. Apenas caixa de areia. -block.itemvoid.description = Destroi qualquer item que entre sem requerir energia. Apenas caixa de areia. -block.powerinfinite.description = Infinitivamente da energia. Apenas caixa de areia. -block.powervoid.description = Destroi qualquer energia que entre dentro. Apenas caixa de areia. +block.item-source.description = Infinivamente da itens. Apenas caixa de areia. +block.liquid-source.description = Infinitivamente da Liquidos. Apenas caixa de areia. +block.item-void.description = Destroi qualquer item que entre sem requerir energia. Apenas caixa de areia. +block.power-source.description = Infinitivamente da energia. Apenas caixa de areia. +block.power-void.description = Destroi qualquer energia que entre dentro. Apenas caixa de areia. liquid.water.description = Comumente usado em resfriamento e no processo de perda. liquid.lava.description = Pode ser transformado em[LIGHT_GRAY] pedra[], usado para gerar energia ou usado como munição para certas torres. liquid.oil.description = Pode ser queimado, explodido ou usado como resfriador. diff --git a/core/assets/bundles/bundle_ru.properties b/core/assets/bundles/bundle_ru.properties index 000b995f43..ec792c0440 100644 --- a/core/assets/bundles/bundle_ru.properties +++ b/core/assets/bundles/bundle_ru.properties @@ -569,11 +569,11 @@ block.omega-mech-pad.name = Реконструктор мехов "Омега" block.tau-mech-pad.name = Реконструктор мехов "Тау" block.conduit.name = Трубопровод block.mechanical-pump.name = Механическая помпа -block.itemsource.name = Источник предметов -block.itemvoid.name = Предметный вакуум -block.liquidsource.name = Источник жидкостей -block.powervoid.name = Энергетический вакуум -block.powerinfinite.name = Источник энергии +block.item-source.name = Источник предметов +block.item-void.name = Предметный вакуум +block.liquid-source.name = Источник жидкостей +block.power-void.name = Энергетический вакуум +block.power-source.name = Источник энергии block.unloader.name = Разгрузчик block.vault.name = Хранилище block.wave.name = Волна @@ -771,11 +771,11 @@ block.router.description = Принимает предметы из одного block.distributor.description = Передовой маршрутизатор, который равномерно разбивает элементы до 7 других направлений. block.bridge-conveyor.description = Улучшенный транспортный блок элементов. Позволяет транспортировать предметы до 3-х блоков над любым ландшафтом или зданием. block.alpha-mech-pad.description = Превращает вас в мех [accent] Альфа[]. Требует энергию. -block.itemsource.description = Бесконечно выводит предметы. Работает только в песочнице. -block.liquidsource.description = Бесконечно выводит жидкости. Работает только в песочнице. -block.itemvoid.description = Уничтожает любые предметы, которые входят в него, без использования энергии. Работает только в режиме песочницы. -block.powerinfinite.description = Бесконечность — не предел. Бесконечно выводит энергию. Доступен только в режиме песочницы. -block.powervoid.description = Энергия просто уходит в пустоту. Присутствует только в песочнице. +block.item-source.description = Бесконечно выводит предметы. Работает только в песочнице. +block.liquid-source.description = Бесконечно выводит жидкости. Работает только в песочнице. +block.item-void.description = Уничтожает любые предметы, которые входят в него, без использования энергии. Работает только в режиме песочницы. +block.power-source.description = Бесконечность — не предел. Бесконечно выводит энергию. Доступен только в режиме песочницы. +block.power-void.description = Энергия просто уходит в пустоту. Присутствует только в песочнице. liquid.water.description = Намного лучше чем [BLUE]монооксид дигидрогена[].\n\n Для получения воды используйте помпу(насос) на источнике(блоке) или экстрактор воды.\n\n Эту жидкость можно подвести к бурам для ускорения скорости добычи или к турелям для ускорения стрельбы. liquid.lava.description = [accent]Горячо...\nВещество расплавленное из горно-каменных пород. liquid.oil.description = Кто-то писал о добавлении золота в игру. Его добавили, правда оно какое-то чёрное...\nСмесь жидких углеводородов, выделяющаяся из природного газа в результате снижения температуры и пластового давления. diff --git a/core/assets/bundles/bundle_tk.properties b/core/assets/bundles/bundle_tk.properties index e0476393f0..65701c2094 100644 --- a/core/assets/bundles/bundle_tk.properties +++ b/core/assets/bundles/bundle_tk.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = boru block.mechanical-pump.name = Mekanikal pompa -block.itemsource.name = esya kaynagi -block.itemvoid.name = esya deligi -block.liquidsource.name = sivi kaynagi -block.powervoid.name = guc deligi -block.powerinfinite.name = sonsuz guc +block.item-source.name = esya kaynagi +block.item-void.name = esya deligi +block.liquid-source.name = sivi kaynagi +block.power-void.name = guc deligi +block.power-source.name = sonsuz guc block.unloader.name = bekletici block.vault.name = kasa block.wave.name = Dalga @@ -769,11 +769,11 @@ block.router.description = Accepts items from one direction and outputs them to block.distributor.description = An advanced router which splits items to up to 7 other directions equally. block.bridge-conveyor.description = Advanced item transport block. Allows transporting items over up to 3 tiles of any terrain or building. block.alpha-mech-pad.description = When given enough power, rebuilds your ship into the[accent] Alpha[] mech. -block.itemsource.description = Infinitely outputs items. Sandbox only. -block.liquidsource.description = Infinitely outputs liquids. Sandbox only. -block.itemvoid.description = Destroys any items which go into it without using power. Sandbox only. -block.powerinfinite.description = Infinitely outputs power. Sandbox only. -block.powervoid.description = Voids all power inputted into it. Sandbox only. +block.item-source.description = Infinitely outputs items. Sandbox only. +block.liquid-source.description = Infinitely outputs liquids. Sandbox only. +block.item-void.description = Destroys any items which go into it without using power. Sandbox only. +block.power-source.description = Infinitely outputs power. Sandbox only. +block.power-void.description = Voids all power inputted into it. Sandbox only. liquid.water.description = Commonly used for cooling machines and waste processing. liquid.lava.description = Can be transformed into[LIGHT_GRAY] stone[], used for generating power or used as ammo for certain turrets. liquid.oil.description = Can be burnt, exploded or used as a coolant. diff --git a/core/assets/bundles/bundle_tr.properties b/core/assets/bundles/bundle_tr.properties index 616b2c03b4..2bd8915ce8 100644 --- a/core/assets/bundles/bundle_tr.properties +++ b/core/assets/bundles/bundle_tr.properties @@ -569,11 +569,11 @@ block.omega-mech-pad.name = Omega Mech Pad block.tau-mech-pad.name = Tau Mech Pad block.conduit.name = sıvı borusu block.mechanical-pump.name = Mechanical Pump -block.itemsource.name = Item Source -block.itemvoid.name = Item Void -block.liquidsource.name = Liquid Source -block.powervoid.name = Power Void -block.powerinfinite.name = Power Infinite +block.item-source.name = Item Source +block.item-void.name = Item Void +block.liquid-source.name = Liquid Source +block.power-void.name = Power Void +block.power-source.name = Power Infinite block.unloader.name = Unloader block.vault.name = Vault block.wave.name = Wave @@ -771,11 +771,11 @@ block.router.description = Accepts items from one direction and outputs them to block.distributor.description = An advanced router which splits items to up to 7 other directions equally. block.bridge-conveyor.description = Advanced item transport block. Allows transporting items over up to 3 tiles of any terrain or building. block.alpha-mech-pad.description = When given enough power, rebuilds your ship into the[accent] Alpha[] mech. -block.itemsource.description = Infinitely outputs items. Sandbox only. -block.liquidsource.description = Infinitely outputs liquids. Sandbox only. -block.itemvoid.description = Destroys any items which go into it without using power. Sandbox only. -block.powerinfinite.description = Infinitely outputs power. Sandbox only. -block.powervoid.description = Voids all power inputted into it. Sandbox only. +block.item-source.description = Infinitely outputs items. Sandbox only. +block.liquid-source.description = Infinitely outputs liquids. Sandbox only. +block.item-void.description = Destroys any items which go into it without using power. Sandbox only. +block.power-source.description = Infinitely outputs power. Sandbox only. +block.power-void.description = Voids all power inputted into it. Sandbox only. liquid.water.description = Commonly used for cooling machines and waste processing. liquid.lava.description = Can be transformed into[LIGHT_GRAY] stone[], used for generating power or used as ammo for certain turrets. liquid.oil.description = Can be burnt, exploded or used as a coolant. diff --git a/core/assets/bundles/bundle_uk_UA.properties b/core/assets/bundles/bundle_uk_UA.properties index c78427623f..3dd40bb0f5 100644 --- a/core/assets/bundles/bundle_uk_UA.properties +++ b/core/assets/bundles/bundle_uk_UA.properties @@ -580,11 +580,11 @@ block.omega-mech-pad.name = Реконструктор "Омега" block.tau-mech-pad.name = Реконструктор "Тау" block.conduit.name = Трубопровід block.mechanical-pump.name = Механічний насос -block.itemsource.name = Джерело предметів -block.itemvoid.name = Предметний вакуум -block.liquidsource.name = Рідке джерело -block.powervoid.name = Енергетичний вакуум -block.powerinfinite.name = Нескінченна енергія +block.item-source.name = Джерело предметів +block.item-void.name = Предметний вакуум +block.liquid-source.name = Рідке джерело +block.power-void.name = Енергетичний вакуум +block.power-source.name = Нескінченна енергія block.unloader.name = Розвантажувач block.vault.name = Сховище block.wave.name = Хвиля @@ -782,11 +782,11 @@ block.router.description = Приймає елементи з одного на block.distributor.description = Розширений маршрутизатор, який рівномірно розбиває елементи на 7 різних напрямків. block.bridge-conveyor.description = Покращений блок транспортування предметів. Дозволяє транспортувати предмети понад 3 блоки над будь-якої місцевостю або будівлеє. block.alpha-mech-pad.description = Коли ви отримаєте достатньо енергії, перебудовує ваш корабель у [accent] Альфа[] мех. -block.itemsource.description = Безліченно виводить предмети. -block.liquidsource.description = Безліченно виводить рідини. -block.itemvoid.description = Знищує будь-які предмети, які входять, без використання енергії. -block.powerinfinite.description = Нескінченність не межа. Безмежно виводить енергію. -block.powervoid.description = Енергія просто йде в порожнечу. +block.item-source.description = Безліченно виводить предмети. +block.liquid-source.description = Безліченно виводить рідини. +block.item-void.description = Знищує будь-які предмети, які входять, без використання енергії. +block.power-source.description = Нескінченність не межа. Безмежно виводить енергію. +block.power-void.description = Енергія просто йде в порожнечу. liquid.water.description = Цю рідину можно підвести до бурів для прискорення швидкості видобутку або к турелям для прискорення стрілянини. liquid.lava.description = Можна перетворити в[LIGHT_GRAY] камінь[]. liquid.oil.description = Можна спалити, взірвати або використовувати для охолодження. diff --git a/core/assets/bundles/bundle_zh_CN.properties b/core/assets/bundles/bundle_zh_CN.properties index cc6dbb00bb..a3e85d08d8 100644 --- a/core/assets/bundles/bundle_zh_CN.properties +++ b/core/assets/bundles/bundle_zh_CN.properties @@ -567,11 +567,11 @@ block.omega-mech-pad.name = Omega 机甲平台 block.tau-mech-pad.name = Tau 机甲平台 block.conduit.name = 导管 block.mechanical-pump.name = 机械泵 -block.itemsource.name = 物品源 -block.itemvoid.name = 物品黑洞 -block.liquidsource.name = 液体源 -block.powervoid.name = 能源黑洞 -block.powerinfinite.name = 无限能源 +block.item-source.name = 物品源 +block.item-void.name = 物品黑洞 +block.liquid-source.name = 液体源 +block.power-void.name = 能源黑洞 +block.power-source.name = 无限能源 block.unloader.name = 装卸器 block.vault.name = 仓库 block.wave.name = 波浪 @@ -769,11 +769,11 @@ block.router.description = 从一个方向接受物品,并将它们平均输 block.distributor.description = 一个高级路由器,可以将物品分成最多7个方向。 block.bridge-conveyor.description = 高级项目传输块。允许在跨越任何地形或建筑物上运输物品,最多跨越3个块。 block.alpha-mech-pad.description = 当给予足够的电力时,将你的装置重建为[accent] Alpha []机甲。 -block.itemsource.description = 无限输出物品。仅限沙箱。 -block.liquidsource.description = 无限输出液体。仅限沙箱。 -block.itemvoid.description = 在不使用电源的情况下销毁任何进入它的物品。仅限沙箱。 -block.powerinfinite.description = 无限输出功率。仅限沙箱。 -block.powervoid.description = 消耗输入的所有功率。仅限沙箱。 +block.item-source.description = 无限输出物品。仅限沙箱。 +block.liquid-source.description = 无限输出液体。仅限沙箱。 +block.item-void.description = 在不使用电源的情况下销毁任何进入它的物品。仅限沙箱。 +block.power-source.description = 无限输出功率。仅限沙箱。 +block.power-void.description = 消耗输入的所有功率。仅限沙箱。 liquid.water.description = 通常用于冷却和废物处理。 liquid.lava.description = 可以转换成[LIGHT_GRAY] 石头 [],用于发电或用作某些炮塔的弹药。 liquid.oil.description = 可以燃烧,爆炸或用作冷却液。 diff --git a/core/assets/bundles/bundle_zh_TW.properties b/core/assets/bundles/bundle_zh_TW.properties index d7f8aaf123..6796aaaf6d 100644 --- a/core/assets/bundles/bundle_zh_TW.properties +++ b/core/assets/bundles/bundle_zh_TW.properties @@ -578,11 +578,11 @@ block.omega-mech-pad.name = 奧米伽機甲墊 block.tau-mech-pad.name = Tau機甲墊 block.conduit.name = 管線 block.mechanical-pump.name = 機械泵 -block.itemsource.name = 物品源 -block.itemvoid.name = 物品虚 -block.liquidsource.name = 液體源 -block.powervoid.name = 能量空虛 -block.powerinfinite.name = 無限能量 +block.item-source.name = 物品源 +block.item-void.name = 物品虚 +block.liquid-source.name = 液體源 +block.power-void.name = 能量空虛 +block.power-source.name = 無限能量 block.unloader.name = 裝卸器 block.vault.name = 存儲庫 block.wave.name = 波浪炮 @@ -780,11 +780,11 @@ block.router.description = 接受來自一個方向的物品並將它們平均 block.distributor.description = 高級的分配器,可將物品均分到最多7個其他方向。 block.bridge-conveyor.description = 高級的物品運輸方塊。允許跨過最多3個任何地形或建築物的方塊運輸物品。 block.alpha-mech-pad.description = 當給予足夠能量時,將你的船重建為[accent]阿爾法[]機甲。 -block.itemsource.description = 不限地輸出物品。僅限沙盒。 -block.liquidsource.description = 不限地輸出液體。僅限沙盒。 -block.itemvoid.description = 不使用能量銷毀任何進入它的物品。僅限沙盒。 -block.powerinfinite.description = 不限地輸出能量。僅限沙盒。 -block.powervoid.description = 銷毀所有輸入的能量。僅限沙盒。 +block.item-source.description = 不限地輸出物品。僅限沙盒。 +block.liquid-source.description = 不限地輸出液體。僅限沙盒。 +block.item-void.description = 不使用能量銷毀任何進入它的物品。僅限沙盒。 +block.power-source.description = 不限地輸出能量。僅限沙盒。 +block.power-void.description = 銷毀所有輸入的能量。僅限沙盒。 liquid.water.description = 常用於冷卻機器和廢物處理。 liquid.lava.description = 可以轉換為[LIGHT_GRAY]石頭[]、用於發電或用作某些砲塔的彈藥。 liquid.oil.description = 可以燃燒、爆炸或用作冷卻劑。 diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index d5145aeba9..842c5712f2 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -2944,28 +2944,28 @@ incinerator orig: 32, 32 offset: 0, 0 index: -1 -block-icon-itemsource +block-icon-item-source rotate: false xy: 483, 425 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 -itemsource +item-source rotate: false xy: 483, 425 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 -block-icon-itemvoid +block-icon-item-void rotate: false xy: 415, 357 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 -itemvoid +item-void rotate: false xy: 415, 357 size: 32, 32 @@ -3042,6 +3042,20 @@ block-icon-liquid-router orig: 32, 32 offset: 0, 0 index: -1 +block-icon-liquid-source + rotate: false + xy: 483, 357 + size: 32, 32 + orig: 32, 32 + offset: 0, 0 + index: -1 +liquid-source + rotate: false + xy: 483, 357 + size: 32, 32 + orig: 32, 32 + offset: 0, 0 + index: -1 block-icon-liquid-tank rotate: false xy: 261, 1243 @@ -3049,20 +3063,6 @@ block-icon-liquid-tank orig: 96, 96 offset: 0, 0 index: -1 -block-icon-liquidsource - rotate: false - xy: 483, 357 - size: 32, 32 - orig: 32, 32 - offset: 0, 0 - index: -1 -liquidsource - rotate: false - xy: 483, 357 - size: 32, 32 - orig: 32, 32 - offset: 0, 0 - index: -1 block-icon-mass-driver rotate: false xy: 359, 1341 @@ -3308,14 +3308,28 @@ block-icon-power-node-large orig: 64, 64 offset: 0, 0 index: -1 -block-icon-powerinfinite +block-icon-power-source rotate: false xy: 229, 310 size: 32, 32 orig: 32, 32 offset: 0, 0 index: -1 -block-icon-powervoid +power-source + rotate: false + xy: 229, 310 + size: 32, 32 + orig: 32, 32 + offset: 0, 0 + index: -1 +block-icon-power-void + rotate: false + xy: 229, 276 + size: 32, 32 + orig: 32, 32 + offset: 0, 0 + index: -1 +power-void rotate: false xy: 229, 276 size: 32, 32 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index eb3273ed024dbad7084e3b895c3fe71012edec62..ed95b1de59ffa84e17dd72f7d33841080925566f 100644 GIT binary patch delta 41646 zcmZ43Df*~Gw4sHug{g&k3rpytdYc>lk4}Bp`R=l(^WDGau0CJn^&jn>VQ%<-e&@V* zFF!8kJ+?`#0Zy_vs30 zNIsmeIzKbcl96Gu@Xuamh9le!EoSrn=`%5`s&`=6aaog<;a=_cy9-+WGkuJUjKA~# zHyfkfj|a_h3=bY0Y}Po>TFS(5tAy2IE(1dz#{!=p=V$S;9N=VHu}*G96GPGYFVhO& zAO0T3#31u%KLf)%28J~WZ>@M`8~Ja|>6)=!@!#zR4h{u}Eh#roJ*l2;T5j6$e`5Ya z`vux85x1P{=Q1#8Jpc1fqzm|tBzo5c!pfSDWh}qr$9SjUi3@tniBJFE(~xW>ScAW(Iro{_09_1JdW#5 zm%h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}k9ZnvN+qUnM6p>{(5a)eWFf!yj);ByjvGH;kLxZ$=Uc=9P9tH== zfN7kd3j0?dpW3^1iJ;okh=F0#&xJY+4Qu4P(*C?|V%Rt9znMbAn)%%F3=FI47QC_+ zPg|eFvGihqSEhTexFADAnce;W^&AP|mAmqx`G;r?=2M^K7$(eNDY)G{89eOP@H^wpN}0o=YdsDB zD}N0y2@PoDe`^tWaaY$lLxuwk4u@XKi%T$^FlG1g zIkxF`*0rGV-Xow) z73MnGChNF)(%T(}KpL5N4H+i97G`*NcJfF4m*<0+7%KPX!(Aj<@4&E>iQ$nz0|%%Z z4K5beGc;t>ff`M(+LdPi*Ai$r|7^cE$ATP&22cBd?{jlEhl_o4U||TD&lJGMaG=%l z{jEQs>yl0XhblBE&Hmp7>Z^ddjRzPUDj6A07M}q*10uixDp{a|wh$3hun?$;g~@0* e&T!yA!`W4z9%dTnw=pm { + Angles.randLenVectors(e.id, 4, e.fin() * 8f, (x, y) -> { + float size = 1f + e.fout() * 5f; + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }); + nuclearsmoke = new Effect(40, e -> { + Angles.randLenVectors(e.id, 4, e.fin() * 13f, (x, y) -> { + float size = e.fslope() * 4f; + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }); + nuclearcloud = new Effect(90, 200f, e -> { + Angles.randLenVectors(e.id, 10, e.finpow() * 90f, (x, y) -> { + float size = e.fout() * 14f; + Draw.color(Color.LIME, Color.GRAY, e.fin()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }); + redgeneratespark = new Effect(18, e -> { + Angles.randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> { + float len = e.fout() * 4f; + Draw.color(Palette.redSpark, Color.GRAY, e.fin()); + //Draw.alpha(e.fout()); + Draw.rect("circle", e.x + x, e.y + y, len, len); + Draw.reset(); + }); + }); + generatespark = new Effect(18, e -> { + Angles.randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> { + float len = e.fout() * 4f; + Draw.color(Palette.orangeSpark, Color.GRAY, e.fin()); + Draw.rect("circle", e.x + x, e.y + y, len, len); + Draw.reset(); + }); + }); + fuelburn = new Effect(23, e -> { + Angles.randLenVectors(e.id, 5, e.fin() * 9f, (x, y) -> { + float len = e.fout() * 4f; + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); + Draw.rect("circle", e.x + x, e.y + y, len, len); + Draw.reset(); + }); + }); + plasticburn = new Effect(40, e -> { + Angles.randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> { + Draw.color(Color.valueOf("e9ead3"), Color.GRAY, e.fin()); + Fill.circle(e.x + x, e.y + y, e.fout() * 1f); + Draw.reset(); + }); + }); + pulverize = new Effect(40, e -> { + Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { + Draw.color(Palette.stoneGray); + Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); + Draw.reset(); + }); + }); + pulverizeRed = new Effect(40, e -> { + Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { + Draw.color(Palette.redDust, Palette.stoneGray, e.fin()); + Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); + Draw.reset(); + }); + }); + pulverizeRedder = new Effect(40, e -> { + Angles.randLenVectors(e.id, 5, 3f + e.fin() * 9f, (x, y) -> { + Draw.color(Palette.redderDust, Palette.stoneGray, e.fin()); + Fill.square(e.x + x, e.y + y, e.fout() * 2.5f + 0.5f, 45); + Draw.reset(); + }); + }); + pulverizeSmall = new Effect(30, e -> { + Angles.randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> { + Draw.color(Palette.stoneGray); + Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45); + Draw.reset(); + }); + }); + pulverizeMedium = new Effect(30, e -> { + Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { + Draw.color(Palette.stoneGray); + Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45); + Draw.reset(); + }); + }); + producesmoke = new Effect(12, e -> { + Angles.randLenVectors(e.id, 8, 4f + e.fin() * 18f, (x, y) -> { + Draw.color(Color.WHITE, Palette.accent, e.fin()); + Fill.square(e.x + x, e.y + y, 1f + e.fout() * 3f, 45); + Draw.reset(); + }); + }); + smeltsmoke = new Effect(15, e -> { + Angles.randLenVectors(e.id, 6, 4f + e.fin() * 5f, (x, y) -> { + Draw.color(Color.WHITE, e.color, e.fin()); + Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45); + Draw.reset(); + }); + }); + formsmoke = new Effect(40, e -> { + Angles.randLenVectors(e.id, 6, 5f + e.fin() * 8f, (x, y) -> { + Draw.color(Palette.plasticSmoke, Color.LIGHT_GRAY, e.fin()); + Fill.square(e.x + x, e.y + y, 0.2f + e.fout() * 2f, 45); + Draw.reset(); + }); + }); + blastsmoke = new Effect(26, e -> { + Angles.randLenVectors(e.id, 12, 1f + e.fin() * 23f, (x, y) -> { + float size = 2f + e.fout() * 6f; + Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fin()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }); + lava = new Effect(18, e -> { + Angles.randLenVectors(e.id, 3, 1f + e.fin() * 10f, (x, y) -> { + float size = e.fslope() * 4f; + Draw.color(Color.ORANGE, Color.GRAY, e.fin()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }); + dooropen = new Effect(10, e -> { + Lines.stroke(e.fout() * 1.6f); + Lines.square(e.x, e.y, tilesize / 2f + e.fin() * 2f); + Draw.reset(); + }); + doorclose = new Effect(10, e -> { + Lines.stroke(e.fout() * 1.6f); + Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 2f); + Draw.reset(); + }); + dooropenlarge = new Effect(10, e -> { + Lines.stroke(e.fout() * 1.6f); + Lines.square(e.x, e.y, tilesize + e.fin() * 2f); + Draw.reset(); + }); + doorcloselarge = new Effect(10, e -> { + Lines.stroke(e.fout() * 1.6f); + Lines.square(e.x, e.y, tilesize + e.fout() * 2f); + Draw.reset(); + }); + purify = new Effect(10, e -> { + Draw.color(Color.ROYAL, Color.GRAY, e.fin()); + Lines.stroke(2f); + Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); + Draw.reset(); + }); + purifyoil = new Effect(10, e -> { + Draw.color(Color.BLACK, Color.GRAY, e.fin()); + Lines.stroke(2f); + Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); + Draw.reset(); + }); + purifystone = new Effect(10, e -> { + Draw.color(Color.ORANGE, Color.GRAY, e.fin()); + Lines.stroke(2f); + Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); + Draw.reset(); + }); + generate = new Effect(11, e -> { + Draw.color(Color.ORANGE, Color.YELLOW, e.fin()); + Lines.stroke(1f); + Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 8); + Draw.reset(); + }); + mine = new Effect(20, e -> { + Angles.randLenVectors(e.id, 6, 3f + e.fin() * 6f, (x, y) -> { + Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); + Fill.square(e.x + x, e.y + y, e.fout() * 2f, 45); + Draw.reset(); + }); + }); + mineBig = new Effect(30, e -> { + Angles.randLenVectors(e.id, 6, 4f + e.fin() * 8f, (x, y) -> { + Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); + Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.2f, 45); + Draw.reset(); + }); + }); + mineHuge = new Effect(40, e -> { + Angles.randLenVectors(e.id, 8, 5f + e.fin() * 10f, (x, y) -> { + Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); + Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); + Draw.reset(); + }); + }); + smelt = new Effect(20, e -> { + Angles.randLenVectors(e.id, 6, 2f + e.fin() * 5f, (x, y) -> { + Draw.color(Color.WHITE, e.color, e.fin()); + Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45); + Draw.reset(); + }); + }); + teleportActivate = new Effect(50, e -> { + Draw.color(e.color); + + e.scaled(8f, e2 -> { + Lines.stroke(e2.fout() * 4f); + Lines.circle(e2.x, e2.y, 4f + e2.fin() * 27f); + }); + + Lines.stroke(e.fout() * 2f); + + Angles.randLenVectors(e.id, 30, 4f + 40f * e.fin(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f); + }); + + Draw.reset(); + }); + teleport = new Effect(60, e -> { + Draw.color(e.color); + Lines.stroke(e.fin() * 2f); + Lines.circle(e.x, e.y, 7f + e.fout() * 8f); + + Angles.randLenVectors(e.id, 20, 6f + 20f * e.fout(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f); + }); + + Draw.reset(); + }); + teleportOut = new Effect(20, e -> { + Draw.color(e.color); + Lines.stroke(e.fout() * 2f); + Lines.circle(e.x, e.y, 7f + e.fin() * 8f); + + Angles.randLenVectors(e.id, 20, 4f + 20f * e.fin(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 4f + 1f); + }); + + Draw.reset(); + }); + ripple = new GroundEffect(false, 30, e -> { + Draw.color(Tmp.c1.set(e.color).shiftValue(0.1f)); + Lines.stroke(e.fout() + 0.4f); + Lines.circle(e.x, e.y, 2f + e.fin() * 4f); + Draw.reset(); + }); + + bubble = new Effect(20, e -> { + Draw.color(Tmp.c1.set(e.color).shiftValue(0.1f)); + Lines.stroke(e.fout() + 0.2f); + Angles.randLenVectors(e.id, 2, 8f, (x, y) -> { + Lines.circle(e.x + x, e.y + y, 1f + e.fin() * 3f); + }); + Draw.reset(); + }); + + commandSend = new Effect(28, e -> { + Draw.color(Palette.command); + Lines.stroke(e.fout() * 2f); + Lines.poly(e.x, e.y, 40, 4f + e.finpow() * 120f); + Draw.color(); + }); + + healWaveMend = new Effect(40, e -> { + Draw.color(e.color); + Lines.stroke(e.fout() * 2f); + Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation); + Draw.color(); + }); + + overdriveWave = new Effect(50, e -> { + Draw.color(e.color); + Lines.stroke(e.fout() * 1f); + Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation); + Draw.color(); + }); + + healBlock = new Effect(20, e -> { + Draw.color(Palette.heal); + Lines.stroke(2f * e.fout() + 0.5f); + Lines.square(e.x, e.y, 1f + (e.fin() * e.rotation * tilesize/2f-1f)); + Draw.color(); + }); + + healBlockFull = new Effect(20, e -> { + Draw.color(e.color); + Draw.alpha(e.fout()); + Fill.square(e.x, e.y, e.rotation * tilesize / 2f); + Draw.color(); + }); + + overdriveBlockFull = new Effect(60, e -> { + Draw.color(e.color); + Draw.alpha(e.fslope() * 0.4f); + Fill.square(e.x, e.y, e.rotation * tilesize); + Draw.color(); + }); + + shieldBreak = new Effect(40, e -> { + Draw.color(Palette.accent); + Lines.stroke(3f * e.fout()); + Lines.poly(e.x, e.y, 6, e.rotation + e.fin(), 90); + Draw.reset(); + }); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java index 4eb4687cca..873a2bbd74 100644 --- a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java @@ -55,8 +55,7 @@ public class OreBlock extends Floor{ public static Block get(Block floor, Item item){ if(!oreBlockMap.containsKey(item)) throw new IllegalArgumentException("Item '" + item + "' is not an ore!"); - if(!oreBlockMap.get(item).containsKey(floor)) - throw new IllegalArgumentException("Block '" + floor.name + "' does not support ores!"); + if(!oreBlockMap.get(item).containsKey(floor)) throw new IllegalArgumentException("Block '" + floor.name + "' does not support ores!"); return oreBlockMap.get(item).get(floor); } }