mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 11:10:50 +03:00
Generator explosion tweaks
This commit is contained in:
@@ -2529,7 +2529,7 @@ public class Blocks{
|
|||||||
|
|
||||||
explosionShake = 1f;
|
explosionShake = 1f;
|
||||||
explosionScorchSize = 1;
|
explosionScorchSize = 1;
|
||||||
explosionIgnitionChance = 0.2f;
|
explosionFireballs = 3;
|
||||||
|
|
||||||
consume(new ConsumeItemFlammable());
|
consume(new ConsumeItemFlammable());
|
||||||
consume(new ConsumeItemExplode());
|
consume(new ConsumeItemExplode());
|
||||||
@@ -2563,7 +2563,7 @@ public class Blocks{
|
|||||||
|
|
||||||
explosionShake = 1f;
|
explosionShake = 1f;
|
||||||
explosionScorchSize = 2;
|
explosionScorchSize = 2;
|
||||||
explosionIgnitionChance = 0.2f;
|
explosionFireballs = 6;
|
||||||
|
|
||||||
consume(new ConsumeItemFlammable());
|
consume(new ConsumeItemFlammable());
|
||||||
consume(new ConsumeItemExplode());
|
consume(new ConsumeItemExplode());
|
||||||
@@ -2639,6 +2639,7 @@ public class Blocks{
|
|||||||
explosionShake = 4f;
|
explosionShake = 4f;
|
||||||
explosionScorchSize = 8;
|
explosionScorchSize = 8;
|
||||||
explosionIgnitionChance = 0.5f;
|
explosionIgnitionChance = 0.5f;
|
||||||
|
explosionFireballs = 11;
|
||||||
|
|
||||||
consumeItem(Items.thorium);
|
consumeItem(Items.thorium);
|
||||||
consumeLiquid(Liquids.cryofluid, heating / coolantPower).update(false);
|
consumeLiquid(Liquids.cryofluid, heating / coolantPower).update(false);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import mindustry.*;
|
|||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
@@ -49,7 +50,9 @@ public class PowerGenerator extends PowerDistributor{
|
|||||||
/** If true, the ignition chance decreases with distance. */
|
/** If true, the ignition chance decreases with distance. */
|
||||||
public boolean explosionScaleIgnitionChance = true;
|
public boolean explosionScaleIgnitionChance = true;
|
||||||
/** The speed at which ignition spreads. */
|
/** The speed at which ignition spreads. */
|
||||||
public float explosionSpeed = 0.5f;
|
public float explosionSpeed = 0.4f;
|
||||||
|
/** Extra number of fireballs spawned from explosions. */
|
||||||
|
public int explosionFireballs = 0;
|
||||||
|
|
||||||
public PowerGenerator(String name){
|
public PowerGenerator(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -163,6 +166,13 @@ public class PowerGenerator extends PowerDistributor{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(explosionFireballs > 0){
|
||||||
|
int amount = Mathf.random(1, explosionFireballs);
|
||||||
|
for(int i = 0; i < amount; i++){
|
||||||
|
Bullets.fireball.createNet(Team.derelict, x, y, Mathf.random(360f), -1f, Mathf.random(0.5f, 1f), 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
explodeEffect.at(this);
|
explodeEffect.at(this);
|
||||||
explodeSound.at(this);
|
explodeSound.at(this);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user