diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index f72be5fa6c..a0a6516ea1 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -362,6 +362,7 @@ zone.tarFields.name = Tar Fields zone.saltFlats.name = Salt Flats zone.impact0078.name = Impact 0078 zone.crags.name = Crags +zone.fungalPass.name = Fungal Pass zone.groundZero.description = The optimal location to begin once more. Low enemy threat. Few resources.\nGather as much lead and copper as possible.\nMove on. zone.frozenForest.description = Even here, closer to mountains, the spores have spread. The fridgid temperatures cannot contain them forever.\n\nBegin the venture into power. Build combustion generators. Learn to use menders. @@ -370,10 +371,11 @@ zone.saltFlats.description = On the outskirts of the desert lie the Salt Flats. zone.craters.description = Water has accumulated in this crater, relic of the old wars. Reclaim the area. Collect sand. Smelt metaglass. Pump water to cool turrets and drills. zone.ruinousShores.description = Past the wastes, is the shoreline. Once, this location housed a coastal defense array. Not much of it remains. Only the most basic defense structures have remained unscathed, everything else reduced to scrap.\nContinue the expansion outwards. Rediscover the technology. zone.stainedMountains.description = Further inland lie the mountains, yet untainted by spores.\nExtract the abundant titanium in this area. Learn how to use it.\n\nThe enemy presence is greater here. Do not give them time to send their strongest units. -zone.overgrowth.description = This area is overgrown, closer to the source of the spores.\nThe enemy has established an outpost here. Build dagger units. Destroy it. Reclaim that which was lost. +zone.overgrowth.description = This area is overgrown, closer to the source of the spores.\nThe enemy has established an outpost here. Build Titan units. Destroy it. Reclaim that which was lost. zone.tarFields.description = The outskirts of an oil production zone, between the mountains and desert. One of the few areas with usable tar reserves.\nAlthough abandoned, this area has some dangerous enemy forces nearby. Do not underestimate them.\n\n[lightgray]Research oil processing technology if possible. zone.desolateRift.description = An extremely dangerous zone. Plentiful resources, but little space. High risk of destruction. Leave as soon as possible. Do not be fooled by the long spacing between enemy attacks. zone.nuclearComplex.description = A former facility for the production and processing of thorium, reduced to ruins.\n[lightgray]Research the thorium and its many uses.\n\nThe enemy is present here in great numbers, constantly scouting for attackers. +zone.fungalPass.description = A transition area between high mountains and lower, spore-ridden lands. A small enemy reconnaissance base is located here.\nDestroy it.\nUse Dagger and Crawler units. Take out the two cores. zone.impact0078.description = zone.crags.description = @@ -421,7 +423,6 @@ blocks.speedincrease = Speed Increase blocks.range = Range blocks.drilltier = Drillables blocks.drillspeed = Base Drill Speed -blocks.drilltierreq = Better Drill Required blocks.boosteffect = Boost Effect blocks.maxunits = Max Active Units blocks.health = Health @@ -431,6 +432,7 @@ blocks.shots = Shots blocks.reload = Shots/Second blocks.ammo = Ammo + bar.drillspeed = Drill Speed: {0}/s bar.efficiency = Efficiency: {0}% bar.powerbalance = Power: {0}/s diff --git a/core/assets/maps/fungalPass.msav b/core/assets/maps/fungalPass.msav new file mode 100644 index 0000000000..3935a0c04d Binary files /dev/null and b/core/assets/maps/fungalPass.msav differ diff --git a/core/assets/zones/fungalPass.png b/core/assets/zones/fungalPass.png new file mode 100644 index 0000000000..c59fbc57e3 Binary files /dev/null and b/core/assets/zones/fungalPass.png differ diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index d02836aedf..24faea8266 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -828,7 +828,7 @@ public class Blocks implements ContentList{ }}; door = new Door("door"){{ - requirements(Category.defense, ItemStack.with(Items.titanium, 6, Items.silicon, 4)); + requirements(Category.defense, ItemStack.with(Items.graphite, 6, Items.silicon, 4)); health = 100 * wallHealthMultiplier; }}; @@ -1669,13 +1669,13 @@ public class Blocks implements ContentList{ }}; crawlerFactory = new UnitFactory("crawler-factory"){{ - requirements(Category.units, padVisible, ItemStack.with(Items.lead, 25, Items.silicon, 40)); + requirements(Category.units, padVisible, ItemStack.with(Items.lead, 25, Items.silicon, 30)); type = UnitTypes.crawler; produceTime = 250; size = 2; - maxSpawn = 5; - consumes.power(0.5f); - consumes.items(new ItemStack(Items.coal, 4), new ItemStack(Items.silicon, 4)); + maxSpawn = 6; + consumes.power(0.4f); + consumes.items(new ItemStack(Items.coal, 6)); }}; titanFactory = new UnitFactory("titan-factory"){{ diff --git a/core/src/io/anuke/mindustry/content/Zones.java b/core/src/io/anuke/mindustry/content/Zones.java index 76d2f8d65a..bb0a5a692f 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, tarFields, + craters, frozenForest, ruinousShores, stainedMountains, tarFields, fungalPass, saltFlats, overgrowth, impact0078, crags, desolateRift, nuclearComplex; @@ -107,16 +107,6 @@ public class Zones implements ContentList{ resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.sand, Items.scrap}; }}; - overgrowth = new Zone("overgrowth", new MapGenerator("overgrowth")){{ - startingItems = ItemStack.list(Items.copper, 1500, Items.lead, 1000, Items.silicon, 500, Items.metaglass, 250); - conditionWave = 12; - launchPeriod = 4; - loadout = Loadouts.basicNucleus; - zoneRequirements = ZoneRequirement.with(craters, 40); - blockRequirements = new Block[]{Blocks.cultivator, Blocks.sporePress}; - resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.titanium, Items.sand, Items.thorium, Items.scrap}; - }}; - ruinousShores = new Zone("ruinousShores", new MapGenerator("ruinousShores", 1)){{ loadout = Loadouts.basicFoundation; baseLaunchCost = ItemStack.with(); @@ -139,6 +129,23 @@ public class Zones implements ContentList{ resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.sand}; }}; + fungalPass = new Zone("fungalPass", new MapGenerator("fungalPass")){{ + startingItems = ItemStack.list(Items.copper, 250, Items.lead, 250, Items.metaglass, 100, Items.graphite, 100); + zoneRequirements = ZoneRequirement.with(stainedMountains, 15); + blockRequirements = new Block[]{Blocks.daggerFactory, Blocks.crawlerFactory, Blocks.door}; + resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.titanium, Items.sand}; + }}; + + overgrowth = new Zone("overgrowth", new MapGenerator("overgrowth")){{ + startingItems = ItemStack.list(Items.copper, 1500, Items.lead, 1000, Items.silicon, 500, Items.metaglass, 250); + conditionWave = 12; + launchPeriod = 4; + loadout = Loadouts.basicNucleus; + zoneRequirements = ZoneRequirement.with(craters, 40, fungalPass, 10); + blockRequirements = new Block[]{Blocks.cultivator, Blocks.sporePress, Blocks.titanFactory, Blocks.wraithFactory}; + resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.titanium, Items.sand, Items.thorium, Items.scrap}; + }}; + tarFields = new Zone("tarFields", new MapGenerator("tarFields") .decor(new Decoration(Blocks.shale, Blocks.shaleBoulder, 0.02))){{ loadout = Loadouts.basicFoundation; @@ -180,7 +187,7 @@ public class Zones implements ContentList{ startingItems = ItemStack.list(Items.copper, 1250, Items.lead, 1500, Items.silicon, 400, Items.metaglass, 250); conditionWave = 30; launchPeriod = 15; - zoneRequirements = ZoneRequirement.with(stainedMountains, 20); + zoneRequirements = ZoneRequirement.with(fungalPass, 8); blockRequirements = new Block[]{Blocks.thermalGenerator, Blocks.laserDrill}; resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.thorium, Items.sand}; }}; diff --git a/core/src/io/anuke/mindustry/game/Team.java b/core/src/io/anuke/mindustry/game/Team.java index 7f9c3428b5..b4cb74c02c 100644 --- a/core/src/io/anuke/mindustry/game/Team.java +++ b/core/src/io/anuke/mindustry/game/Team.java @@ -10,7 +10,7 @@ public enum Team{ crux(Color.valueOf("e82d2d")), green(Color.valueOf("4dd98b")), purple(Color.valueOf("9a4bdf")), - blue(Color.valueOf("ff7f50")); + blue(Color.ROYAL.cpy()); public final static Team[] all = values(); public final Color color; diff --git a/core/src/io/anuke/mindustry/type/Zone.java b/core/src/io/anuke/mindustry/type/Zone.java index e946db150e..fe5f5210ac 100644 --- a/core/src/io/anuke/mindustry/type/Zone.java +++ b/core/src/io/anuke/mindustry/type/Zone.java @@ -156,7 +156,9 @@ public class Zone extends UnlockableContent{ @Override public void load(){ - preview = new Texture(Core.files.internal("zones/" + name + ".png")); + if(Core.files.internal("zones/" + name + ".png").exists()){ + preview = new Texture(Core.files.internal("zones/" + name + ".png")); + } } @Override diff --git a/core/src/io/anuke/mindustry/world/Block.java b/core/src/io/anuke/mindustry/world/Block.java index 2bcbd7e03d..98503281b4 100644 --- a/core/src/io/anuke/mindustry/world/Block.java +++ b/core/src/io/anuke/mindustry/world/Block.java @@ -271,11 +271,11 @@ public class Block extends BlockStorage{ @CallSuper public void playerPlaced(Tile tile){ - if(consumesPower && !outputsPower){ + if((consumesPower && !outputsPower) || (!consumesPower && outputsPower)){ int range = 10; tempTiles.clear(); Geometry.circle(tile.x, tile.y, range, (x, y) -> { - Tile other = world.tile(x, y); + Tile other = world.ltile(x, y); if(other != null && other.block instanceof PowerNode && ((PowerNode)other.block).linkValid(other, tile)){ tempTiles.add(other); } diff --git a/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java b/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java index 94284f983c..e4147f7e73 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java @@ -1,27 +1,21 @@ package io.anuke.mindustry.world.blocks.power; -import io.anuke.annotations.Annotations.Loc; -import io.anuke.annotations.Annotations.Remote; -import io.anuke.arc.Core; -import io.anuke.arc.graphics.Color; +import io.anuke.annotations.Annotations.*; +import io.anuke.arc.*; +import io.anuke.arc.graphics.*; import io.anuke.arc.graphics.g2d.*; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.arc.math.geom.Intersector; -import io.anuke.arc.math.geom.Vector2; +import io.anuke.arc.math.*; +import io.anuke.arc.math.geom.*; import io.anuke.arc.util.*; -import io.anuke.mindustry.entities.type.Player; -import io.anuke.mindustry.entities.type.TileEntity; -import io.anuke.mindustry.gen.Call; +import io.anuke.mindustry.entities.type.*; +import io.anuke.mindustry.gen.*; import io.anuke.mindustry.graphics.*; -import io.anuke.mindustry.ui.Bar; -import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.PowerBlock; -import io.anuke.mindustry.world.meta.BlockStat; -import io.anuke.mindustry.world.meta.StatUnit; +import io.anuke.mindustry.ui.*; +import io.anuke.mindustry.world.*; +import io.anuke.mindustry.world.blocks.*; +import io.anuke.mindustry.world.meta.*; -import static io.anuke.mindustry.Vars.tilesize; -import static io.anuke.mindustry.Vars.world; +import static io.anuke.mindustry.Vars.*; public class PowerNode extends PowerBlock{ //last distribution block placed @@ -111,6 +105,13 @@ public class PowerNode extends PowerBlock{ Call.linkPowerNodes(null, tile, before); } + Geometry.circle(tile.x, tile.y, (int)(laserRange + 1), (x, y) -> { + Tile other = world.ltile(x, y); + if(other != null && other != tile && ((!other.block().outputsPower && other.block().consumesPower) || (other.block().outputsPower && !other.block().consumesPower)) && linkValid(tile, other)){ + Call.linkPowerNodes(null, tile, other); + } + }); + lastPlaced = tile.pos(); super.playerPlaced(tile); } diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java index e28ca954b2..96733ce165 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java @@ -147,7 +147,7 @@ public class Drill extends Block{ Tile to = tile.getLinkedTilesAs(this, tempTiles).find(t -> t.drop() != null && t.drop().hardness > tier); Item item = to == null ? null : to.drop(); if(item != null){ - drawPlaceText(Core.bundle.get("blocks.drilltierreq"), x, y, valid); + drawPlaceText(Core.bundle.get("bar.drilltierreq"), x, y, valid); } } }