This commit is contained in:
Anuken 2021-01-11 10:11:31 -05:00
parent f188563052
commit c716c16746
3 changed files with 18 additions and 4 deletions

View File

@ -896,7 +896,7 @@ public class Fx{
});
}),
dynamicExplosion = new Effect(30, e -> {
dynamicExplosion = new Effect(30, 100f, e -> {
float intensity = e.rotation;
e.scaled(5 + intensity * 2, i -> {

View File

@ -1,6 +1,7 @@
package mindustry.entities.comp;
import arc.*;
import arc.func.*;
import arc.graphics.*;
import arc.graphics.g2d.*;
import arc.math.*;
@ -136,10 +137,17 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
/** Draw all current build plans. Does not draw the beam effect, only the positions. */
void drawBuildPlans(){
Boolf<BuildPlan> skip = plan -> plan.progress > 0.01f || (buildPlan() == plan && plan.initialized && (within(plan.x * tilesize, plan.y * tilesize, buildingRange) || state.isEditor()));
for(BuildPlan plan : plans){
if(plan.progress > 0.01f || (buildPlan() == plan && plan.initialized && (within(plan.x * tilesize, plan.y * tilesize, buildingRange) || state.isEditor()))) continue;
drawPlan(plan, 1f);
for(int i = 0; i < 2; i++){
for(BuildPlan plan : plans){
if(skip.get(plan)) continue;
if(i == 0){
drawPlan(plan, 1f);
}else{
drawPlanTop(plan, 1f);
}
}
}
Draw.reset();
@ -153,7 +161,11 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
request.block.drawPlan(request, control.input.allRequests(),
Build.validPlace(request.block, team, request.x, request.y, request.rotation) || control.input.requestMatches(request),
alpha);
}
}
void drawPlanTop(BuildPlan request, float alpha){
if(!request.breaking){
Draw.reset();
Draw.mixcol(Color.white, 0.24f + Mathf.absin(Time.globalTime, 6f, 0.28f));
Draw.alpha(alpha);
@ -251,6 +263,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
if(core != null && active && !isLocal() && !(tile.block() instanceof ConstructBlock)){
Draw.z(Layer.plans - 1f);
drawPlan(plan, 0.5f);
drawPlanTop(plan, 0.5f);
Draw.z(Layer.flyingUnit);
}

View File

@ -46,6 +46,7 @@ public class TractorBeamTurret extends BaseTurret{
//disabled due to version mismatch problems
acceptCoolant = false;
expanded = true;
}
@Override