diff --git a/core/assets-raw/sprites/blocks/units/repairpoint-turret.png b/core/assets-raw/sprites/blocks/units/repairpoint-turret.png index 7257f1caca..f574433e19 100644 Binary files a/core/assets-raw/sprites/blocks/units/repairpoint-turret.png and b/core/assets-raw/sprites/blocks/units/repairpoint-turret.png differ diff --git a/core/assets-raw/sprites/blocks/units/repairpoint.png b/core/assets-raw/sprites/blocks/units/repairpoint.png index 46d6d529f2..5a50dd76f3 100644 Binary files a/core/assets-raw/sprites/blocks/units/repairpoint.png and b/core/assets-raw/sprites/blocks/units/repairpoint.png differ diff --git a/core/assets-raw/sprites/blocks/units/resupplypoint.png b/core/assets-raw/sprites/blocks/units/resupplypoint.png index 6a1e50a692..a69238a59e 100644 Binary files a/core/assets-raw/sprites/blocks/units/resupplypoint.png and b/core/assets-raw/sprites/blocks/units/resupplypoint.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index bf661feb79..e52f01a622 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -188,21 +188,21 @@ plasma-drill-top index: -1 tungsten-drill rotate: false - xy: 877, 347 + xy: 385, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-rotator rotate: false - xy: 385, 5 + xy: 395, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-top rotate: false - xy: 395, 5 + xy: 405, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -545,49 +545,49 @@ oiledge index: -1 rock2 rotate: false - xy: 859, 417 + xy: 869, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge rotate: false - xy: 899, 421 + xy: 909, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-1 rotate: false - xy: 909, 421 + xy: 919, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-2 rotate: false - xy: 919, 421 + xy: 929, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-side rotate: false - xy: 929, 421 + xy: 939, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 879, 417 + xy: 889, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 889, 419 + xy: 899, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -601,49 +601,49 @@ sandedge index: -1 shrubshadow rotate: false - xy: 847, 387 + xy: 857, 397 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge rotate: false - xy: 847, 377 + xy: 857, 387 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-1 rotate: false - xy: 857, 387 + xy: 867, 397 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-2 rotate: false - xy: 867, 397 + xy: 877, 407 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-side rotate: false - xy: 877, 407 + xy: 847, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 857, 397 + xy: 867, 407 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 867, 407 + xy: 847, 377 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -664,42 +664,42 @@ spaceedge index: -1 stone-cliff-edge rotate: false - xy: 867, 387 + xy: 877, 397 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-1 rotate: false - xy: 877, 397 + xy: 847, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-2 rotate: false - xy: 847, 357 + xy: 857, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-side rotate: false - xy: 857, 367 + xy: 867, 377 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 847, 367 + xy: 857, 377 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 857, 377 + xy: 867, 387 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -713,91 +713,91 @@ stoneedge index: -1 thorium1 rotate: false - xy: 867, 377 + xy: 877, 387 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium2 rotate: false - xy: 877, 387 + xy: 857, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 857, 357 + xy: 867, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium1 rotate: false - xy: 867, 367 + xy: 877, 377 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 877, 377 + xy: 867, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 867, 357 + xy: 877, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten1 rotate: false - xy: 847, 347 + xy: 857, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten2 rotate: false - xy: 857, 347 + xy: 867, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten3 rotate: false - xy: 867, 347 + xy: 877, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge rotate: false - xy: 425, 5 + xy: 435, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-1 rotate: false - xy: 435, 5 + xy: 445, 17 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-2 rotate: false - xy: 445, 17 + xy: 445, 7 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-side rotate: false - xy: 445, 7 + xy: 769, 350 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1266,7 +1266,7 @@ nuclear-reactor-lights index: -1 rtg-generator-top rotate: false - xy: 869, 417 + xy: 879, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1490,7 +1490,7 @@ pulverizer-rotator index: -1 separator-liquid rotate: false - xy: 939, 421 + xy: 847, 407 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1726,13 +1726,20 @@ reconstructor-open orig: 16, 16 offset: 0, 0 index: -1 -repairpoint-turret +repairpoint rotate: false xy: 849, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 +repairpoint-turret + rotate: false + xy: 859, 417 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 ship-factory rotate: false xy: 679, 357 @@ -1903,7 +1910,7 @@ shell-back index: -1 shot rotate: false - xy: 857, 407 + xy: 847, 387 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1917,7 +1924,7 @@ transfer index: -1 transfer-arrow rotate: false - xy: 877, 367 + xy: 877, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2741,13 +2748,6 @@ block-icon-repairpoint orig: 8, 8 offset: 0, 0 index: -1 -repairpoint - rotate: false - xy: 777, 401 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 block-icon-resupplypoint rotate: false xy: 807, 421 @@ -5130,42 +5130,42 @@ generic-weapon index: -1 shockgun rotate: false - xy: 847, 407 + xy: 847, 397 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shockgun-equip rotate: false - xy: 847, 397 + xy: 857, 407 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster rotate: false - xy: 877, 357 + xy: 949, 423 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster-equip rotate: false - xy: 949, 423 + xy: 847, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan rotate: false - xy: 405, 5 + xy: 415, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan-equip rotate: false - xy: 415, 5 + xy: 425, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 63c1ea0610..432a321560 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/src/io/anuke/mindustry/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index aff077cfd8..196037c0ec 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -20,6 +20,12 @@ public class Recipes implements ContentList{ new Recipe(defense, DefenseBlocks.carbideWall, new ItemStack(Items.carbide, 12)); new Recipe(defense, DefenseBlocks.carbideWallLarge, new ItemStack(Items.carbide, 12*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, DefenseBlocks.door, new ItemStack(Items.carbide, 12), new ItemStack(Items.silicon, 8)); + new Recipe(defense, DefenseBlocks.doorLarge, new ItemStack(Items.carbide, 12*4), new ItemStack(Items.silicon, 8*4)); + //TURRETS new Recipe(weapon, TurretBlocks.duo, new ItemStack(Items.tungsten, 20)); new Recipe(weapon, TurretBlocks.scorch, new ItemStack(Items.tungsten, 25), new ItemStack(Items.carbide, 20)); @@ -52,6 +58,14 @@ public class Recipes implements ContentList{ new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 60), new ItemStack(Items.lead, 50)); new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50)); + //other crafting + //TODO phaseweaver sprites + new Recipe(crafting, CraftingBlocks.phaseweaver, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 150)); + //TODO implement alloy smelter + // new Recipe(crafting, CraftingBlocks.alloySmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140)); + + new Recipe(crafting, CraftingBlocks.plasteelcompressor, new ItemStack(Items.silicon, 60), new ItemStack(Items.lead, 170), new ItemStack(Items.titanium, 170)); + //misc new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50)); new Recipe(crafting, CraftingBlocks.thermiteMixer, new ItemStack(Items.tungsten, 100), new ItemStack(Items.lead, 50)); @@ -81,7 +95,7 @@ public class Recipes implements ContentList{ //DRILLS, PRODUCERS new Recipe(production, ProductionBlocks.tungstenDrill, new ItemStack(Items.tungsten, 30)); new Recipe(production, ProductionBlocks.carbideDrill, new ItemStack(Items.tungsten, 60), new ItemStack(Items.carbide, 60)); - new Recipe(production, ProductionBlocks.laserdrill, new ItemStack(Items.tungsten, 80), new ItemStack(Items.carbide, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 80)); + new Recipe(production, ProductionBlocks.laserdrill, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 110), new ItemStack(Items.silicon, 70), new ItemStack(Items.titanium, 80)); new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 40)); new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.tungsten, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20)); @@ -99,6 +113,7 @@ public class Recipes implements ContentList{ //actual unit related stuff new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 80)); new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30)); + new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30)); //LIQUIDS new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1)); diff --git a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java index ae72015fc2..709e27ffd4 100644 --- a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java @@ -9,7 +9,7 @@ import io.anuke.mindustry.world.blocks.defense.Door; import io.anuke.mindustry.world.blocks.defense.PhaseWall; public class DefenseBlocks extends BlockList implements ContentList { - public static Block tungstenWall, tungstenWallLarge, carbideWall, carbideWallLarge, thoriumWall, thoriumWallLarge, door, largedoor, deflectorwall, deflectorwalllarge, + public static Block tungstenWall, tungstenWallLarge, carbideWall, carbideWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, deflectorwall, deflectorwalllarge, phasewall, phasewalllarge; @Override @@ -63,13 +63,13 @@ public class DefenseBlocks extends BlockList implements ContentList { }}; door = new Door("door") {{ - health = 90 * wallHealthMultiplier; + health = 100 * wallHealthMultiplier; }}; - largedoor = new Door("door-large") {{ + doorLarge = new Door("door-large") {{ openfx = BlockFx.dooropenlarge; closefx = BlockFx.doorcloselarge; - health = 90 * 4 * wallHealthMultiplier; + health = 100 * 4 * wallHealthMultiplier; size = 2; }}; } diff --git a/core/src/io/anuke/mindustry/entities/TileEntity.java b/core/src/io/anuke/mindustry/entities/TileEntity.java index 1a980c08df..e4b0721f45 100644 --- a/core/src/io/anuke/mindustry/entities/TileEntity.java +++ b/core/src/io/anuke/mindustry/entities/TileEntity.java @@ -90,6 +90,10 @@ public class TileEntity extends BaseEntity implements TargetTrait { } } + public boolean isSleeping(){ + return sleeping; + } + public boolean isDead() { return dead; } diff --git a/core/src/io/anuke/mindustry/type/Recipe.java b/core/src/io/anuke/mindustry/type/Recipe.java index 24807a0526..5077b61699 100644 --- a/core/src/io/anuke/mindustry/type/Recipe.java +++ b/core/src/io/anuke/mindustry/type/Recipe.java @@ -7,6 +7,7 @@ import io.anuke.mindustry.game.Content; import io.anuke.mindustry.game.UnlockableContent; import io.anuke.mindustry.world.Block; +import static io.anuke.mindustry.Vars.debug; import static io.anuke.mindustry.Vars.headless; public class Recipe implements UnlockableContent{ @@ -73,7 +74,7 @@ public class Recipe implements UnlockableContent{ r.clear(); for(Recipe recipe : allRecipes){ - if(recipe.category == category && Vars.control.database().isUnlocked(recipe)) { + if(recipe.category == category && (Vars.control.database().isUnlocked(recipe) || (debug && recipe.debugOnly))) { r.add(recipe); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/Floor.java b/core/src/io/anuke/mindustry/world/blocks/Floor.java index d36356da03..baa1f4746b 100644 --- a/core/src/io/anuke/mindustry/world/blocks/Floor.java +++ b/core/src/io/anuke/mindustry/world/blocks/Floor.java @@ -17,6 +17,7 @@ import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.util.Geometry; import io.anuke.ucore.util.Mathf; +import static io.anuke.mindustry.Vars.headless; import static io.anuke.mindustry.Vars.world; public class Floor extends Block{ diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index 522a327f04..d5d3c099ad 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -2,6 +2,7 @@ package io.anuke.mindustry.world.blocks.distribution; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.GridPoint2; +import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.LongArray; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -122,6 +123,8 @@ public class Conveyor extends Block{ public void unitOn(Tile tile, Unit unit) { ConveyorEntity entity = tile.entity(); + entity.wakeUp(); + float speed = this.speed * tilesize / 2.3f; float tx = Geometry.d4[tile.getRotation()].x, ty = Geometry.d4[tile.getRotation()].y; @@ -206,7 +209,6 @@ public class Conveyor extends Block{ } if (minremove != Integer.MAX_VALUE) entity.convey.truncate(minremove); - } @Override @@ -295,6 +297,20 @@ public class Conveyor extends Block{ } } + @Override + public Array getDebugInfo(Tile tile) { + ConveyorEntity entity = tile.entity(); + Array arr = super.getDebugInfo(tile); + arr.addAll(Array.with( + "mincarry", entity.minCarry, + "minitem", entity.minCarry, + "carrying", entity.carrying, + "clogHeat", entity.clogHeat, + "sleeping", entity.isSleeping() + )); + return arr; + } + @Override public TileEntity getEntity(){ return new ConveyorEntity(); diff --git a/core/src/io/anuke/mindustry/world/blocks/units/RepairPoint.java b/core/src/io/anuke/mindustry/world/blocks/units/RepairPoint.java index c7f321d2e0..2d314ddd0a 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/RepairPoint.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/RepairPoint.java @@ -1,6 +1,7 @@ package io.anuke.mindustry.world.blocks.units; import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.Rectangle; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -27,6 +28,8 @@ public class RepairPoint extends Block{ protected float repairSpeed = 0.3f; protected float powerUsage = 0.2f; + protected TextureRegion topRegion; + public RepairPoint(String name) { super(name); update = true; @@ -38,6 +41,13 @@ public class RepairPoint extends Block{ powerCapacity = 20f; } + @Override + public void load() { + super.load(); + + topRegion = Draw.region(name + "-turret"); + } + @Override public void drawSelect(Tile tile){ Draw.color(Palette.accent); @@ -49,7 +59,7 @@ public class RepairPoint extends Block{ public void drawLayer(Tile tile) { RepairPointEntity entity = tile.entity(); - Draw.rect(name + "-turret", tile.drawx(), tile.drawy(), entity.rotation - 90); + Draw.rect(topRegion, tile.drawx(), tile.drawy(), entity.rotation - 90); } @Override diff --git a/packer/src/io/anuke/mindustry/Generators.java b/packer/src/io/anuke/mindustry/Generators.java index 8890b4534a..a00391399d 100644 --- a/packer/src/io/anuke/mindustry/Generators.java +++ b/packer/src/io/anuke/mindustry/Generators.java @@ -27,6 +27,9 @@ public class Generators { Image image = context.get(regions[0]); for(TextureRegion region : regions){ + if(region == null){ + context.err("Error in block \"{0}\": null region!", block.name); + } image.draw(region); } diff --git a/packer/src/io/anuke/mindustry/PackerLauncher.java b/packer/src/io/anuke/mindustry/PackerLauncher.java index 6e8205ab93..7aaf89ddf6 100644 --- a/packer/src/io/anuke/mindustry/PackerLauncher.java +++ b/packer/src/io/anuke/mindustry/PackerLauncher.java @@ -8,6 +8,7 @@ import java.io.IOException; public class PackerLauncher { public static void main(String[] args) throws IOException { + Vars.headless = true; ImageContext context = new ImageContext(); context.load(); Timers.mark();