Fixed nuclear reactor not exploding properly
This commit is contained in:
@@ -224,10 +224,12 @@ public class Damage{
|
||||
//apply damage to entity if needed
|
||||
if(tile.entity != null && tile.getTeam() != team){
|
||||
int health = (int)tile.entity.health;
|
||||
tile.entity.damage(scaledDamage);
|
||||
scaledDamage -= health;
|
||||
if(tile.entity.health > 0){
|
||||
tile.entity.damage(scaledDamage);
|
||||
scaledDamage -= health;
|
||||
|
||||
if(scaledDamage <= 0) continue;
|
||||
if(scaledDamage <= 0) continue;
|
||||
}
|
||||
}
|
||||
|
||||
for(Point2 p : Geometry.d4){
|
||||
|
||||
@@ -27,8 +27,8 @@ public class ImpactReactor extends PowerGenerator{
|
||||
protected int plasmas = 4;
|
||||
protected float warmupSpeed = 0.001f;
|
||||
protected float itemDuration = 60f;
|
||||
protected int explosionRadius = 30;
|
||||
protected int explosionDamage = 180;
|
||||
protected int explosionRadius = 40;
|
||||
protected int explosionDamage = 2000;
|
||||
|
||||
protected Color plasma1 = Color.valueOf("ffd06b"), plasma2 = Color.valueOf("ff361b");
|
||||
protected Color ind1 = Color.valueOf("858585"), ind2 = Color.valueOf("fea080");
|
||||
|
||||
@@ -34,8 +34,8 @@ public class NuclearReactor extends PowerGenerator{
|
||||
protected int itemDuration = 120; //time to consume 1 fuel
|
||||
protected float heating = 0.01f; //heating per frame * fullness
|
||||
protected float smokeThreshold = 0.3f; //threshold at which block starts smoking
|
||||
protected int explosionRadius = 19;
|
||||
protected int explosionDamage = 135;
|
||||
protected int explosionRadius = 30;
|
||||
protected int explosionDamage = 1350;
|
||||
protected float flashThreshold = 0.46f; //heat threshold at which the lights start flashing
|
||||
protected float coolantPower = 0.5f;
|
||||
|
||||
@@ -133,7 +133,6 @@ public class NuclearReactor extends PowerGenerator{
|
||||
|
||||
Damage.damage(tile.worldx(), tile.worldy(), explosionRadius * tilesize, explosionDamage * 4);
|
||||
|
||||
|
||||
for(int i = 0; i < 20; i++){
|
||||
Time.run(Mathf.random(50), () -> {
|
||||
tr.rnd(Mathf.random(40f));
|
||||
|
||||
Reference in New Issue
Block a user