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 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}jKx9jP7LeL$-HD>V6^ab zaSVxQeL7W}?~sE)8~Y(ofetQ~F6WRC1+74tg)ap?`Wu{-1Z9|79YPd#cm;Z!?cV(P zMy9Y(-SIb<-oJjWe_(%l+Rx8FtK<*e+;?kL-%Q(5DB`yS+pwN>+-IJzmXJ!$h38DF83t()@pr@!<5 z(qC?}_`w_&t1l1twKTUU$;_G5!6q^1)Vg&hx0N|V`6C`iY+^mukj|ZPk7w(Fw?!)P zzT7g^92d1GOp=i1Q_xW2lG|6ePV#VNnBdQab}kXRzl(!KiwpE(ixc|&^JYl-aqal+ zZ(C7k`uq2i0tQF^mcR37?Y=Ly!=s_8_2MB$2C+-Mnk%@&6IRZ!a|^R*Sk$qsVKdX5 l7EwJR56>RP|D81q6FxR+bNbmNGcYhPc)I$ztaD0e0s!-po3H=? literal 0 HcmV?d00001 diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 1cd240b202..e4e8326f9b 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -416,3 +416,4 @@ 63292=spark|unit-spark-ui 63291=beam-tower|block-beam-tower-ui 63290=build-tower|block-build-tower-ui +63289=tungsten|item-tungsten-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 77968b721e8dcfe1dd64c05ca1e7a14384c3415a..eb0a9b28e8276ad5ff021d94affce8e03524b9f6 100644 GIT binary patch delta 27 jcmZ20zFmC79xg_a$$Pm@aB`HC=A{>xq~=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; }}; }