From f28781dc00e6a9d22b5bbc41ebb0c4904db3f1f2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 4 Jan 2025 17:46:50 -0500 Subject: [PATCH] Small heat redirector / Carbide ammo for breach --- .../production/small-heat-redirector-heat.png | Bin 0 -> 1625 bytes .../production/small-heat-redirector-top1.png | Bin 0 -> 429 bytes .../production/small-heat-redirector-top2.png | Bin 0 -> 434 bytes .../production/small-heat-redirector.png | Bin 0 -> 1104 bytes core/assets/bundles/bundle.properties | 6 ++- core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 4650 -> 4673 bytes core/src/mindustry/content/Blocks.java | 35 +++++++++++++++++- .../src/mindustry/content/ErekirTechTree.java | 2 + .../mindustry/entities/bullet/BulletType.java | 4 ++ .../world/blocks/defense/turrets/Turret.java | 8 +++- core/src/mindustry/world/meta/StatValues.java | 10 ++++- 12 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/production/small-heat-redirector-heat.png create mode 100644 core/assets-raw/sprites/blocks/production/small-heat-redirector-top1.png create mode 100644 core/assets-raw/sprites/blocks/production/small-heat-redirector-top2.png create mode 100644 core/assets-raw/sprites/blocks/production/small-heat-redirector.png diff --git a/core/assets-raw/sprites/blocks/production/small-heat-redirector-heat.png b/core/assets-raw/sprites/blocks/production/small-heat-redirector-heat.png new file mode 100644 index 0000000000000000000000000000000000000000..4b75fbf11ac134b30a2dbe1aac6d06792b155a6f GIT binary patch literal 1625 zcmV-f2B!ImP)Px*6G=otRCt`-n^{vEM-+v>o{<=VSi~0af+-5JR9^D`e@z~;6xhaKvq?gu_CwB< zFKtOiBq`c+tGY%SjikA!?|Ql?&~S+{wtx<>1-t=%1%3m50rrdMzQO-fVvHrw23CL# zfv^Rv16`nMEC5n|30MWTftSD`Z~*KBJz%ww0K^yzprx7L23`ZlzzJ{!ybu5@t>?bk z|5{><0Vw468=CDS;75V*TA*}+rN#juDS=7=?8)rk0Iz@@xkUvOO>}`E0G2e%J?qr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ocks/production/small-heat-redirector-top1.png new file mode 100644 index 0000000000000000000000000000000000000000..fe05c81d2b8eca42b733ceb33da00de6c03085de GIT binary patch literal 429 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%z(>+}rLn`LH zo#mK!SV6$GevwX5!;0xAB8%kpH-D+E(w1NJuItoN31P0ebhQJ zc&BI+-+`w7@6V;|b_;LtmAl7s$k9Ub&4D+CH!SR&XH zdVxg1X(RvF7n#DDmNw)*vgA~4($i($oHTR!*W6kDAIqyBpYMNuJ>pi_j%9!HzrWu8 zPx$Y)M2xRCt{2n!$0yAP_~rGp->OrGiX~Q3)z0lL}ITPd>T?H6fqKC?IEm z0&>a2gMcF>z&ZeHB)~d=T9$cQj~2KRCfC^G z3TzY3t?(tCBJJH^t2UUj0$L&g)&W=}0oDQZ=4i1TUI0da74zS}p1Pyw1S? zL9=JiU#^LW_8vZ=o-+ZR1tY$FN&(Ovf-uT?k^txqKp5#fX#mK8fUXnK5POZU0w4jQ zc9D#N&~tnf0R4f`s#XZCJ5*`>?f^VSSc=-7bK_@2AW|rV=-k8_e=B*tk;nP@d~fsT z5#o@yEnuIg?d z0NiB_0bqqiPCcf(rf>l0!l0t)fThVW{_Un1zPc@%Gv*s!-%{xMx8`$_pXw&jX>f zJ5&`!yxE&o60=l-pux;RXf26VKOew4-CZQ_%F6X^eP$I}k@C1TOF|MMF9dFYe;CPy13FW3)#i8K^>8Rj3j=rt@G}D1)@3<~?f|)aH0P}!SUiFskjT9! z1p+(bNrPG3RzlDKOQ%r?RS!s%uCt-i0S^S(hWkK52!Rl?2<9Mo+Lk`k`l@|gN2>V& ziBz@s<>cv8J3#%_2P9I}-iO>PX96-Spb!`d0lkMIpdkUT0hVDUgAs=!`zonw5tIf* z8st@!4b6ukuh7LXdVFhZY&s5mRl5^Jji1X4stY1s_1FecH34WbqSbj;>-bupz;XfL zP7p;o&uSgtg5U-arRdrrA`QY&0MWI>8c7Jl0C=5eje;-)0O~wz1cZ>|@V_WNJNyDa Wtar$zTm5tZ0000p2H{MVTPGe`x^ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 23df8aa8db..c60138e122 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -73,7 +73,7 @@ public class Blocks{ melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge, //crafting - erekir - siliconArcFurnace, electrolyzer, oxidationChamber, atmosphericConcentrator, electricHeater, slagHeater, phaseHeater, heatRedirector, heatRouter, slagIncinerator, + siliconArcFurnace, electrolyzer, oxidationChamber, atmosphericConcentrator, electricHeater, slagHeater, phaseHeater, heatRedirector, smallHeatRedirector, heatRouter, slagIncinerator, carbideCrucible, slagCentrifuge, surgeCrucible, cyanogenSynthesizer, phaseSynthesizer, heatReactor, //sandbox @@ -1327,6 +1327,17 @@ public class Blocks{ regionRotated1 = 1; }}; + smallHeatRedirector = new HeatConductor("small-heat-redirector"){{ + requirements(Category.crafting, with(Items.surgeAlloy, 10, Items.graphite, 10)); + + researchCostMultiplier = 10f; + + group = BlockGroup.heat; + size = 2; + drawer = new DrawMulti(new DrawDefault(), new DrawHeatOutput(), new DrawHeatInput("-heat")); + regionRotated1 = 1; + }}; + heatRouter = new HeatConductor("heat-router"){{ requirements(Category.crafting, with(Items.tungsten, 15, Items.graphite, 10)); @@ -4006,7 +4017,7 @@ public class Blocks{ smokeEffect = Fx.shootBigSmoke; ammoMultiplier = 1; reloadMultiplier = 1f; - pierceCap = 3; + pierceCap = 4; pierce = true; pierceBuilding = true; hitColor = backColor = trailColor = Pal.tungstenShot; @@ -4016,6 +4027,26 @@ public class Blocks{ hitEffect = despawnEffect = Fx.hitBulletColor; rangeChange = 40f; buildingDamageMultiplier = 0.3f; + }}, + Items.carbide, new BasicBulletType(12f, 400f/0.75f){{ + width = 15f; + height = 21f; + hitSize = 7f; + shootEffect = sfe; + smokeEffect = Fx.shootBigSmoke; + ammoMultiplier = 1; + reloadMultiplier = 0.67f; + hitColor = backColor = trailColor = Color.valueOf("ab8ec5"); + frontColor = Color.white; + trailWidth = 2.2f; + trailLength = 11; + trailEffect = Fx.disperseTrail; + trailInterval = 2f; + hitEffect = despawnEffect = Fx.hitBulletColor; + rangeChange = 136f; + buildingDamageMultiplier = 0.3f; + targetBlocks = false; + targetMissiles = false; }} ); diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index 6c4571a43a..c638349073 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -220,7 +220,9 @@ public class ErekirTechTree{ }); node(heatRouter, () -> { + node(smallHeatRedirector, () -> { + }); }); }); }); diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 977f16c0e3..71329a947f 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -102,6 +102,10 @@ public class BulletType extends Content implements Cloneable{ public StatusEffect status = StatusEffects.none; /** Intensity of applied status effect in terms of duration. */ public float statusDuration = 60 * 8f; + /** Turret only. If false, blocks will not be targeted. */ + public boolean targetBlocks = true; + /** Turret only. If false, missiles will not be targeted. */ + public boolean targetMissiles = true; /** Whether this bullet type collides with tiles. */ public boolean collidesTiles = true; /** Whether this bullet type collides with tiles that are of the same team. */ diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 8c58f51a63..4636fee9fe 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -79,6 +79,8 @@ public class Turret extends ReloadTurret{ public boolean targetAir = true; /** If true, this block targets ground units and structures. */ public boolean targetGround = true; + /** If true, this block targets blocks. */ + public boolean targetBlocks = true; /** If true, this block targets friend blocks, to heal them. */ public boolean targetHealing = false; /** If true, this turret can be controlled by players. */ @@ -486,7 +488,11 @@ public class Turret extends ReloadTurret{ if(targetAir && !targetGround){ return Units.bestEnemy(team, x, y, range, e -> !e.dead() && !e.isGrounded() && unitFilter.get(e), unitSort); }else{ - return Units.bestTarget(team, x, y, range, e -> !e.dead() && unitFilter.get(e) && (e.isGrounded() || targetAir) && (!e.isGrounded() || targetGround), b -> targetGround && buildingFilter.get(b), unitSort); + var ammo = peekAmmo(); + boolean buildings = targetGround && targetBlocks && (ammo == null || ammo.targetBlocks), missiles = ammo == null || ammo.targetMissiles; + return Units.bestTarget(team, x, y, range, + e -> !e.dead() && unitFilter.get(e) && (e.isGrounded() || targetAir) && (!e.isGrounded() || targetGround) && (missiles || !(e instanceof TimedKillc)), + b -> buildings && buildingFilter.get(b), unitSort); } } diff --git a/core/src/mindustry/world/meta/StatValues.java b/core/src/mindustry/world/meta/StatValues.java index e05c129ea3..d0be047ebc 100644 --- a/core/src/mindustry/world/meta/StatValues.java +++ b/core/src/mindustry/world/meta/StatValues.java @@ -619,7 +619,7 @@ public class StatValues{ } if(type.maxDamageFraction > 0){ - sep(bt, Core.bundle.format("bullet.maxdamagefraction", (int)(type.maxDamageFraction * 100))); + sep(bt, Core.bundle.format("bullet.maxdamagefraction", (int)(type.maxDamageFraction * 100))); } if(type.suppressionRange > 0){ @@ -631,6 +631,14 @@ public class StatValues{ ((int)(type.statusDuration / 60f)) + "[lightgray] " + Core.bundle.get("unit.seconds"))).with(c -> withTooltip(c, type.status)); } + if(!type.targetMissiles){ + sep(bt, "@bullet.notargetsmissiles"); + } + + if(!type.targetBlocks){ + sep(bt, "@bullet.notargetsbuildings"); + } + if(type.intervalBullet != null){ bt.row();