Small heat redirector / Carbide ammo for breach

This commit is contained in:
Anuken
2025-01-04 17:46:50 -05:00
parent 7e645e0208
commit f28781dc00
12 changed files with 61 additions and 5 deletions

View File

@@ -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;
}}
);

View File

@@ -220,7 +220,9 @@ public class ErekirTechTree{
});
node(heatRouter, () -> {
node(smallHeatRedirector, () -> {
});
});
});
});

View File

@@ -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. */

View File

@@ -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);
}
}

View File

@@ -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();