a rather large merge

This commit is contained in:
Anuken
2019-01-07 21:10:57 -05:00
169 changed files with 4143 additions and 4928 deletions
@@ -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;
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,646 @@
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.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.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, meltdownLaser, lightning, arc, damageLightning,
//liquid
waterShot, cryoShot, slagShot, oilShot,
//environment, misc.
fireball, basicFlame, fuseShot, driverBolt, healBullet, frag,
//bombs
bombExplosive, bombIncendiary, bombOil;
@Override
public void load(){
artilleryDense = new ArtilleryBulletType(3f, 0, "shell"){{
hitEffect = Fx.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 = Fx.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 = Fx.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 = Fx.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 = Fx.incendTrail;
}};
artilleryExplosive = new ArtilleryBulletType(2f, 0, "shell"){{
hitEffect = Fx.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 = Fx.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 = Fx.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 = Fx.blastExplosion;
despawnEffect = Fx.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 = Fx.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 = Fx.blastExplosion;
despawnEffect = Fx.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 = Fx.blastExplosion;
despawnEffect = Fx.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 = Fx.blastExplosion;
despawnEffect = Fx.blastExplosion;
weaveScale = 8f;
weaveMag = 2f;
}};
standardCopper = new BasicBulletType(2.5f, 7, "bullet"){{
bulletWidth = 7f;
bulletHeight = 9f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.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 = Fx.shootBig;
smokeEffect = Fx.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 = Fx.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 = Fx.hitLancer;
despawnEffect = Fx.none;
status = StatusEffects.shocked;
statusIntensity = 1f;
}
};
healBullet = new BulletType(5.2f, 13){
float healPercent = 3f;
{
hitEffect = Fx.hitLaser;
despawnEffect = Fx.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(Fx.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(Fx.fireballsmoke, b.x, b.y);
}
if(Mathf.chance(0.1 * Time.delta())){
Effects.effect(Fx.ballfire, b.x, b.y);
}
}
};
basicFlame = new BulletType(2.3f, 5){
{
hitSize = 7f;
lifetime = 35f;
pierce = true;
drag = 0.05f;
hitEffect = Fx.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 = Fx.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 = Fx.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 = Fx.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){{
}};
slagShot = new LiquidBulletType(Liquids.slag){{
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 = Fx.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 = Fx.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 = Fx.flakExplosion;
}};
bombIncendiary = new BombBulletType(7f, 10f, "shell"){{
bulletWidth = 8f;
bulletHeight = 12f;
hitEffect = Fx.flakExplosion;
backColor = Palette.lightOrange;
frontColor = Palette.lightishOrange;
incendChance = 1f;
incendAmount = 3;
incendSpread = 10f;
}};
bombOil = new BombBulletType(2f, 3f, "shell"){{
bulletWidth = 8f;
bulletHeight = 12f;
hitEffect = Fx.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);
}
}
};
}
}
File diff suppressed because it is too large Load Diff
@@ -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;
}
}
@@ -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{
@@ -47,9 +46,4 @@ public class Liquids implements ContentList{
effect = StatusEffects.freezing;
}};
}
@Override
public ContentType type(){
return ContentType.liquid;
}
}
+8 -16
View File
@@ -9,15 +9,12 @@ 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;
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{
@@ -68,7 +65,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 +106,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 +114,7 @@ public class Mechs implements ContentList{
});
if(wasHealed){
Effects.effect(UnitFx.healWave, player);
Effects.effect(Fx.healWave, player);
}
}
}
@@ -160,7 +157,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
@@ -228,9 +225,9 @@ 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.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 +248,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 +268,7 @@ public class Mechs implements ContentList{
@Override
public boolean canShoot(Player player){
return player.getVelocity().len() > 1.2f;
return player.velocity().len() > 1.2f;
}
};
@@ -293,9 +290,4 @@ public class Mechs implements ContentList{
starterDesktop = alpha;
starterMobile = dart;
}
@Override
public ContentType type(){
return ContentType.mech;
}
}
+105 -112
View File
@@ -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,179 +13,174 @@ 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.titanium, 12));
new Recipe(defense, DefenseBlocks.denseAlloyWallLarge, new ItemStack(Items.titanium, 12 * 4));
new Recipe(defense, Blocks.denseAlloyWall, new ItemStack(Items.titanium, 12));
new Recipe(defense, Blocks.denseAlloyWallLarge, new ItemStack(Items.titanium, 12 * 4));
new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.titanium, 12), new ItemStack(Items.silicon, 8));
new Recipe(defense, DefenseBlocks.doorLarge, new ItemStack(Items.titanium, 12 * 4), new ItemStack(Items.silicon, 8 * 4));
new Recipe(defense, Blocks.door, new ItemStack(Items.titanium, 12), new ItemStack(Items.silicon, 8));
new Recipe(defense, Blocks.doorLarge, new ItemStack(Items.titanium, 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.titanium, 200));
new Recipe(effect, StorageBlocks.vault, new ItemStack(Items.titanium, 500), new ItemStack(Items.thorium, 250));
new Recipe(effect, Blocks.container, new ItemStack(Items.titanium, 200));
new Recipe(effect, Blocks.vault, new ItemStack(Items.titanium, 500), new ItemStack(Items.thorium, 250));
new Recipe(effect, StorageBlocks.core,
new Recipe(effect, Blocks.core,
new ItemStack(Items.copper, 2000), new ItemStack(Items.titanium, 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.titanium, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 180));
new Recipe(effect, DefenseBlocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
new Recipe(effect, DefenseBlocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
new Recipe(effect, Blocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 180));
new Recipe(effect, Blocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
new Recipe(effect, Blocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 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));
//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.graphite, 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.titanium, 70), new ItemStack(Items.lead, 150));
new Recipe(turret, TurretBlocks.salvo, new ItemStack(Items.copper, 210), new ItemStack(Items.graphite, 190), new ItemStack(Items.thorium, 130));
new Recipe(turret, TurretBlocks.swarmer, new ItemStack(Items.graphite, 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.graphite, 220), new ItemStack(Items.thorium, 120));
new Recipe(turret, TurretBlocks.cyclone, new ItemStack(Items.copper, 400), new ItemStack(Items.surgealloy, 200), new ItemStack(Items.plastanium, 150));
new Recipe(turret, TurretBlocks.fuse, new ItemStack(Items.copper, 450), new ItemStack(Items.graphite, 450), new ItemStack(Items.surgealloy, 250));
new Recipe(turret, TurretBlocks.spectre, new ItemStack(Items.copper, 700), new ItemStack(Items.graphite, 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.graphite, 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.graphite, 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.titanium, 70), new ItemStack(Items.lead, 150));
new Recipe(turret, Blocks.salvo, new ItemStack(Items.copper, 210), new ItemStack(Items.graphite, 190), new ItemStack(Items.thorium, 130));
new Recipe(turret, Blocks.swarmer, new ItemStack(Items.graphite, 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.graphite, 220), new ItemStack(Items.thorium, 120));
new Recipe(turret, Blocks.cyclone, new ItemStack(Items.copper, 400), new ItemStack(Items.surgealloy, 200), new ItemStack(Items.plastanium, 150));
new Recipe(turret, Blocks.fuse, new ItemStack(Items.copper, 450), new ItemStack(Items.graphite, 450), new ItemStack(Items.surgealloy, 250));
new Recipe(turret, Blocks.spectre, new ItemStack(Items.copper, 700), new ItemStack(Items.graphite, 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.graphite, 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.graphite, 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);
//more advanced transport
new Recipe(distribution, DistributionBlocks.distributor, new ItemStack(Items.titanium, 8), new ItemStack(Items.copper, 8));
new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.titanium, 4), new ItemStack(Items.copper, 4));
new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.titanium, 4), new ItemStack(Items.copper, 8));
new Recipe(distribution, DistributionBlocks.itemBridge, new ItemStack(Items.titanium, 8), new ItemStack(Items.copper, 8));
new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 60));
new Recipe(distribution, DistributionBlocks.massDriver, new ItemStack(Items.titanium, 250), new ItemStack(Items.silicon, 150), new ItemStack(Items.lead, 250), new ItemStack(Items.thorium, 100));
new Recipe(distribution, Blocks.distributor, new ItemStack(Items.titanium, 8), new ItemStack(Items.copper, 8));
new Recipe(distribution, Blocks.sorter, new ItemStack(Items.titanium, 4), new ItemStack(Items.copper, 4));
new Recipe(distribution, Blocks.overflowGate, new ItemStack(Items.titanium, 4), new ItemStack(Items.copper, 8));
new Recipe(distribution, Blocks.itemBridge, new ItemStack(Items.titanium, 8), new ItemStack(Items.copper, 8));
new Recipe(distribution, Blocks.unloader, new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 60));
new Recipe(distribution, Blocks.massDriver, new ItemStack(Items.titanium, 250), new ItemStack(Items.silicon, 150), new ItemStack(Items.lead, 250), new ItemStack(Items.thorium, 100));
//CRAFTING
//smelting
new Recipe(crafting, CraftingBlocks.siliconSmelter, new ItemStack(Items.copper, 60), 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.graphite, 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.surgeSmelter, 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.graphite, 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.surgeSmelter, 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.titanium, 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.titanium, 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.melter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.graphite, 90));
new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.graphite, 10), new ItemStack(Items.lead, 30));
new Recipe(crafting, Blocks.melter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.graphite, 90));
new Recipe(crafting, Blocks.incinerator, new ItemStack(Items.graphite, 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.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.titanium, 50));
//POWER
new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6));
new Recipe(power, PowerBlocks.powerNodeLarge, new ItemStack(Items.titanium, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6));
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.copper, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4));
new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.titanium, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30));
new Recipe(power, Blocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6));
new Recipe(power, Blocks.powerNodeLarge, new ItemStack(Items.titanium, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6));
new Recipe(power, Blocks.battery, new ItemStack(Items.copper, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4));
new Recipe(power, Blocks.batteryLarge, new ItemStack(Items.titanium, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30));
//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.graphite, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60));
new Recipe(power, PowerBlocks.thermalGenerator, new ItemStack(Items.copper, 80), new ItemStack(Items.graphite, 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.graphite, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60));
new Recipe(power, Blocks.thermalGenerator, new ItemStack(Items.copper, 80), new ItemStack(Items.graphite, 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.graphite, 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.graphite, 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.graphite, 50));
new Recipe(production, ProductionBlocks.laserDrill, new ItemStack(Items.copper, 70), new ItemStack(Items.graphite, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50));
new Recipe(production, ProductionBlocks.blastDrill, new ItemStack(Items.copper, 130), 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.graphite, 50));
new Recipe(production, Blocks.laserDrill, new ItemStack(Items.copper, 70), new ItemStack(Items.graphite, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50));
new Recipe(production, Blocks.blastDrill, new ItemStack(Items.copper, 130), 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.graphite, 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.graphite, 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.graphite, 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.graphite, 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.graphite, 100), new ItemStack(Items.copper, 150)).setVisible(RecipeVisibility.mobileOnly);
new Recipe(upgrade, UpgradeBlocks.tauPad, new ItemStack(Items.lead, 250), new ItemStack(Items.titanium, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250));
new Recipe(upgrade, UpgradeBlocks.deltaPad, new ItemStack(Items.lead, 350), new ItemStack(Items.titanium, 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.graphite, 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.graphite, 100), new ItemStack(Items.copper, 150)).setVisible(RecipeVisibility.mobileOnly);
new Recipe(upgrade, Blocks.tauPad, new ItemStack(Items.lead, 250), new ItemStack(Items.titanium, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250));
new Recipe(upgrade, Blocks.deltaPad, new ItemStack(Items.lead, 350), new ItemStack(Items.titanium, 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.graphite, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240));
//unit factories
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.titanium, 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.titanium, 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, Blocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.copper, 30), new ItemStack(Items.silicon, 30));
//removed for testing MOBA-style unit production
//new Recipe(units, UnitBlocks.commandCenter, new ItemStack(Items.lead, 100), new ItemStack(Items.densealloy, 100), new ItemStack(Items.silicon, 200));
//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));
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));
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));
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));
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));
}
}
@@ -3,11 +3,9 @@ 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;
import io.anuke.mindustry.type.ContentType;
import io.anuke.mindustry.type.StatusEffect;
public class StatusEffects implements ContentList{
@@ -27,7 +25,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 +37,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 +53,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 +78,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 +104,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 +117,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 +144,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);
}
}
};
@@ -169,9 +167,4 @@ public class StatusEffects implements ContentList{
freezing.setOpposites(burning, melting);
burning.setOpposites(wet, freezing);
}
@Override
public ContentType type(){
return ContentType.status;
}
}
@@ -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;
}
}
@@ -1,14 +1,11 @@
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;
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(){
@@ -17,24 +14,24 @@ public class Weapons implements ContentList{
length = 1.5f;
reload = 14f;
roundrobin = true;
ejectEffect = ShootFx.shellEjectSmall;
ammo = AmmoTypes.bulletMech;
ejectEffect = Fx.shellEjectSmall;
ammo = Bullets.standardMechSmall;
}};
blasterSmall = new Weapon("blaster"){{
length = 1.5f;
reload = 15f;
roundrobin = true;
ejectEffect = ShootFx.shellEjectSmall;
ammo = AmmoTypes.bulletCopper;
ejectEffect = Fx.shellEjectSmall;
ammo = Bullets.standardCopper;
}};
glaiveBlaster = new Weapon("bomber"){{
length = 1.5f;
reload = 10f;
roundrobin = true;
ejectEffect = ShootFx.shellEjectSmall;
ammo = AmmoTypes.bulletGlaive;
ejectEffect = Fx.shellEjectSmall;
ammo = Bullets.standardGlaive;
}};
droneBlaster = new Weapon("blaster"){{
@@ -42,8 +39,8 @@ public class Weapons implements ContentList{
reload = 25f;
width = 1f;
roundrobin = true;
ejectEffect = ShootFx.shellEjectSmall;
ammo = AmmoTypes.bulletCopper;
ejectEffect = Fx.shellEjectSmall;
ammo = Bullets.standardCopper;
}};
healBlaster = new Weapon("heal-blaster"){{
@@ -52,7 +49,7 @@ public class Weapons implements ContentList{
roundrobin = false;
ejectEffect = Fx.none;
recoil = 2f;
ammo = AmmoTypes.healBlaster;
ammo = Bullets.healBullet;
}};
missiles = new Weapon("missiles"){{
@@ -64,7 +61,7 @@ public class Weapons implements ContentList{
ejectEffect = Fx.none;
velocityRnd = 0.2f;
spacing = 1f;
ammo = AmmoTypes.weaponMissile;
ammo = Bullets.missileJavelin;
}};
swarmer = new Weapon("swarmer"){{
@@ -77,15 +74,15 @@ public class Weapons implements ContentList{
roundrobin = true;
ejectEffect = Fx.none;
shake = 3f;
ammo = AmmoTypes.weaponMissileSwarm;
ammo = Bullets.missileSwarm;
}};
chainBlaster = new Weapon("chain-blaster"){{
length = 1.5f;
reload = 28f;
roundrobin = true;
ejectEffect = ShootFx.shellEjectSmall;
ammo = AmmoTypes.bulletCopper;
ejectEffect = Fx.shellEjectSmall;
ammo = Bullets.standardCopper;
}};
shockgun = new Weapon("shockgun"){{
@@ -96,7 +93,7 @@ public class Weapons implements ContentList{
inaccuracy = 0f;
velocityRnd = 0.2f;
ejectEffect = Fx.none;
ammo = AmmoTypes.shock;
ammo = Bullets.lightning;
}};
flakgun = new Weapon("flakgun"){{
@@ -107,8 +104,8 @@ public class Weapons implements ContentList{
inaccuracy = 3f;
recoil = 3f;
velocityRnd = 0.1f;
ejectEffect = ShootFx.shellEjectMedium;
ammo = AmmoTypes.shellCarbide;
ejectEffect = Fx.shellEjectMedium;
ammo = Bullets.artilleryDense;
}};
flamethrower = new Weapon("flamethrower"){{
@@ -117,7 +114,7 @@ public class Weapons implements ContentList{
roundrobin = true;
recoil = 1f;
ejectEffect = Fx.none;
ammo = AmmoTypes.flamerThermite;
ammo = Bullets.basicFlame;
}};
artillery = new Weapon("artillery"){{
@@ -126,16 +123,8 @@ public class Weapons implements ContentList{
roundrobin = true;
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;
ejectEffect = Fx.shellEjectMedium;
ammo = Bullets.artilleryUnit;
}};
bomber = new Weapon("bomber"){{
@@ -146,7 +135,7 @@ public class Weapons implements ContentList{
ejectEffect = Fx.none;
velocityRnd = 1f;
inaccuracy = 40f;
ammo = AmmoTypes.bombExplosive;
ammo = Bullets.bombExplosive;
}};
bomberTrident = new Weapon("bomber"){{
@@ -158,7 +147,7 @@ public class Weapons implements ContentList{
ejectEffect = Fx.none;
velocityRnd = 1f;
inaccuracy = 40f;
ammo = AmmoTypes.bombExplosive;
ammo = Bullets.bombExplosive;
}};
laserBurster = new Weapon("bomber"){{
@@ -167,7 +156,7 @@ public class Weapons implements ContentList{
width = 0f;
roundrobin = true;
ejectEffect = Fx.none;
ammo = AmmoTypes.lancerLaser;
ammo = Bullets.lancerLaser;
}};
healBlasterDrone = new Weapon("heal-blaster"){{
@@ -177,7 +166,7 @@ public class Weapons implements ContentList{
roundrobin = true;
ejectEffect = Fx.none;
recoil = 2f;
ammo = AmmoTypes.healBlaster;
ammo = Bullets.healBullet;
}};
healBlasterDrone2 = new Weapon("heal-blaster"){{
@@ -187,12 +176,7 @@ public class Weapons implements ContentList{
roundrobin = true;
ejectEffect = Fx.none;
recoil = 2f;
ammo = AmmoTypes.healBlaster;
ammo = Bullets.healBullet;
}};
}
@Override
public ContentType type(){
return ContentType.weapon;
}
}
@@ -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;
}
}
@@ -1,161 +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");
}};
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;
blends = block -> block != this && !(block instanceof OreBlock);
minimapColor = Color.valueOf("323232");
playerUnmineable = true;
}};
blackstone = new Floor("blackstone"){{
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;
}};
}
}
@@ -1,168 +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.BlockFx;
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 siliconSmelter, plastaniumCompressor, phaseWeaver, surgeSmelter,
pyratiteMixer, blastMixer,
cryofluidmixer, melter, separator, biomatterCompressor, pulverizer, incinerator;
@Override
public void load(){
siliconSmelter = new PowerSmelter("silicon-smelter"){{
health = 90;
craftEffect = BlockFx.smeltsmoke;
result = Items.silicon;
craftTime = 40f;
size = 2;
hasLiquids = false;
flameColor = Color.valueOf("ffef99");
consumes.items(new ItemStack(Items.sand, 2));
consumes.power(0.05f);
}};
plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{
hasItems = true;
liquidCapacity = 60f;
craftTime = 60f;
output = Items.plastanium;
size = 2;
health = 320;
hasPower = hasLiquids = true;
craftEffect = BlockFx.formsmoke;
updateEffect = BlockFx.plasticburn;
consumes.liquid(Liquids.oil, 0.25f);
consumes.power(0.3f);
consumes.item(Items.titanium, 2);
}};
phaseWeaver = new PhaseWeaver("phase-weaver"){{
craftEffect = BlockFx.smeltsmoke;
result = Items.phasefabric;
craftTime = 120f;
size = 2;
consumes.items(new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10));
consumes.power(0.5f);
}};
surgeSmelter = new PowerSmelter("surge-smelter"){{
craftEffect = BlockFx.smeltsmoke;
result = Items.surgealloy;
craftTime = 75f;
size = 3;
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;
size = 2;
hasPower = true;
consumes.power(0.1f);
consumes.item(Items.titanium);
consumes.liquid(Liquids.water, 0.3f);
}};
blastMixer = new GenericCrafter("blast-mixer"){{
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;
hasItems = true;
hasPower = true;
result = Items.pyratite;
size = 2;
consumes.power(0.02f);
consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 1), new ItemStack(Items.sand, 1));
}};
melter = new PowerCrafter("melter"){{
health = 200;
outputLiquid = Liquids.slag;
outputLiquidAmount = 1f;
craftTime = 10f;
size = 2;
hasLiquids = hasPower = true;
consumes.power(0.1f);
consumes.item(Items.scrap, 1);
}};
separator = new Separator("separator"){{
results = new ItemStack[]{
new ItemStack(Items.copper, 5),
new ItemStack(Items.lead, 3),
new ItemStack(Items.titanium, 2),
new ItemStack(Items.thorium, 1)
};
hasPower = true;
filterTime = 15f;
health = 50 * 4;
spinnerLength = 1.5f;
spinnerRadius = 3.5f;
spinnerThickness = 1.5f;
spinnerSpeed = 3f;
size = 2;
consumes.power(0.1f);
consumes.liquid(Liquids.slag, 0.2f);
}};
biomatterCompressor = new Compressor("biomattercompressor"){{
liquidCapacity = 60f;
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"){{
output = Items.sand;
craftEffect = BlockFx.pulverize;
craftTime = 40f;
updateEffect = BlockFx.pulverizeSmall;
hasItems = hasPower = true;
consumes.item(Items.scrap, 1);
consumes.power(0.05f);
}};
incinerator = new Incinerator("incinerator"){{
health = 90;
}};
}
}
@@ -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<Liquid> items = content.liquids();
ButtonGroup<ImageButton> 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());
}
}
}
@@ -1,98 +0,0 @@
package io.anuke.mindustry.content.blocks;
import io.anuke.mindustry.content.Items;
import io.anuke.mindustry.content.fx.BlockFx;
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 = BlockFx.dooropenlarge;
closefx = BlockFx.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;
}};
}
}
@@ -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;
}};
}
}
@@ -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);
}};
}
}
@@ -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<Item, ObjectMap<Block, Block>> 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<Block, Block> 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));
}
}
}
}
}
@@ -1,82 +0,0 @@
package io.anuke.mindustry.content.blocks;
import io.anuke.mindustry.content.Liquids;
import io.anuke.mindustry.content.fx.BlockFx;
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{
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 = BlockFx.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;
}};
}
}
@@ -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.BlockFx;
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 = BlockFx.pulverizeMedium;
drillEffect = BlockFx.mineBig;
consumes.power(0.11f);
}};
blastDrill = new Drill("blast-drill"){{
drillTime = 60;
size = 3;
drawRim = true;
hasPower = true;
tier = 5;
updateEffect = BlockFx.pulverizeRed;
updateEffectChance = 0.03f;
drillEffect = BlockFx.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 = BlockFx.pulverizeRedder;
updateEffectChance = 0.04f;
drillEffect = BlockFx.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 = BlockFx.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);
}};
}
}
@@ -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;
}};
}
}
@@ -1,262 +0,0 @@
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.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,*/
scorch, hail, wave, lancer, arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown;
@Override
public void load(){
duo = new DoubleTurret("duo"){{
ammoTypes = new AmmoType[]{AmmoTypes.bulletCopper, AmmoTypes.bulletDense, AmmoTypes.bulletPyratite, AmmoTypes.bulletSilicon};
reload = 25f;
restitution = 0.03f;
range = 90f;
shootCone = 15f;
ammoUseEffect = ShootFx.shellEjectSmall;
health = 80;
inaccuracy = 2f;
rotatespeed = 10f;
}};
hail = new ArtilleryTurret("hail"){{
ammoTypes = new AmmoType[]{AmmoTypes.artilleryDense, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary};
reload = 60f;
recoil = 2f;
range = 230f;
inaccuracy = 1f;
shootCone = 10f;
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);
}
};
wave = new LiquidTurret("wave"){{
ammoTypes = new AmmoType[]{AmmoTypes.water, AmmoTypes.lava, AmmoTypes.cryofluid, AmmoTypes.oil};
size = 2;
recoil = 0f;
reload = 4f;
inaccuracy = 5f;
shootCone = 50f;
shootEffect = ShootFx.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 = 170f;
chargeTime = 50f;
chargeMaxDelay = 30f;
chargeEffects = 7;
shootType = AmmoTypes.lancerLaser;
recoil = 2f;
reload = 120f;
cooldown = 0.03f;
powerUsed = 1 / 3f;
consumes.powerBuffered(60f);
shootShake = 2f;
shootEffect = ShootFx.lancerLaserShoot;
smokeEffect = ShootFx.lancerLaserShootSmoke;
chargeEffect = ShootFx.lancerLaserCharge;
chargeBeginEffect = ShootFx.lancerLaserChargeBegin;
heatColor = Color.RED;
size = 2;
health = 320;
targetAir = false;
}};
arc = new PowerTurret("arc"){{
shootType = AmmoTypes.arc;
reload = 20f;
shootShake = 0f;
shootCone = 40f;
rotatespeed = 8f;
powerUsed = 1f / 3f;
consumes.powerBuffered(30f);
range = 50f;
shootEffect = ShootFx.lightningShoot;
heatColor = Color.RED;
recoil = 1f;
size = 1;
}};
swarmer = new BurstTurret("swarmer"){{
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge};
reload = 50f;
shots = 4;
burstSpacing = 5;
inaccuracy = 10f;
range = 140f;
xRand = 6f;
size = 2;
health = 380;
}};
salvo = new BurstTurret("salvo"){
TextureRegion[] panels = new TextureRegion[2];
@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;
}
};
ripple = new ArtilleryTurret("ripple"){{
ammoTypes = new AmmoType[]{AmmoTypes.artilleryDense, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary, AmmoTypes.artilleryExplosive, AmmoTypes.artilleryPlastic};
size = 3;
shots = 4;
inaccuracy = 12f;
reload = 60f;
ammoEjectBack = 5f;
ammoUseEffect = ShootFx.shellEjectBig;
cooldown = 0.03f;
velocityInaccuracy = 0.2f;
restitution = 0.02f;
recoil = 6f;
shootShake = 2f;
range = 320f;
health = 550;
}};
cyclone = new ItemTurret("cyclone"){{
ammoTypes = new AmmoType[]{AmmoTypes.flakExplosive, AmmoTypes.flakPlastic, AmmoTypes.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"){{
ammoTypes = new AmmoType[]{AmmoTypes.fuseShotgun};
reload = 50f;
shootShake = 4f;
range = 80f;
recoil = 5f;
restitution = 0.1f;
size = 3;
health = 155 * size * size;
}};
spectre = new DoubleTurret("spectre"){{
ammoTypes = new AmmoType[]{AmmoTypes.bulletDenseBig, AmmoTypes.bulletPyratiteBig, AmmoTypes.bulletThoriumBig};
reload = 6f;
coolantMultiplier = 0.5f;
maxCoolantUsed = 1.5f;
restitution = 0.1f;
ammoUseEffect = ShootFx.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 = AmmoTypes.meltdownLaser;
shootEffect = ShootFx.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;
}};
}
}
@@ -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;
}};
}
}
@@ -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);
}};
}
}
@@ -1,123 +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, incindiary, 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;
}
};
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;
}
};
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
}
};
}
}
@@ -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;
}
}
@@ -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);
}
}
};
}
}
@@ -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.getVelocity().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.getVelocity().rotate(Mathf.sin(Time.time() + b.id * 4422, 8f, 2f));
}
};
}
}
@@ -1,108 +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.BasicBulletType;
import io.anuke.mindustry.entities.bullet.BulletType;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.game.ContentList;
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;
}
};
dense = new BasicBulletType(3.5f, 18, "bullet"){
{
bulletWidth = 9f;
bulletHeight = 12f;
armorPierce = 0.2f;
}
};
thorium = new BasicBulletType(4f, 29, "bullet"){
{
bulletWidth = 10f;
bulletHeight = 13f;
armorPierce = 0.5f;
}
};
homing = new BasicBulletType(3f, 9, "bullet"){
{
bulletWidth = 7f;
bulletHeight = 9f;
homingPower = 5f;
}
};
tracer = new BasicBulletType(3.2f, 11, "bullet"){
{
bulletWidth = 10f;
bulletHeight = 12f;
frontColor = Palette.lightishOrange;
backColor = Palette.lightOrange;
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;
}
};
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;
}
};
}
}
@@ -1,428 +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.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.angle(), 7f);
Draw.color(Color.WHITE);
Lines.lineAngleCenter(b.x, b.y, b.angle(), 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.getVelocity().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, 60){
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 = 170f;
{
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);
}
@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.angle(), 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]);
}
}
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.angle(), 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.angle(), 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);
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);
}
}
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++) {
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);
}
}
@Override
public void draw(Bullet b) {
super.draw(b);
Draw.color(Color.WHITE, Palette.surge, b.fin());
for(int i = 0; i < 7; i++){
vector.trns(b.angle(), 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, b.y, 13f, (rayLength+50) * b.fout(), b.angle());
Shapes.tri(b.x, b.y, 13f, 10f * b.fout(), b.angle() + 180f);
Draw.reset();
}
//TODO
};
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.angle(), 30);
}
};
arc = new BulletType(0.001f, 8){
{
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.angle(), 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.angle() + 90);
Draw.color(Palette.bulletYellow);
Draw.rect("shell", b.x, b.y, w, h, b.angle() + 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.angle() + 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);
}
};
}
}
@@ -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;
}
};
}
}
@@ -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();
});
}
}
@@ -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();
});
}
}
@@ -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);
});
}
}
@@ -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();
});
}
}
@@ -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();
});
}
}
@@ -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;
}
}
@@ -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();
});
}
}
@@ -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();
});
}
}