mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-31 18:04:21 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4e3f7eccae
@ -1,6 +1,7 @@
|
||||
package mindustry.world.blocks.power;
|
||||
|
||||
import arc.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@ -27,6 +28,7 @@ public class ImpactReactor extends PowerGenerator{
|
||||
public int explosionRadius = 23;
|
||||
public int explosionDamage = 1900;
|
||||
public Effect explodeEffect = Fx.impactReactorExplosion;
|
||||
public Sound explodeSound = Sounds.explosionbig;
|
||||
|
||||
public Color plasma1 = Color.valueOf("ffd06b"), plasma2 = Color.valueOf("ff361b");
|
||||
|
||||
@ -145,12 +147,11 @@ public class ImpactReactor extends PowerGenerator{
|
||||
|
||||
if(warmup < 0.3f || !state.rules.reactorExplosions) return;
|
||||
|
||||
Sounds.explosionbig.at(this);
|
||||
|
||||
Damage.damage(x, y, explosionRadius * tilesize, explosionDamage * 4);
|
||||
|
||||
Effect.shake(6f, 16f, x, y);
|
||||
explodeEffect.at(x, y);
|
||||
explodeEffect.at(this);
|
||||
explodeSound.at(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,7 @@
|
||||
package mindustry.world.blocks.power;
|
||||
|
||||
import arc.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@ -30,6 +31,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
public Color coolColor = new Color(1, 1, 1, 0f);
|
||||
public Color hotColor = Color.valueOf("ff9575a3");
|
||||
public Effect explodeEffect = Fx.reactorExplosion;
|
||||
public Sound explodeSound = Sounds.explosionbig;
|
||||
/** ticks to consume 1 fuel */
|
||||
public float itemDuration = 120;
|
||||
/** heating per frame * fullness */
|
||||
@ -128,8 +130,6 @@ public class NuclearReactor extends PowerGenerator{
|
||||
public void onDestroyed(){
|
||||
super.onDestroyed();
|
||||
|
||||
Sounds.explosionbig.at(this);
|
||||
|
||||
int fuel = items.get(fuelItem);
|
||||
|
||||
if((fuel < 5 && heat < 0.5f) || !state.rules.reactorExplosions) return;
|
||||
@ -138,7 +138,8 @@ public class NuclearReactor extends PowerGenerator{
|
||||
// * ((float)fuel / itemCapacity) to scale based on fullness
|
||||
Damage.damage(x, y, explosionRadius * tilesize, explosionDamage * 4);
|
||||
|
||||
explodeEffect.at(x, y);
|
||||
explodeEffect.at(this);
|
||||
explodeSound.at(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user