From d8e8765cec04ee749a4fc70c2e0b9a36af831fad Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 24 Jun 2018 21:26:22 -0400 Subject: [PATCH] Balanced a few electric turrets, fixed crash --- core/src/io/anuke/mindustry/content/Recipes.java | 3 ++- .../io/anuke/mindustry/content/bullets/TurretBullets.java | 6 +++--- core/src/io/anuke/mindustry/core/Control.java | 8 +++----- .../src/io/anuke/mindustry/entities/effect/Lightning.java | 1 + core/src/io/anuke/mindustry/world/blocks/BreakBlock.java | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index 2578b4b04e..ea28c45aa4 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -26,7 +26,8 @@ public class Recipes implements ContentList{ new Recipe(weapon, TurretBlocks.hail, new ItemStack(Items.tungsten, 25), new ItemStack(Items.carbide, 25)); new Recipe(weapon, TurretBlocks.lancer, new ItemStack(Items.tungsten, 25), new ItemStack(Items.lead, 25), new ItemStack(Items.silicon, 25)); - new Recipe(weapon, TurretBlocks.arc, new ItemStack(Items.tungsten, 25), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 30)); + //TODO arc turret broken + //new Recipe(weapon, TurretBlocks.arc, new ItemStack(Items.tungsten, 25), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 30)); //DISTRIBUTION new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.lead, 1)); diff --git a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java index 5e6ba2fbb7..76c93298e8 100644 --- a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java @@ -35,7 +35,7 @@ public class TurretBullets extends BulletList implements ContentList { @Override public void load() { - fireball = new BulletType(1f, 1) { + fireball = new BulletType(1f, 4) { { pierce = true; hitTiles = false; @@ -90,7 +90,7 @@ public class TurretBullets extends BulletList implements ContentList { } }; - lancerLaser = new BulletType(0.001f, 1) { + lancerLaser = new BulletType(0.001f, 110) { 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}; @@ -160,7 +160,7 @@ public class TurretBullets extends BulletList implements ContentList { statusIntensity = 0.5f; } }; - lightning = new BulletType(0.001f, 5) { + lightning = new BulletType(0.001f, 10) { { lifetime = 1; despawneffect = Fx.none; diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 3977b3d1bb..632c991a7f 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -65,9 +65,7 @@ public class Control extends Module{ Core.atlas.setErrorRegion("error"); ContentLoader.initialize(Content::load); - //TODO load database - //not loaded currently for testing - //db.load(); + db.load(); gdxInput = Gdx.input; @@ -356,8 +354,8 @@ public class Control extends Module{ if(!state.mode.infiniteResources && !state.mode.disableWaveTimer && Timers.get("timerCheckUnlock", 120)){ checkUnlockableBlocks(); - //save if the db changed - if(db.isDirty()){ + //save if the db changed, but don't save unlocks + if(db.isDirty() && !debug){ db.save(); } } diff --git a/core/src/io/anuke/mindustry/entities/effect/Lightning.java b/core/src/io/anuke/mindustry/entities/effect/Lightning.java index de8d3d8916..e573d4fe5d 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Lightning.java +++ b/core/src/io/anuke/mindustry/entities/effect/Lightning.java @@ -28,6 +28,7 @@ import io.anuke.ucore.util.SeedRandom; import static io.anuke.mindustry.Vars.bulletGroup; +//TODO utterly broken public class Lightning extends TimedEntity implements Poolable, DrawTrait{ private static Array entities = new Array<>(); private static Rectangle rect = new Rectangle(); diff --git a/core/src/io/anuke/mindustry/world/blocks/BreakBlock.java b/core/src/io/anuke/mindustry/world/blocks/BreakBlock.java index beb3fd0aca..7cce28170e 100644 --- a/core/src/io/anuke/mindustry/world/blocks/BreakBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/BreakBlock.java @@ -45,7 +45,7 @@ public class BreakBlock extends Block { @Override public boolean isSolidFor(Tile tile) { BreakEntity entity = tile.entity(); - return entity.previous.solid; + return entity.previous == null || entity.previous.solid; } @Override