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