From 38f7d2dcd074b7c42ff24857ac8b5ab130ae92db Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 2 Nov 2021 14:49:05 -0400 Subject: [PATCH] tungsten --- .../sprites/items/item-tungsten.png | Bin 0 -> 382 bytes core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 2989 -> 2999 bytes core/src/mindustry/content/Blocks.java | 2 +- core/src/mindustry/content/Items.java | 7 +++++-- .../mindustry/entities/units/BuildPlan.java | 12 ++++++------ .../maps/planet/ErekirPlanetGenerator.java | 2 +- .../world/blocks/defense/BuildTurret.java | 4 ++-- 8 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 core/assets-raw/sprites/items/item-tungsten.png diff --git a/core/assets-raw/sprites/items/item-tungsten.png b/core/assets-raw/sprites/items/item-tungsten.png new file mode 100644 index 0000000000000000000000000000000000000000..da25267a56de6659f6d9a709398b60f1e41aaa94 GIT binary patch literal 382 zcmV-^0fGLBP)Px$I7vi7R9J=Ol`9UyKoEup!buQ_3IvKnR8$};Q5>P^5lD}KLLw0y0);?SAh=3V zOE$Z+^Vn$<5`M?*((mi*FTlTNX8H5^dLP2szS^penJs|9b0o3^D7aQaEg*qwB<54W zr4b7>-Dz~VSir&i*E3qfW}2|~2s`s)wT|F!7KVEc$i=d5hhnqj98D6*g|cqHXYNb% zk9Rbq;G6_H^x?jQgNI@qoRWwJ7@W$kt~A>t2~`hR;aIW-#(-xFXxxq~=X-;noBIkn;)@ delta 17 ZcmdlkzE*t09xg`V$$Pm@Oz!8_002G?29y8* diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index de464f229e..05957fa09c 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1161,7 +1161,7 @@ public class Blocks implements ContentList{ buildTower = new BuildTurret("build-tower"){{ requirements(Category.effect, with(Items.graphite, 40, Items.beryllium, 50)); outlineColor = Pal.darkOutline; - consumes.power(1.5f); + consumes.power(3f); range = 120f; size = 3; health = 80; diff --git a/core/src/mindustry/content/Items.java b/core/src/mindustry/content/Items.java index 444e41ca76..0d46ffed29 100644 --- a/core/src/mindustry/content/Items.java +++ b/core/src/mindustry/content/Items.java @@ -8,7 +8,7 @@ public class Items implements ContentList{ public static Item scrap, copper, lead, graphite, coal, titanium, thorium, silicon, plastanium, phaseFabric, surgeAlloy, sporePod, sand, blastCompound, pyratite, metaglass, - beryllium, fissileMatter, dormantCyst; + beryllium, fissileMatter, dormantCyst, tungsten; @Override public void load(){ @@ -99,12 +99,15 @@ public class Items implements ContentList{ }}; fissileMatter = new Item("fissile-matter", Color.valueOf("536631")){{ - hardness = 4; radioactivity = 1.5f; }}; dormantCyst = new Item("dormant-cyst", Color.valueOf("df824d")){{ flammability = 0.1f; }}; + + tungsten = new Item("tungsten", Color.valueOf("768a9a")){{ + hardness = 5; + }}; } } diff --git a/core/src/mindustry/entities/units/BuildPlan.java b/core/src/mindustry/entities/units/BuildPlan.java index 053d12651d..29dd7c324b 100644 --- a/core/src/mindustry/entities/units/BuildPlan.java +++ b/core/src/mindustry/entities/units/BuildPlan.java @@ -78,13 +78,13 @@ public class BuildPlan implements Position{ /** Transforms the internal position of this config using the specified function, and return the result. */ public static Object pointConfig(Block block, Object config, Cons cons){ - if(config instanceof Point2){ - config = ((Point2)config).cpy(); - cons.get((Point2)config); - }else if(config instanceof Point2[]){ - Point2[] result = new Point2[((Point2[])config).length]; + if(config instanceof Point2 point){ + config = point.cpy(); + cons.get(point); + }else if(config instanceof Point2[] points){ + Point2[] result = new Point2[points.length]; int i = 0; - for(Point2 p : (Point2[])config){ + for(Point2 p : points){ result[i] = p.cpy(); cons.get(result[i++]); } diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index d55c8c63a0..9770ceef1a 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -197,7 +197,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ } //not allowed - state.rules.hiddenBuildItems.addAll(Items.copper, Items.titanium, Items.coal, Items.lead); + state.rules.hiddenBuildItems.addAll(Items.copper, Items.titanium, Items.coal, Items.lead, Items.blastCompound, Items.pyratite, Items.sporePod, Items.metaglass); //it is very hot state.rules.attributes.set(Attribute.heat, 0.8f); diff --git a/core/src/mindustry/world/blocks/defense/BuildTurret.java b/core/src/mindustry/world/blocks/defense/BuildTurret.java index dc96f0426d..a38adfa38f 100644 --- a/core/src/mindustry/world/blocks/defense/BuildTurret.java +++ b/core/src/mindustry/world/blocks/defense/BuildTurret.java @@ -26,7 +26,7 @@ public class BuildTurret extends BaseTurret{ public @Load(value = "@-base", fallback = "block-@size") TextureRegion baseRegion; public float buildSpeed = 1f; - public float buildBeamOffset = 4.1f; + public float buildBeamOffset = 5f; //created in init() public @Nullable UnitType unitType; public float elevation = -1f; @@ -53,9 +53,9 @@ public class BuildTurret extends BaseTurret{ commandLimit = 0; rotateSpeed = BuildTurret.this.rotateSpeed; buildBeamOffset = BuildTurret.this.buildBeamOffset; - constructor = BlockUnitUnit::create; buildRange = BuildTurret.this.range; buildSpeed = BuildTurret.this.buildSpeed; + constructor = BlockUnitUnit::create; }}; }