mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-11 15:56:21 +02:00
한국어 번들 정리/버그 수정/사거리 표시 개선
This commit is contained in:
@@ -38,6 +38,7 @@ public class OverDrawer {
|
||||
float rot = i * 90f + 45f + (-Time.time) % 360f;
|
||||
Draw.rect("select-arrow", target.x() + Angles.trnsx(rot, length), target.y() + Angles.trnsy(rot, length), length / 1.9f, length / 1.9f, rot - 135f);
|
||||
}
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
if(settings.getBool("distanceLine")) {
|
||||
@@ -65,6 +66,7 @@ public class OverDrawer {
|
||||
//global drawing, which needs camera-clipping
|
||||
Core.camera.bounds(Tmp.r1);
|
||||
for(OverDraw drawer : OverDraws.all) drawer.draw();
|
||||
Draw.reset();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ public class OverDraw {
|
||||
public void displayStats(Table parent) {
|
||||
if(options.isEmpty()) return;
|
||||
parent.background(Styles.squarei.up);
|
||||
|
||||
options.each(name-> parent.check(bundle.get("setting."+name+".name"), settings.getBool(name), b->settings.put(name, b)).tooltip(t->t.background(Styles.black8).add(bundle.get("setting."+name+".description"))).disabled(!enabled).row());
|
||||
parent.left();
|
||||
options.each(name-> parent
|
||||
.check(bundle.get("setting."+name+".name"), settings.getBool(name), b->settings.put(name, b))
|
||||
.tooltip(t->t.background(Styles.black8).add(bundle.get("setting."+name+".description")))
|
||||
.disabled(!enabled)
|
||||
.left().row());
|
||||
}
|
||||
|
||||
public void draw() {}
|
||||
|
||||
@@ -8,6 +8,7 @@ import mindustry.Vars;
|
||||
import mindustry.game.Team;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.Drawf;
|
||||
import mindustry.graphics.Pal;
|
||||
import mindustry.type.Weapon;
|
||||
import mindustry.world.blocks.defense.turrets.*;
|
||||
|
||||
@@ -24,6 +25,7 @@ public class RangeDraw extends OverDraw {
|
||||
registerOption("blockRange");
|
||||
registerOption("unitRange");
|
||||
registerOption("aliceRange");
|
||||
registerOption("invalidRange");
|
||||
registerOption("airRange");
|
||||
registerOption("groundRange");
|
||||
}
|
||||
@@ -44,6 +46,7 @@ public class RangeDraw extends OverDraw {
|
||||
|
||||
boolean includeBlock = settings.getBool("blockRange"),
|
||||
includeUnit = settings.getBool("unitRange"),
|
||||
includeInvalid = settings.getBool("invalidRange"),
|
||||
includeAir = settings.getBool("airRange"), isAir = target == null || target.isFlying(),
|
||||
includeGround = settings.getBool("groundRange"), isGround = target == null || !target.isFlying(),
|
||||
includeAlice = settings.getBool("aliceRange"),
|
||||
@@ -59,7 +62,7 @@ public class RangeDraw extends OverDraw {
|
||||
if(includeBlock) {
|
||||
for(Building building : Groups.build) {
|
||||
if(!((includeAlice || player.team() != building.team)
|
||||
&& building instanceof BaseTurret.BaseTurretBuild turret && isInCamera(building.x, building.y, turret.range()))) continue;
|
||||
&& building instanceof BaseTurret.BaseTurretBuild turret && isInCamera(building.x, building.y, turret.range() * 2))) continue;
|
||||
|
||||
boolean valid = false;
|
||||
if (building instanceof Turret.TurretBuild turretBuild) {
|
||||
@@ -76,6 +79,8 @@ public class RangeDraw extends OverDraw {
|
||||
&& tractorBeamBuild.canConsume()) valid = true;
|
||||
}
|
||||
|
||||
if(!includeInvalid && !valid) continue;
|
||||
|
||||
//non-base teams are considered as crux
|
||||
int index = valid ? building.team.id > 5 ? 2 : building.team.id : 0;
|
||||
float range = turret.range();
|
||||
@@ -84,12 +89,13 @@ public class RangeDraw extends OverDraw {
|
||||
Draw.z(166+(Team.baseTeams.length-index)*3);
|
||||
Fill.poly(building.x, building.y, Lines.circleVertices(range), range);
|
||||
} else Drawf.dashCircle(building.x, building.y, range, Team.baseTeams[index].color);
|
||||
Draw.reset();
|
||||
}
|
||||
}
|
||||
|
||||
if(includeUnit) {
|
||||
for(Unit unit : Groups.unit) {
|
||||
if(!((includeAlice || player.team() != unit.team) && isInCamera(unit.x, unit.y, unit.range()))) continue;
|
||||
if(!((includeAlice || player.team() != unit.team) && isInCamera(unit.x, unit.y, unit.range() * 2))) continue;
|
||||
|
||||
boolean valid = false;
|
||||
if (target == null) valid = true;
|
||||
@@ -98,14 +104,17 @@ public class RangeDraw extends OverDraw {
|
||||
|| (unit.type.targetGround && isGround && includeGround))
|
||||
&& unit.canShoot()) valid = true;
|
||||
|
||||
if(!includeInvalid && !valid) continue;
|
||||
|
||||
//non-base teams are considered as crux
|
||||
int index = valid ? unit.team.id > 5 ? 2 : unit.team.id : 0;
|
||||
float range = unit.range();
|
||||
Draw.color(Team.baseTeams[index].color);
|
||||
Draw.color(Team.baseTeams[index].color.cpy().shiftSaturation(0.25f));
|
||||
if (shader) {
|
||||
Draw.z(166 + (Team.baseTeams.length - index) * 3);
|
||||
Fill.poly(unit.x, unit.y, Lines.circleVertices(range), range);
|
||||
} else Drawf.dashCircle(unit.x, unit.y, range, Team.baseTeams[index].color);
|
||||
Draw.color();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ public class ToolWindow extends Window implements Updatable {
|
||||
if(selected==null) return;
|
||||
tool.top();
|
||||
tool.table(Tex.underline2, label->label.add(selected.name).color(Pal.accent)).row();
|
||||
tool.table(des-> selected.displayStats(des)).name("unit-stats").row();
|
||||
tool.check("enable", selected.enabled, c->{
|
||||
tool.table(des-> selected.displayStats(des)).name("unit-stats").left().row();
|
||||
tool.check("@mod.enable", selected.enabled, c->{
|
||||
selected.enabled=c;
|
||||
selected.onEnabled(find("unit-stats"));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user