Some visual tweaks

This commit is contained in:
Anuken
2022-01-09 19:08:35 -05:00
parent b31098ed87
commit feb1135bcc
11 changed files with 23 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1644,6 +1644,7 @@ public class Blocks{
arrowTimeScl = 2.75f; arrowTimeScl = 2.75f;
hasPower = true; hasPower = true;
pulse = true; pulse = true;
envEnabled |= Env.space;
consumes.power(0.30f); consumes.power(0.30f);
}}; }};

View File

@ -104,6 +104,8 @@ public class Planets{
//define launch candidates after all planets initialize //define launch candidates after all planets initialize
serpulo.launchCandidates.add(gier); serpulo.launchCandidates.add(gier);
//TODO WHAT IF THERE'S NO TRANSITION??
gier.launchCandidates.add(erekir); gier.launchCandidates.add(erekir);
} }

View File

@ -9,6 +9,8 @@ import mindustry.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;
import mindustry.world.blocks.defense.MendProjector.*;
import mindustry.world.blocks.defense.RegenProjector.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
@ -48,11 +50,14 @@ public class SuppressionFieldAbility extends Ability{
float prev = build.healSuppressionTime; float prev = build.healSuppressionTime;
build.applyHealSuppression(reload + 1f); build.applyHealSuppression(reload + 1f);
any = true; //TODO maybe should be block field instead of instanceof check
if(build.wasRecentlyHealed(60f * 12f) || (build instanceof MendBuild || build instanceof RegenProjectorBuild)){
any = true;
//add prev check so ability spam doesn't lead to particle spam (essentially, recently suppressed blocks don't get new particles) //add prev check so ability spam doesn't lead to particle spam (essentially, recently suppressed blocks don't get new particles)
if(!headless && prev - Time.time <= reload/2f){ if(!headless && prev - Time.time <= reload/2f){
builds.add(build); builds.add(build);
}
} }
} }
}); });

View File

@ -77,6 +77,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
ConsumeModule cons; ConsumeModule cons;
public transient float healSuppressionTime = -1f; public transient float healSuppressionTime = -1f;
public transient float lastHealTime = -120f * 10f;
private transient float timeScale = 1f, timeScaleDuration; private transient float timeScale = 1f, timeScaleDuration;
private transient float dumpAccum; private transient float dumpAccum;
@ -339,6 +340,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return Time.time <= healSuppressionTime; return Time.time <= healSuppressionTime;
} }
public void recentlyHealed(){
lastHealTime = Time.time;
}
public boolean wasRecentlyHealed(float duration){
return lastHealTime + duration >= Time.time;
}
public Building nearby(int dx, int dy){ public Building nearby(int dx, int dy){
return world.build(tile.x + dx, tile.y + dy); return world.build(tile.x + dx, tile.y + dy);
} }

View File

@ -106,6 +106,7 @@ public class MendProjector extends Block{
indexer.eachBlock(this, realRange, b -> b.damaged() && !b.isHealSuppressed(), other -> { indexer.eachBlock(this, realRange, b -> b.damaged() && !b.isHealSuppressed(), other -> {
other.heal(other.maxHealth() * (healPercent + phaseHeat * phaseBoost) / 100f * efficiency()); other.heal(other.maxHealth() * (healPercent + phaseHeat * phaseBoost) / 100f * efficiency());
other.recentlyHealed();
Fx.healBlockFull.at(other.x, other.y, other.block.size, baseColor); Fx.healBlockFull.at(other.x, other.y, other.block.size, baseColor);
}); });
} }

View File

@ -134,6 +134,7 @@ public class RegenProjector extends Block{
var build = world.build(entry.key); var build = world.build(entry.key);
if(build != null){ if(build != null){
build.heal(entry.value); build.heal(entry.value);
build.recentlyHealed();
} }
} }
mendMap.clear(); mendMap.clear();