mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
Mining color alternative
This commit is contained in:
@@ -2505,26 +2505,33 @@ public class Fx{
|
||||
}),
|
||||
|
||||
pulverizeRed = new Effect(40, e -> {
|
||||
color(Pal.redDust, Pal.stoneGray, e.fin());
|
||||
randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> {
|
||||
color(Pal.redDust, Pal.stoneGray, e.fin());
|
||||
Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45);
|
||||
});
|
||||
}),
|
||||
|
||||
pulverizeSmall = new Effect(30, e -> {
|
||||
color(Pal.stoneGray);
|
||||
randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> {
|
||||
color(Pal.stoneGray);
|
||||
Fill.square(e.x + x, e.y + y, e.fout() + 0.5f, 45);
|
||||
});
|
||||
}),
|
||||
|
||||
pulverizeMedium = new Effect(30, e -> {
|
||||
color(Pal.stoneGray);
|
||||
randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> {
|
||||
color(Pal.stoneGray);
|
||||
Fill.square(e.x + x, e.y + y, e.fout() + 0.5f, 45);
|
||||
});
|
||||
}),
|
||||
|
||||
unitMine = new Effect(30, e -> {
|
||||
color(e.color, Pal.stoneGray, e.finpowdown());
|
||||
randLenVectors(e.id, 4, e.fin() * 6f, (x, y) -> {
|
||||
Fill.square(e.x + x, e.y + y, e.fout() * 1.3f + 0.4f, 45);
|
||||
});
|
||||
}),
|
||||
|
||||
producesmoke = new Effect(12, e -> {
|
||||
randLenVectors(e.id, 8, 4f + e.fin() * 18f, (x, y) -> {
|
||||
color(Color.white, Pal.accent, e.fin());
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
package mindustry.entities.comp;
|
||||
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.input.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
@@ -91,8 +87,8 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
|
||||
}else if(mining() && item != null){
|
||||
mineTimer += Time.delta * type.mineSpeed * state.rules.unitMineSpeed(team());
|
||||
|
||||
if(Mathf.chance(0.06 * Time.delta)){
|
||||
Fx.pulverizeSmall.at(mineTile.worldx() + Mathf.range(tilesize / 2f), mineTile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color);
|
||||
if(Mathf.chance(0.07 * Time.delta)){
|
||||
Fx.unitMine.at(mineTile.worldx() + Mathf.range(tilesize / 2f), mineTile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color);
|
||||
}
|
||||
|
||||
if(mineTimer >= 50f + (type.mineHardnessScaling ? item.hardness*15f : 15f)){
|
||||
|
||||
@@ -92,12 +92,8 @@ public class NuclearReactor extends PowerGenerator{
|
||||
stats.add(Stat.productionTime, itemDuration / 60f, StatUnit.seconds);
|
||||
}
|
||||
if(heatOutput > 0f && (ui != null && (ui.planet.isShown() ? ui.planet.state.planet : state.isGame() ? state.getPlanet() : null) == Planets.erekir)){
|
||||
stats.add(Stat.output, table -> {
|
||||
//using StatUnit.localized() strips the icon
|
||||
String unit = "[red]" + Iconc.waves + "[] " + Strings.fixed(heatOutput, 0) + " " + Core.bundle.get("unit.heatunitsperside");
|
||||
|
||||
table.add(Core.bundle.format("bar.upto", unit));
|
||||
});
|
||||
//using StatUnit.localized() strips the icon
|
||||
stats.add(Stat.output, table -> table.add(Core.bundle.format("bar.upto", "[red]" + Iconc.waves + "[] " + Strings.fixed(heatOutput, 0) + " " + Core.bundle.get("unit.heatunitsperside"))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user