mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
Generator explosion tweaks
This commit is contained in:
@@ -2529,7 +2529,7 @@ public class Blocks{
|
||||
|
||||
explosionShake = 1f;
|
||||
explosionScorchSize = 1;
|
||||
explosionIgnitionChance = 0.2f;
|
||||
explosionFireballs = 3;
|
||||
|
||||
consume(new ConsumeItemFlammable());
|
||||
consume(new ConsumeItemExplode());
|
||||
@@ -2563,7 +2563,7 @@ public class Blocks{
|
||||
|
||||
explosionShake = 1f;
|
||||
explosionScorchSize = 2;
|
||||
explosionIgnitionChance = 0.2f;
|
||||
explosionFireballs = 6;
|
||||
|
||||
consume(new ConsumeItemFlammable());
|
||||
consume(new ConsumeItemExplode());
|
||||
@@ -2639,6 +2639,7 @@ public class Blocks{
|
||||
explosionShake = 4f;
|
||||
explosionScorchSize = 8;
|
||||
explosionIgnitionChance = 0.5f;
|
||||
explosionFireballs = 11;
|
||||
|
||||
consumeItem(Items.thorium);
|
||||
consumeLiquid(Liquids.cryofluid, heating / coolantPower).update(false);
|
||||
|
||||
@@ -12,6 +12,7 @@ import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
@@ -49,7 +50,9 @@ public class PowerGenerator extends PowerDistributor{
|
||||
/** If true, the ignition chance decreases with distance. */
|
||||
public boolean explosionScaleIgnitionChance = true;
|
||||
/** 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){
|
||||
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);
|
||||
explodeSound.at(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user