mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 12:09:27 +02:00
h
This commit is contained in:
@@ -19,11 +19,10 @@ public class SUtils {
|
||||
|
||||
public static String floatFormat(float number){
|
||||
if(number >= 1000) return UI.formatAmount((long)number);
|
||||
if(String.valueOf(number).split("[.]")[1].matches("0")) return String.valueOf(number).split("[.]")[0];
|
||||
if(String.valueOf(number).length() > 2 && String.valueOf(number).split("[.]")[1].matches("0")) return String.valueOf(number).split("[.]")[0];
|
||||
return Strings.fixed(number, 2);
|
||||
}
|
||||
|
||||
|
||||
public static Object invoke(Object ut, String fieldName) throws IllegalAccessException, NoSuchFieldException {
|
||||
Field field = ut.getClass().getDeclaredField(fieldName);
|
||||
field.setAccessible(true);
|
||||
|
||||
@@ -3,7 +3,9 @@ package UnitInfo;
|
||||
import UnitInfo.core.*;
|
||||
import arc.files.*;
|
||||
import arc.graphics.g2d.TextureRegion;
|
||||
import arc.scene.ui.TextButton;
|
||||
import arc.scene.ui.layout.Scl;
|
||||
import arc.scene.ui.layout.Table;
|
||||
import arc.struct.*;
|
||||
import mindustry.world.Tile;
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ public class Main extends Mod {
|
||||
float range = u.range();
|
||||
float max = range + settings.getInt("rangeRadius") * tilesize;
|
||||
|
||||
if(Vars.player.dst(u) <= max) { // TODO: Store value of rangeRadius as an int, should increase performance
|
||||
if(Vars.player.dst(u) <= max) {
|
||||
if (canHit || settings.getBool("allTargetRange")) // Same as above
|
||||
if(settings.getBool("softRangeDrawing")){
|
||||
Lines.stroke(Scl.scl(), Tmp.c1.set(canHit ? u.team.color : Team.derelict.color).a(0.5f));
|
||||
@@ -235,6 +235,7 @@ public class Main extends Mod {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(!state.rules.polygonCoreProtection && settings.getBool("coreRange") && player != null){
|
||||
state.teams.eachEnemyCore(player.team(), core -> {
|
||||
if(Core.camera.bounds(Tmp.r1).overlaps(Tmp.r2.setCentered(core.x, core.y, state.rules.enemyCoreBuildRadius * 2f))){
|
||||
|
||||
Reference in New Issue
Block a user