Some visual tweaks
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1644,6 +1644,7 @@ public class Blocks{
|
||||
arrowTimeScl = 2.75f;
|
||||
hasPower = true;
|
||||
pulse = true;
|
||||
envEnabled |= Env.space;
|
||||
consumes.power(0.30f);
|
||||
}};
|
||||
|
||||
|
@ -104,6 +104,8 @@ public class Planets{
|
||||
|
||||
//define launch candidates after all planets initialize
|
||||
serpulo.launchCandidates.add(gier);
|
||||
|
||||
//TODO WHAT IF THERE'S NO TRANSITION??
|
||||
gier.launchCandidates.add(erekir);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,8 @@ import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.world.blocks.defense.MendProjector.*;
|
||||
import mindustry.world.blocks.defense.RegenProjector.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@ -48,11 +50,14 @@ public class SuppressionFieldAbility extends Ability{
|
||||
float prev = build.healSuppressionTime;
|
||||
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)
|
||||
if(!headless && prev - Time.time <= reload/2f){
|
||||
builds.add(build);
|
||||
//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){
|
||||
builds.add(build);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -77,6 +77,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
ConsumeModule cons;
|
||||
|
||||
public transient float healSuppressionTime = -1f;
|
||||
public transient float lastHealTime = -120f * 10f;
|
||||
|
||||
private transient float timeScale = 1f, timeScaleDuration;
|
||||
private transient float dumpAccum;
|
||||
@ -339,6 +340,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
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){
|
||||
return world.build(tile.x + dx, tile.y + dy);
|
||||
}
|
||||
|
@ -106,6 +106,7 @@ public class MendProjector extends Block{
|
||||
|
||||
indexer.eachBlock(this, realRange, b -> b.damaged() && !b.isHealSuppressed(), other -> {
|
||||
other.heal(other.maxHealth() * (healPercent + phaseHeat * phaseBoost) / 100f * efficiency());
|
||||
other.recentlyHealed();
|
||||
Fx.healBlockFull.at(other.x, other.y, other.block.size, baseColor);
|
||||
});
|
||||
}
|
||||
|
@ -134,6 +134,7 @@ public class RegenProjector extends Block{
|
||||
var build = world.build(entry.key);
|
||||
if(build != null){
|
||||
build.heal(entry.value);
|
||||
build.recentlyHealed();
|
||||
}
|
||||
}
|
||||
mendMap.clear();
|
||||
|