Turret balance / Bugfixes
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 704 B |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 248 KiB After Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB |
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 210 KiB |
Before Width: | Height: | Size: 399 KiB After Width: | Height: | Size: 399 KiB |
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
@ -5,7 +5,11 @@ import io.anuke.arc.function.BooleanProvider;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.graphics.g2d.*;
|
||||
import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.util.Tmp;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.Damage;
|
||||
import io.anuke.mindustry.entities.bullet.Bullet;
|
||||
import io.anuke.mindustry.entities.bullet.BulletType;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
@ -1292,7 +1296,7 @@ public class Blocks implements ContentList{
|
||||
Items.lead, Bullets.flakLead
|
||||
);
|
||||
reload = 18f;
|
||||
range = 175f;
|
||||
range = 170f;
|
||||
size = 2;
|
||||
burstSpacing = 5f;
|
||||
shots = 2;
|
||||
@ -1408,11 +1412,11 @@ public class Blocks implements ContentList{
|
||||
Items.pyratite, Bullets.missileIncendiary,
|
||||
Items.surgealloy, Bullets.missileSurge
|
||||
);
|
||||
reload = 50f;
|
||||
reload = 40f;
|
||||
shots = 4;
|
||||
burstSpacing = 5;
|
||||
inaccuracy = 10f;
|
||||
range = 140f;
|
||||
range = 185f;
|
||||
xRand = 6f;
|
||||
size = 2;
|
||||
health = 300 * size * size;
|
||||
@ -1442,6 +1446,58 @@ public class Blocks implements ContentList{
|
||||
health = 360;
|
||||
}};
|
||||
|
||||
fuse = new ItemTurret("fuse"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 450, Items.graphite, 450, Items.thorium, 200));
|
||||
|
||||
reload = 35f;
|
||||
shootShake = 4f;
|
||||
range = 95f;
|
||||
recoil = 5f;
|
||||
shots = 3;
|
||||
spread = 20f;
|
||||
restitution = 0.1f;
|
||||
shootCone = 30;
|
||||
size = 3;
|
||||
|
||||
health = 220 * size * size;
|
||||
|
||||
ammo(Items.graphite, new BulletType(0.01f, 105){
|
||||
int rays = 1;
|
||||
float rayLength = range + 10f;
|
||||
|
||||
{
|
||||
hitEffect = Fx.hitLancer;
|
||||
shootEffect = smokeEffect = Fx.lightningShoot;
|
||||
lifetime = 10f;
|
||||
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, Pal.lancerLaser, b.fin());
|
||||
//Draw.alpha(b.fout());
|
||||
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, 20f * b.fout(), (rayLength + 50), b.rot());
|
||||
Shapes.tri(b.x, b.y, 20f * b.fout(), 10f, b.rot() + 180f);
|
||||
Draw.reset();
|
||||
}
|
||||
});
|
||||
}};
|
||||
|
||||
ripple = new ArtilleryTurret("ripple"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 300, Items.graphite, 270, Items.titanium, 120));
|
||||
ammo(
|
||||
@ -1486,19 +1542,6 @@ public class Blocks implements ContentList{
|
||||
health = 145 * size * size;
|
||||
}};
|
||||
|
||||
fuse = new ItemTurret("fuse"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 450, Items.graphite, 450, Items.surgealloy, 250));
|
||||
ammo(Items.graphite, Bullets.fuseShot);
|
||||
reload = 40f;
|
||||
shootShake = 4f;
|
||||
range = 110f;
|
||||
recoil = 5f;
|
||||
restitution = 0.1f;
|
||||
size = 3;
|
||||
|
||||
health = 165 * size * size;
|
||||
}};
|
||||
|
||||
spectre = new DoubleTurret("spectre"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 700, Items.graphite, 600, Items.surgealloy, 500, Items.plastanium, 350, Items.thorium, 500));
|
||||
ammo(
|
||||
|
@ -12,7 +12,6 @@ import io.anuke.mindustry.entities.effect.*;
|
||||
import io.anuke.mindustry.entities.type.Unit;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.graphics.Pal;
|
||||
import io.anuke.mindustry.graphics.Shapes;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.BuildBlock;
|
||||
|
||||
@ -41,7 +40,7 @@ public class Bullets implements ContentList{
|
||||
waterShot, cryoShot, slagShot, oilShot,
|
||||
|
||||
//environment, misc.
|
||||
fireball, basicFlame, pyraFlame, fuseShot, driverBolt, healBullet, frag, eruptorShot,
|
||||
fireball, basicFlame, pyraFlame, driverBolt, healBullet, frag, eruptorShot,
|
||||
|
||||
//bombs
|
||||
bombExplosive, bombIncendiary, bombOil, explode;
|
||||
@ -142,7 +141,7 @@ public class Bullets implements ContentList{
|
||||
bulletWidth = 6f;
|
||||
bulletHeight = 8f;
|
||||
hitEffect = Fx.flakExplosion;
|
||||
splashDamage = 30f;
|
||||
splashDamage = 27f;
|
||||
splashDamageRadius = 15f;
|
||||
}};
|
||||
|
||||
@ -154,7 +153,7 @@ public class Bullets implements ContentList{
|
||||
bulletWidth = 6f;
|
||||
bulletHeight = 8f;
|
||||
hitEffect = Fx.flakExplosion;
|
||||
splashDamage = 24f;
|
||||
splashDamage = 22f;
|
||||
splashDamageRadius = 24f;
|
||||
}};
|
||||
|
||||
@ -180,7 +179,7 @@ public class Bullets implements ContentList{
|
||||
shootEffect = Fx.shootBig;
|
||||
}};
|
||||
|
||||
missileExplosive = new MissileBulletType(1.8f, 10, "missile"){{
|
||||
missileExplosive = new MissileBulletType(2.7f, 10, "missile"){{
|
||||
bulletWidth = 8f;
|
||||
bulletHeight = 8f;
|
||||
bulletShrink = 0f;
|
||||
@ -192,7 +191,7 @@ public class Bullets implements ContentList{
|
||||
despawnEffect = Fx.blastExplosion;
|
||||
}};
|
||||
|
||||
missileIncendiary = new MissileBulletType(2f, 12, "missile"){{
|
||||
missileIncendiary = new MissileBulletType(2.9f, 12, "missile"){{
|
||||
frontColor = Pal.lightishOrange;
|
||||
backColor = Pal.lightOrange;
|
||||
bulletWidth = 7f;
|
||||
@ -208,7 +207,7 @@ public class Bullets implements ContentList{
|
||||
incendAmount = 3;
|
||||
}};
|
||||
|
||||
missileSurge = new MissileBulletType(3.5f, 15, "bullet"){{
|
||||
missileSurge = new MissileBulletType(4.4f, 15, "bullet"){{
|
||||
bulletWidth = 8f;
|
||||
bulletHeight = 8f;
|
||||
bulletShrink = 0f;
|
||||
@ -577,42 +576,6 @@ public class Bullets implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
fuseShot = new BulletType(0.01f, 70){
|
||||
int rays = 3;
|
||||
float rayLength = 120f;
|
||||
|
||||
{
|
||||
hitEffect = Fx.hitFuse;
|
||||
shootEffect = smokeEffect = Fx.none;
|
||||
lifetime = 10f;
|
||||
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, Pal.surge, b.fin());
|
||||
//Draw.alpha(b.fout());
|
||||
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, 20f * b.fout(), (rayLength + 50), b.rot());
|
||||
Shapes.tri(b.x, b.y, 20f * b.fout(), 10f, b.rot() + 180f);
|
||||
Draw.reset();
|
||||
}
|
||||
};
|
||||
|
||||
waterShot = new LiquidBulletType(Liquids.water){{
|
||||
knockback = 0.7f;
|
||||
}};
|
||||
|
@ -111,6 +111,7 @@ public class HudFragment extends Fragment{
|
||||
float size = Unit.dp.scl(dsize);
|
||||
Array<Element> children = new Array<>(select.getChildren());
|
||||
|
||||
//now, you may be wondering, why is this necessary? the answer is, I don't know, but it fixes layout issues somehow
|
||||
int index = 0;
|
||||
for(Element elem : children){
|
||||
int fi = index++;
|
||||
@ -119,7 +120,7 @@ public class HudFragment extends Fragment{
|
||||
if(fi < 4){
|
||||
elem.setSize(size);
|
||||
}else{
|
||||
elem.setSize(3f, size);
|
||||
elem.setSize(Unit.dp.scl(3f), size);
|
||||
}
|
||||
elem.setPosition(fi * size, Core.graphics.getHeight(), Align.topLeft);
|
||||
return !state.is(State.menu);
|
||||
@ -135,7 +136,7 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
|
||||
cont.update(() -> {
|
||||
if(!Core.input.keyDown(Binding.gridMode) && Core.input.keyTap(Binding.toggle_menus) && !ui.chatfrag.chatOpen()){
|
||||
if(!Core.input.keyDown(Binding.gridMode) && Core.input.keyTap(Binding.toggle_menus) && !ui.chatfrag.chatOpen() && !Core.scene.hasDialog() && !(Core.scene.getKeyboardFocus() instanceof TextField)){
|
||||
toggleMenus();
|
||||
}
|
||||
});
|
||||
|
@ -345,7 +345,7 @@ public class Block extends BlockStorage{
|
||||
cacheRegions[i] = Core.atlas.find(cacheRegionStrings.get(i));
|
||||
}
|
||||
|
||||
if(cracks == null || cracks[0][0].getTexture().isDisposed()){
|
||||
if(cracks == null || (cracks[0][0].getTexture() != null && cracks[0][0].getTexture().isDisposed())){
|
||||
cracks = new TextureRegion[maxCrackSize][crackRegions];
|
||||
for(int size = 1; size <= maxCrackSize; size++){
|
||||
for(int i = 0; i < crackRegions; i++){
|
||||
|
@ -39,6 +39,11 @@ public class Fracker extends SolidPump{
|
||||
@Override
|
||||
public void drawCracks(Tile tile){}
|
||||
|
||||
@Override
|
||||
public boolean canProduce(Tile tile){
|
||||
return tile.entity.liquids.get(result) < liquidCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Tile tile){
|
||||
FrackerEntity entity = tile.entity();
|
||||
|
@ -57,7 +57,11 @@ public class Separator extends Block{
|
||||
}));
|
||||
|
||||
stats.add(BlockStat.productionTime, craftTime / 60f, StatUnit.seconds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProduce(Tile tile){
|
||||
return tile.entity.items.total() < itemCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
|