diff --git a/core/assets/maps/tarFields.mmap b/core/assets/maps/tarFields.mmap new file mode 100644 index 0000000000..5bb40509cb Binary files /dev/null and b/core/assets/maps/tarFields.mmap differ diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index 2033f26a11..bad13ea0ff 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -897,8 +897,8 @@ public class Blocks implements ContentList{ junction = new Junction("junction"){{ requirements(Category.distribution, ItemStack.with(Items.copper, 3), true); speed = 26; - capacity = 32; - health = 25; + capacity = 15; + health = 30; }}; itemBridge = new BufferedItemBridge("bridge-conveyor"){{ diff --git a/core/src/io/anuke/mindustry/content/Zones.java b/core/src/io/anuke/mindustry/content/Zones.java index 5b9299d385..88bfb5541c 100644 --- a/core/src/io/anuke/mindustry/content/Zones.java +++ b/core/src/io/anuke/mindustry/content/Zones.java @@ -12,7 +12,7 @@ import io.anuke.mindustry.world.Block; public class Zones implements ContentList{ public static Zone groundZero, desertWastes, - craters, frozenForest, ruinousShores, stainedMountains, + craters, frozenForest, ruinousShores, stainedMountains, tarFields, saltFlats, overgrowth, infestedIslands, desolateRift, nuclearComplex; @@ -132,9 +132,8 @@ public class Zones implements ContentList{ stainedMountains = new Zone("stainedMountains", new MapGenerator("stainedMountains", 2) .dist(0f, false) - .decor(new Decoration(Blocks.moss, Blocks.shaleBoulder, 0.02))){{ + .decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{ loadout = Loadouts.basicFoundation; - baseLaunchCost = ItemStack.with(); startingItems = ItemStack.list(Items.copper, 400, Items.lead, 100); conditionWave = 10; launchPeriod = 10; @@ -148,13 +147,30 @@ public class Zones implements ContentList{ }}; }}; + tarFields = new Zone("tarFields", new MapGenerator("tarFields", 1) + .dist(0f, false) + .decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{ + loadout = Loadouts.basicFoundation; + startingItems = ItemStack.list(Items.copper, 500, Items.lead, 200); + conditionWave = 15; + launchPeriod = 10; + zoneRequirements = ZoneRequirement.with(ruinousShores, 20); + blockRequirements = new Block[]{Blocks.pneumaticDrill}; + resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand}; + rules = () -> new Rules(){{ + waves = true; + waveTimer = true; + waveSpacing = 60 * 60 * 2; + }}; + }}; + desolateRift = new Zone("desolateRift", new MapGenerator("desolateRift").dist(2f)){{ loadout = Loadouts.basicNucleus; baseLaunchCost = ItemStack.with(); startingItems = ItemStack.list(Items.copper, 1500); conditionWave = 10; launchPeriod = 20; - zoneRequirements = ZoneRequirement.with(stainedMountains, 20); + zoneRequirements = ZoneRequirement.with(tarFields, 20); blockRequirements = new Block[]{Blocks.thermalGenerator}; resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand}; rules = () -> new Rules(){{ @@ -172,7 +188,7 @@ public class Zones implements ContentList{ startingItems = ItemStack.list(Items.copper, 2500, Items.lead, 3000, Items.silicon, 800, Items.metaglass, 400); conditionWave = 30; launchPeriod = 15; - zoneRequirements = ZoneRequirement.with(desolateRift, 20); + zoneRequirements = ZoneRequirement.with(frozenForest, 20); blockRequirements = new Block[]{Blocks.thermalGenerator}; resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.thorium, Items.sand}; rules = () -> new Rules(){{ diff --git a/core/src/io/anuke/mindustry/editor/EditorTool.java b/core/src/io/anuke/mindustry/editor/EditorTool.java index 56af578d06..db74684eea 100644 --- a/core/src/io/anuke/mindustry/editor/EditorTool.java +++ b/core/src/io/anuke/mindustry/editor/EditorTool.java @@ -11,6 +11,7 @@ import io.anuke.mindustry.world.*; import io.anuke.mindustry.world.blocks.*; public enum EditorTool{ + zoom, pick{ public void touched(MapEditor editor, int x, int y){ if(!Structs.inBounds(x, y, editor.width(), editor.height())) return; @@ -34,6 +35,7 @@ public enum EditorTool{ editor.drawBlock = tile.block() == Blocks.air ? tile.overlay() == Blocks.air ? tile.floor() : tile.overlay() : tile.block(); } }, + line, pencil{ { edit = true; @@ -56,22 +58,6 @@ public enum EditorTool{ editor.draw(x, y, isPaint(), Blocks.air); } }, - spray{ - { - edit = true; - draggable = true; - } - - @Override - public void touched(MapEditor editor, int x, int y){ - editor.draw(x, y, isPaint(), editor.drawBlock, 0.012); - } - }, - line{ - { - - } - }, fill{ { edit = true; @@ -200,7 +186,17 @@ public enum EditorTool{ return (data.drawBlock instanceof OverlayFloor ? tile.overlay() : isfloor ? tile.floor() : tile.block()) == dest && !(data.drawBlock instanceof OverlayFloor && tile.floor().isLiquid); } }, - zoom; + spray{ + { + edit = true; + draggable = true; + } + + @Override + public void touched(MapEditor editor, int x, int y){ + editor.draw(x, y, isPaint(), editor.drawBlock, 0.012); + } + }; boolean edit, draggable; diff --git a/core/src/io/anuke/mindustry/game/Rules.java b/core/src/io/anuke/mindustry/game/Rules.java index 3db725e378..bc610088f9 100644 --- a/core/src/io/anuke/mindustry/game/Rules.java +++ b/core/src/io/anuke/mindustry/game/Rules.java @@ -45,7 +45,7 @@ public class Rules{ public float waveSpacing = 60 * 60 * 2; /** Zone ID, -1 for invalid zone. */ public byte zone = -1; - /** Spawn layout. Since only zones modify this, it should be assigned on save load. */ + /** Spawn layout. Should be assigned on save load based on map or zone. */ public transient Array spawns = DefaultWaves.get(); /** Determines if there should be limited respawns. */ public boolean limitedRespawns = false; diff --git a/core/src/io/anuke/mindustry/io/MapIO.java b/core/src/io/anuke/mindustry/io/MapIO.java index 5d925a8899..c124e75555 100644 --- a/core/src/io/anuke/mindustry/io/MapIO.java +++ b/core/src/io/anuke/mindustry/io/MapIO.java @@ -37,15 +37,14 @@ public class MapIO{ private static void initBlocks(){ if(missingBlocks != null) return; - //stainedRocks, stainedRocksRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder, missingBlocks = ObjectMap.of( - "stained-stone", Blocks.shale, - "stained-stone-red", Blocks.shale, - "stained-stone-yellow", Blocks.shale, - "stained-rocks", Blocks.shaleRocks, - "stained-boulder", Blocks.shaleBoulder, - "stained-rocks-red", Blocks.shaleRocks, - "stained-rocks-yellow", Blocks.shaleRocks + "stained-stone", Blocks.shale, + "stained-stone-red", Blocks.shale, + "stained-stone-yellow", Blocks.shale, + "stained-rocks", Blocks.shaleRocks, + "stained-boulder", Blocks.shaleBoulder, + "stained-rocks-red", Blocks.shaleRocks, + "stained-rocks-yellow", Blocks.shaleRocks ); } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java index 3755868fb9..402d93e915 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java @@ -97,7 +97,7 @@ public abstract class Turret extends Block{ public void setStats(){ super.setStats(); - stats.add(BlockStat.shootRange, range, StatUnit.blocks); + stats.add(BlockStat.shootRange, range / tilesize, StatUnit.blocks); stats.add(BlockStat.inaccuracy, (int)inaccuracy, StatUnit.degrees); stats.add(BlockStat.reload, 60f / reload * shots, StatUnit.none); stats.add(BlockStat.shots, shots, StatUnit.none);