mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
h
This commit is contained in:
@@ -6,9 +6,8 @@ displays on left side, you can change status display by button.
|
||||
|
||||
### Unit Status
|
||||
shows unit name, armor, health, shield, items, commanded units, weapons, ammo and payload amount as possible as.
|
||||
- [ ] shrink size
|
||||
- [x] shrink size
|
||||
- [x] remove command part
|
||||
- [ ] add scroll on weapon part
|
||||
|
||||
### Wave Status
|
||||
shows unit amount for each waves. modifiable showed max wave on graphic setting.
|
||||
@@ -41,7 +40,6 @@ shows every blocks' status(even enemy), some info bars. (suggestion by @nichrosi
|
||||
|
||||
### rendered unit info
|
||||
shows every units' hp, ammo, shield by bar under each unit.
|
||||
- [ ] show more detail info as number
|
||||
|
||||
## Setting
|
||||
can toggle display on/off ingame, set some ui opacity etc.
|
||||
|
||||
@@ -10,7 +10,7 @@ shar-stat.charge = 충전: {0}%
|
||||
shar-stat.itemAmmo = 탄약 : {0} / {1}
|
||||
shar-stat.liquidAmmo = 액체: {0}
|
||||
shar-stat.power = 전력: {0} / {1}
|
||||
shar-stat-waveAmount = [lightgray]수량:[] {0}
|
||||
shar-stat-waveAmount = [lightgray]유닛 수:[] {0}
|
||||
shar-stat-waveShield = [lightgray]방어막:[] {0}
|
||||
shar-stat.waveStatus = [lightgray]상태이상:[]
|
||||
shar-stat.waveItem = [lightgray]아이템:[]
|
||||
|
||||
@@ -8,6 +8,7 @@ import arc.graphics.g2d.*;
|
||||
import arc.input.KeyCode;
|
||||
import arc.math.*;
|
||||
import arc.scene.*;
|
||||
import arc.scene.event.ClickListener;
|
||||
import arc.scene.event.HandCursorListener;
|
||||
import arc.scene.style.*;
|
||||
import arc.scene.ui.*;
|
||||
@@ -28,7 +29,9 @@ import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.defense.turrets.*;
|
||||
import mindustry.world.blocks.power.*;
|
||||
import mindustry.world.blocks.storage.*;
|
||||
import mindustry.world.consumers.*;
|
||||
|
||||
import static arc.Core.*;
|
||||
import static mindustry.Vars.*;
|
||||
@@ -70,7 +73,7 @@ public class HudUi {
|
||||
|
||||
public @Nullable Tile getTile(){
|
||||
return Vars.world.tileWorld(Core.input.mouseWorldX(), Core.input.mouseWorldY());
|
||||
}
|
||||
};
|
||||
|
||||
public void setEvent(){
|
||||
Events.run(EventType.Trigger.draw, () -> {
|
||||
@@ -80,7 +83,7 @@ public class HudUi {
|
||||
for(int i = 0; i < 4; i++){
|
||||
float rot = i * 90f + 45f + (-Time.time) % 360f;
|
||||
float length = unit.hitSize * 1.5f + 2.5f;
|
||||
Draw.color(Tmp.c1.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time, 2f, 1f)).a(settings.getInt("selectopacity") / 100f));
|
||||
Draw.color(Tmp.c1.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time, 2f, 1f)).a(settings.getInt("uiopacity") / 100f));
|
||||
Draw.rect("select-arrow", unit.x + Angles.trnsx(rot, length), unit.y + Angles.trnsy(rot, length), length / 1.9f, length / 1.9f, rot - 135f);
|
||||
Draw.reset();
|
||||
}
|
||||
@@ -411,7 +414,9 @@ public class HudUi {
|
||||
t.left();
|
||||
|
||||
t.add(new Image(){{
|
||||
update(() -> setDrawable(getUnit().stack.item == null || getUnit().stack.amount <= 0 ? Core.atlas.find("clear") : getUnit().stack.item.uiIcon));
|
||||
update(() -> {
|
||||
setDrawable(getUnit().stack.item == null || getUnit().stack.amount <= 0 ? Core.atlas.find("clear") : getUnit().stack.item.uiIcon);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,9 +62,9 @@ public class Main extends Mod {
|
||||
if(Core.settings.getBool("scan")){
|
||||
float range = settings.getInt("rangemax") * 8f;
|
||||
|
||||
for(Team team : Team.all) {
|
||||
for(Team team : Team.all)
|
||||
indexer.eachBlock(team, Core.input.mouseWorldX(), Core.input.mouseWorldY(), range, b -> true, b -> new FreeBar().draw(b));
|
||||
}
|
||||
|
||||
Draw.color(Tmp.c1.set(Pal.accent).a(0.75f + Mathf.absin(3, 0.25f)));
|
||||
Lines.swirl(Core.input.mouseWorldX(), Core.input.mouseWorldY(), range, 0.15f, Time.time % 360);
|
||||
Lines.swirl(Core.input.mouseWorldX(), Core.input.mouseWorldY(), range, 0.15f, 90 + Time.time % 360);
|
||||
@@ -73,17 +73,16 @@ public class Main extends Mod {
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
if(!mobile && !Vars.state.isPaused() && settings.getBool("gaycursor")){
|
||||
if(!mobile && !Vars.state.isPaused() && settings.getBool("gaycursor"))
|
||||
Fx.mine.at(Core.input.mouseWorldX(), Core.input.mouseWorldY(), Tmp.c2.set(Color.red).shiftHue(Time.time * 1.5f));
|
||||
}
|
||||
|
||||
Groups.unit.each(unit -> {
|
||||
Draw.color();
|
||||
Tmp.c1.set(Color.white).lerp(Pal.heal, Mathf.clamp(unit.healTime - unit.hitTime));
|
||||
Draw.mixcol(Tmp.c1, Math.max(unit.hitTime, Mathf.clamp(unit.healTime)));
|
||||
|
||||
if(unit.drownTime > 0 && unit.floorOn().isDeep()){
|
||||
if(unit.drownTime > 0 && unit.floorOn().isDeep())
|
||||
Draw.mixcol(unit.floorOn().mapColor, unit.drownTime * 0.8f);
|
||||
}
|
||||
|
||||
//draw back items
|
||||
if(unit.item() != null && unit.itemTime > 0.01f){
|
||||
float size = (itemSize + Mathf.absin(Time.time, 5f, 1f)) * unit.itemTime;
|
||||
@@ -105,8 +104,7 @@ public class Main extends Mod {
|
||||
Fonts.outline.draw(unit.stack.amount + "",
|
||||
unit.x + Angles.trnsx(unit.rotation + 180f, unit.type.itemOffsetY),
|
||||
unit.y + Angles.trnsy(unit.rotation + 180f, unit.type.itemOffsetY) - 3,
|
||||
Pal.accent, 0.25f * unit.itemTime / Scl.scl(1f), false, Align.center
|
||||
);
|
||||
Pal.accent, 0.25f * unit.itemTime / Scl.scl(1f), false, Align.center);
|
||||
}
|
||||
|
||||
Draw.reset();
|
||||
|
||||
@@ -67,23 +67,6 @@ public class SBar extends Element{
|
||||
});
|
||||
}
|
||||
|
||||
public void reset(float value){
|
||||
this.value = lastValue = blink = value;
|
||||
}
|
||||
|
||||
public void set(Prov<String> name, Floatp fraction, Color color){
|
||||
this.fraction = fraction;
|
||||
this.lastValue = fraction.get();
|
||||
this.blinkColor.set(color);
|
||||
setColor(color);
|
||||
update(() -> this.name = name.get());
|
||||
}
|
||||
|
||||
public SBar blink(Color color){
|
||||
blinkColor.set(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Drawable drawable(String name, int left, int right, int top, int bottom){
|
||||
Drawable out;
|
||||
|
||||
@@ -165,5 +148,6 @@ public class SBar extends Element{
|
||||
font.getData().setScale(Scl.scl());
|
||||
|
||||
Pools.free(lay);
|
||||
Draw.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user