Skip to content

Commit a84a99a

Browse files
committed
Large cliff crusher block / Erekir ammo tweaks / Android file chooser fixes
1 parent 6c1952c commit a84a99a

17 files changed

+178
-19
lines changed

android/src/mindustry/android/AndroidLauncher.java

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ void showFileChooser(boolean open, String title, Cons<Fi> cons, String... extens
110110
Intent intent = new Intent(open ? Intent.ACTION_OPEN_DOCUMENT : Intent.ACTION_CREATE_DOCUMENT);
111111
intent.addCategory(Intent.CATEGORY_OPENABLE);
112112
intent.setType(extension.equals("zip") && !open && extensions.length == 1 ? "application/zip" : "*/*");
113+
intent.putExtra(Intent.EXTRA_TITLE, "export." + extension);
113114

114115
addResultListener(i -> startActivityForResult(intent, i), (code, in) -> {
115116
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
Loading
Loading
Loading
Loading
Loading

core/assets/bundles/bundle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -1889,8 +1889,9 @@ block.chemical-combustion-chamber.name = Chemical Combustion Chamber
18891889
block.pyrolysis-generator.name = Pyrolysis Generator
18901890
block.vent-condenser.name = Vent Condenser
18911891
block.cliff-crusher.name = Cliff Crusher
1892+
block.large-cliff-crusher.name = Advanced Cliff Crusher
18921893
block.plasma-bore.name = Plasma Bore
1893-
block.large-plasma-bore.name = Large Plasma Bore
1894+
block.large-plasma-bore.name = Advanced Plasma Bore
18941895
block.impact-drill.name = Impact Drill
18951896
block.eruption-drill.name = Eruption Drill
18961897
block.core-bastion.name = Core: Bastion
@@ -2269,6 +2270,7 @@ block.vent-condenser.description = Condenses vent gases into water. Consumes pow
22692270
block.plasma-bore.description = When placed facing an ore wall, outputs items indefinitely. Requires small amounts of power.\nOptionally uses hydrogen to boost efficiency.
22702271
block.large-plasma-bore.description = A larger plasma bore. Capable of mining tungsten and thorium. Requires hydrogen and power.\nOptionally uses nitrogen to boost efficiency.
22712272
block.cliff-crusher.description = Crushes walls, outputting sand indefinitely. Requires power. Efficiency varies based on type of wall.
2273+
block.large-cliff-crusher.description = Crushes walls, outputting sand indefinitely. Requires power and ozone. Efficiency varies based on type of wall. Optionally consumes tungsten to increase efficiency.
22722274
block.impact-drill.description = When placed on ore, outputs items in bursts indefinitely. Requires power and water.
22732275
block.eruption-drill.description = An improved impact drill. Capable of mining thorium. Requires hydrogen.
22742276
block.reinforced-conduit.description = Moves fluids forward. Doesn't accept non-conduit inputs to the sides.

core/assets/icons/icons.properties

+1
Original file line numberDiff line numberDiff line change
@@ -591,3 +591,4 @@
591591
63091=remove-wall|block-remove-wall-ui
592592
63090=remove-ore|block-remove-ore-ui
593593
63089=small-heat-redirector|block-small-heat-redirector-ui
594+
63088=large-cliff-crusher|block-large-cliff-crusher-ui

core/assets/logicids.dat

21 Bytes
Binary file not shown.

core/src/mindustry/content/Blocks.java

+62-9
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public class Blocks{
125125

126126
//production
127127
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator,
128-
cliffCrusher, plasmaBore, largePlasmaBore, impactDrill, eruptionDrill,
128+
cliffCrusher, largeCliffCrusher, plasmaBore, largePlasmaBore, impactDrill, eruptionDrill,
129129

130130
//storage
131131
coreShard, coreFoundation, coreNucleus, vault, container, unloader,
@@ -1436,7 +1436,6 @@ public static void load(){
14361436
}});
14371437

14381438
consumeItem(Items.silicon, 3);
1439-
//TODO consume hydrogen/ozone?
14401439
consumeLiquid(Liquids.slag, 40f / 60f);
14411440
consumePower(2f);
14421441
}};
@@ -1466,7 +1465,6 @@ public static void load(){
14661465
liquidCapacity = 80f;
14671466
outputLiquid = new LiquidStack(Liquids.cyanogen, 3f / 60f);
14681467

1469-
//consumeLiquids(LiquidStack.with(Liquids.hydrogen, 3f / 60f, Liquids.nitrogen, 2f / 60f));
14701468
consumeLiquid(Liquids.arkycite, 40f / 60f);
14711469
consumeItem(Items.graphite);
14721470
consumePower(2f);
@@ -2804,6 +2802,28 @@ public static void load(){
28042802
ambientSoundVolume = 0.04f;
28052803
}};
28062804

2805+
largeCliffCrusher = new WallCrafter("large-cliff-crusher"){{
2806+
requirements(Category.production, with(Items.silicon, 80, Items.surgeAlloy, 60, Items.beryllium, 100, Items.tungsten, 50));
2807+
consumePower(30 / 60f);
2808+
2809+
drillTime = 50f;
2810+
size = 3;
2811+
attribute = Attribute.sand;
2812+
output = Items.sand;
2813+
fogRadius = 3;
2814+
ambientSound = Sounds.drill;
2815+
ambientSoundVolume = 0.05f;
2816+
2817+
consumeLiquid(Liquids.ozone, 1f / 60f);
2818+
2819+
itemConsumer = consumeItem(Items.tungsten).boost();
2820+
itemCapacity = 20;
2821+
boostItemUseTime = 60f * 10f;
2822+
2823+
//alternatively, boost using nitrogen:
2824+
//consumeLiquid(Liquids.nitrogen, 3f / 60f).boost();
2825+
}};
2826+
28072827
plasmaBore = new BeamDrill("plasma-bore"){{
28082828
requirements(Category.production, with(Items.beryllium, 40));
28092829
consumePower(0.15f);
@@ -2818,7 +2838,6 @@ public static void load(){
28182838
consumeLiquid(Liquids.hydrogen, 0.25f / 60f).boost();
28192839
}};
28202840

2821-
//TODO awful name
28222841
largePlasmaBore = new BeamDrill("large-plasma-bore"){{
28232842
requirements(Category.production, with(Items.silicon, 100, Items.oxide, 25, Items.beryllium, 100, Items.tungsten, 70));
28242843
consumePower(0.8f);
@@ -4035,7 +4054,7 @@ Items.carbide, new BasicBulletType(12f, 400f/0.75f){{
40354054
shootEffect = sfe;
40364055
smokeEffect = Fx.shootBigSmoke;
40374056
ammoMultiplier = 1;
4038-
reloadMultiplier = 0.67f;
4057+
reloadMultiplier = 0.7f;
40394058
hitColor = backColor = trailColor = Color.valueOf("ab8ec5");
40404059
frontColor = Color.white;
40414060
trailWidth = 2.2f;
@@ -4047,6 +4066,7 @@ Items.carbide, new BasicBulletType(12f, 400f/0.75f){{
40474066
buildingDamageMultiplier = 0.3f;
40484067
targetBlocks = false;
40494068
targetMissiles = false;
4069+
trailRotation = true;
40504070
}}
40514071
);
40524072

@@ -4213,7 +4233,6 @@ Items.silicon, new BasicBulletType(8f, 33){{
42134233
shootSound = Sounds.none;
42144234
loopSoundVolume = 1f;
42154235

4216-
//TODO balance, set up, where is liquid/sec displayed? status effects maybe?
42174236
ammo(
42184237
Liquids.ozone, new ContinuousFlameBulletType(){{
42194238
damage = 60f;
@@ -4291,8 +4310,8 @@ Items.carbide, new ArtilleryBulletType(2.5f, 500, "shell"){{
42914310
height = 19f;
42924311
width = 17f;
42934312
splashDamageRadius = 55f;
4294-
splashDamage = 600f;
4295-
rangeChange = 8f*8f;
4313+
splashDamage = 650f;
4314+
rangeChange = 10f*8f;
42964315
scaledSplashDamage = true;
42974316
backColor = hitColor = trailColor = Color.valueOf("ab8ec5");
42984317
frontColor = Color.white;
@@ -4317,6 +4336,41 @@ Items.carbide, new ArtilleryBulletType(2.5f, 500, "shell"){{
43174336
shrinkX = 0.2f;
43184337
shrinkY = 0.1f;
43194338
buildingDamageMultiplier = 0.3f;
4339+
}},
4340+
Items.oxide, new ArtilleryBulletType(2.5f, 300, "shell"){{
4341+
hitEffect = new MultiEffect(Fx.titanExplosionLarge, Fx.titanSmokeLarge);
4342+
despawnEffect = Fx.none;
4343+
knockback = 2f;
4344+
lifetime = 190f;
4345+
height = 19f;
4346+
width = 17f;
4347+
reloadMultiplier = 0.8f;
4348+
splashDamageRadius = 110f;
4349+
rangeChange = 8f;
4350+
splashDamage = 300f;
4351+
scaledSplashDamage = true;
4352+
hitColor = backColor = trailColor = Color.valueOf("a0b380");
4353+
frontColor = Color.valueOf("e4ffd6");
4354+
ammoMultiplier = 1f;
4355+
hitSound = Sounds.titanExplosion;
4356+
4357+
status = StatusEffects.blasted;
4358+
4359+
trailLength = 32;
4360+
trailWidth = 3.35f;
4361+
trailSinScl = 2.5f;
4362+
trailSinMag = 0.5f;
4363+
trailEffect = Fx.vapor;
4364+
trailInterval = 3f;
4365+
despawnShake = 7f;
4366+
4367+
shootEffect = Fx.shootTitan;
4368+
smokeEffect = Fx.shootSmokeTitan;
4369+
4370+
trailInterp = v -> Math.max(Mathf.slope(v), 0.8f);
4371+
shrinkX = 0.2f;
4372+
shrinkY = 0.1f;
4373+
buildingDamageMultiplier = 0.25f;
43204374
}}
43214375
);
43224376

@@ -4633,7 +4687,6 @@ Items.carbide, new ArtilleryBulletType(2.5f, 500, "shell"){{
46334687
range = 250f;
46344688
scaledHealth = 210;
46354689

4636-
//TODO is this a good idea to begin with?
46374690
unitSort = UnitSorts.strongest;
46384691

46394692
consumeLiquid(Liquids.nitrogen, 6f / 60f);

core/src/mindustry/content/Fx.java

+37-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class Fx{
2828
public static final Effect
2929

3030
none = new Effect(0, 0f, e -> {}),
31-
31+
3232
blockCrash = new Effect(90f, e -> {
3333
if(!(e.data instanceof Block block)) return;
3434

@@ -445,6 +445,20 @@ public class Fx{
445445
}
446446
}),
447447

448+
titanExplosionLarge = new Effect(45f, 220f, e -> {
449+
color(e.color);
450+
stroke(e.fout() * 3f);
451+
float circleRad = 6f + e.finpow() * 110f;
452+
Lines.circle(e.x, e.y, circleRad);
453+
454+
rand.setSeed(e.id);
455+
for(int i = 0; i < 21; i++){
456+
float angle = rand.random(360f);
457+
float lenRand = rand.random(0.5f, 1f);
458+
Lines.lineAngle(e.x, e.y, angle, e.foutpow() * 50f * rand.random(1f, 0.6f) + 2f, e.finpow() * 100f * lenRand + 6f);
459+
}
460+
}),
461+
448462
titanSmoke = new Effect(300f, 300f, b -> {
449463
float intensity = 3f;
450464

@@ -465,6 +479,26 @@ public class Fx{
465479
}
466480
}),
467481

482+
titanSmokeLarge = new Effect(400f, 400f, b -> {
483+
float intensity = 4f;
484+
485+
color(b.color, 0.65f);
486+
for(int i = 0; i < 4; i++){
487+
rand.setSeed(b.id*2 + i);
488+
float lenScl = rand.random(0.5f, 1f);
489+
int fi = i;
490+
b.scaled(b.lifetime * lenScl, e -> {
491+
randLenVectors(e.id + fi - 1, e.fin(Interp.pow10Out), (int)(2.9f * intensity), 26f * intensity, (x, y, in, out) -> {
492+
float fout = e.fout(Interp.pow5Out) * rand.random(0.5f, 1f);
493+
float rad = fout * ((2f + intensity) * 2.35f);
494+
495+
Fill.circle(e.x + x, e.y + y, rad);
496+
Drawf.light(e.x + x, e.y + y, rad * 2.5f, b.color, 0.5f);
497+
});
498+
});
499+
}
500+
}),
501+
468502
missileTrailSmoke = new Effect(180f, 300f, b -> {
469503
float intensity = 2f;
470504

@@ -761,7 +795,7 @@ public class Fx{
761795
Fill.circle(e.x + x, e.y + y, e.fout() * 2f);
762796
});
763797
}),
764-
798+
765799
hitLaserBlast = new Effect(12, e -> {
766800
color(e.color);
767801
stroke(e.fout() * 1.5f);
@@ -1114,7 +1148,7 @@ public class Fx{
11141148
stroke(2f * e.fout());
11151149
Lines.circle(e.x, e.y, 5f * e.fout());
11161150
}),
1117-
1151+
11181152
forceShrink = new Effect(20, e -> {
11191153
color(e.color, e.fout());
11201154
if(renderer.animateShields){

core/src/mindustry/entities/bullet/ArtilleryBulletType.java

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ public ArtilleryBulletType(float speed, float damage, String bulletSprite){
1313
collides = false;
1414
collidesAir = false;
1515
scaleLife = true;
16-
trailRotation = false;
1716
hitShake = 1f;
1817
hitSound = Sounds.explosion;
1918
hitEffect = Fx.flakExplosion;

core/src/mindustry/world/blocks/defense/turrets/Turret.java

+15
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ public class TurretBuild extends ReloadTurretBuild implements ControlBlock{
239239
public float heatReq;
240240
public float[] sideHeat = new float[4];
241241

242+
float lastRangeChange;
243+
242244
@Override
243245
public float estimateDps(){
244246
if(!hasAmmo()) return 0f;
@@ -316,6 +318,11 @@ public double sense(LAccess sensor){
316318
};
317319
}
318320

321+
@Override
322+
public float fogRadius(){
323+
return (range + (hasAmmo() ? peekAmmo().rangeChange : 0f)) / tilesize * fogRadiusMultiplier;
324+
}
325+
319326
@Override
320327
public float progress(){
321328
return Mathf.clamp(reloadCounter / reload);
@@ -415,6 +422,14 @@ public void updateTile(){
415422
//turret always reloads regardless of whether it's targeting something
416423
updateReload();
417424

425+
if(state.rules.fog){
426+
float newRange = hasAmmo() ? peekAmmo().rangeChange : 0f;
427+
if(newRange != lastRangeChange){
428+
lastRangeChange = newRange;
429+
fogControl.forceUpdate(team, this);
430+
}
431+
}
432+
418433
if(hasAmmo()){
419434
if(Float.isNaN(reloadCounter)) reloadCounter = 0;
420435

0 commit comments

Comments
 (0)