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 0000000000..4b75fbf11a Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/small-heat-redirector-heat.png differ diff --git a/core/assets-raw/sprites/blocks/production/small-heat-redirector-top1.png b/core/assets-raw/sprites/blocks/production/small-heat-redirector-top1.png new file mode 100644 index 0000000000..fe05c81d2b Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/small-heat-redirector-top1.png differ diff --git a/core/assets-raw/sprites/blocks/production/small-heat-redirector-top2.png b/core/assets-raw/sprites/blocks/production/small-heat-redirector-top2.png new file mode 100644 index 0000000000..4af1a77431 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/small-heat-redirector-top2.png differ diff --git a/core/assets-raw/sprites/blocks/production/small-heat-redirector.png b/core/assets-raw/sprites/blocks/production/small-heat-redirector.png new file mode 100644 index 0000000000..3b51f89bbc Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/small-heat-redirector.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index e3f3f02073..ec7ce269f4 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1139,6 +1139,8 @@ bullet.healamount = [stat]{0}[lightgray] direct repair bullet.multiplier = [stat]{0}[lightgray] ammo/item bullet.reload = [stat]{0}%[lightgray] fire rate bullet.range = [stat]{0}[lightgray] tiles range +bullet.notargetsmissiles = [stat] ignores buildings +bullet.notargetsbuildings = [stat] ignores missiles unit.blocks = blocks unit.blockssquared = blocks\u00B2 @@ -1839,6 +1841,7 @@ block.electric-heater.name = Electric Heater block.slag-heater.name = Slag Heater block.phase-heater.name = Phase Heater block.heat-redirector.name = Heat Redirector +block.small-heat-redirector.name = Small Heat Redirector block.heat-router.name = Heat Router block.slag-incinerator.name = Slag Incinerator block.carbide-crucible.name = Carbide Crucible @@ -2237,7 +2240,7 @@ block.repair-turret.description = Continuously repairs the closest damaged unit block.core-bastion.description = Core of the base. Armored. Once destroyed, the sector is lost. block.core-citadel.description = Core of the base. Very well armored. Stores more resources than a Bastion core. block.core-acropolis.description = Core of the base. Exceptionally well armored. Stores more resources than a Citadel core. -block.breach.description = Fires piercing beryllium or tungsten ammunition at enemy targets. +block.breach.description = Fires piercing bullets at enemy targets. block.diffuse.description = Fires a burst of bullets in a wide cone. Pushes enemy targets back. block.sublimate.description = Fires a continuous jet of flame at enemy targets. Pierces armor. block.titan.description = Fires a massive explosive artillery shell at ground targets. Requires hydrogen. @@ -2253,6 +2256,7 @@ block.electric-heater.description = Applies heat to structures. Requires large a block.slag-heater.description = Applies heat to structures. Requires slag. block.phase-heater.description = Applies heat to structures. Requires phase fabric. block.heat-redirector.description = Redirects accumulated heat to other blocks. +block.small-heat-redirector.description = Redirects accumulated heat to other blocks. block.heat-router.description = Spreads accumulated heat in three output directions. block.electrolyzer.description = Converts water into hydrogen and ozone gas. Outputs resulting gases in two opposite directions, marked by corresponding colors. block.atmospheric-concentrator.description = Concentrates nitrogen from the atmosphere. Requires heat. diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index e04db3aa06..15a8b4a508 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -590,3 +590,4 @@ 63092=dynamic|status-dynamic-ui 63091=remove-wall|block-remove-wall-ui 63090=remove-ore|block-remove-ore-ui +63089=small-heat-redirector|block-small-heat-redirector-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 26e11eb4c2..848b6adda2 100644 Binary files a/core/assets/logicids.dat and b/core/assets/logicids.dat differ 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();