mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 12:09:27 +02:00
1.5.2v release
This commit is contained in:
@@ -30,9 +30,9 @@ import static arc.Core.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class BarInfo {
|
||||
static Seq<String> strings = Seq.with("","","","","","");
|
||||
static FloatSeq numbers = FloatSeq.with(0f,0f,0f,0f,0f,0f);
|
||||
static Seq<Color> colors = Seq.with(Color.clear,Color.clear,Color.clear,Color.clear,Color.clear,Color.clear);
|
||||
public static Seq<String> strings = Seq.with("","","","","","");
|
||||
public static FloatSeq numbers = FloatSeq.with(0f,0f,0f,0f,0f,0f);
|
||||
public static Seq<Color> colors = Seq.with(Color.clear,Color.clear,Color.clear,Color.clear,Color.clear,Color.clear);
|
||||
|
||||
public static <T extends Teamc> void getInfo(T target) throws IllegalAccessException, NoSuchFieldException {
|
||||
for(int i = 0; i < 6; i++) { //init
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,8 +39,6 @@ public class Main extends Mod {
|
||||
Events.on(ClientLoadEvent.class, e -> {
|
||||
new SettingS().init();
|
||||
hud = new HudUi();
|
||||
hud.addWaveTable();
|
||||
hud.addUnitTable();
|
||||
hud.addTable();
|
||||
hud.addWaveInfoTable();
|
||||
hud.addSchemTable();
|
||||
@@ -48,68 +46,5 @@ public class Main extends Mod {
|
||||
OverDrawer.setEvent();
|
||||
if(jsonGen) ContentJSON.save();
|
||||
});
|
||||
|
||||
Events.on(WorldLoadEvent.class, e -> {
|
||||
hud = new HudUi();
|
||||
hud.addWaveTable();
|
||||
});
|
||||
|
||||
Events.on(WaveEvent.class, e -> {
|
||||
Vars.ui.hudGroup.removeChild(hud.waveTable);
|
||||
hud = new HudUi();
|
||||
hud.addWaveTable();
|
||||
});
|
||||
|
||||
Events.run(Trigger.update, () -> {
|
||||
if((input.keyDown(KeyCode.shiftRight) || input.keyDown(KeyCode.shiftLeft))){
|
||||
if(input.keyTap(KeyCode.h)) {
|
||||
mmid_playMusicSeq(mmid_parseMusicString(Fi.get("C:/Users/user/Desktop/test/output.txt").readString()), null);
|
||||
};
|
||||
if(input.keyTap(KeyCode.c)) {
|
||||
schedules.each(Timer.Task::cancel);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Seq<Float[]> mmid_parseMusicString(String s) {
|
||||
String[] notes = s.split(";");
|
||||
Seq<Float[]> output = new Seq();
|
||||
for (String value : notes) {
|
||||
String[] note = value.split(",");
|
||||
if (note.length > 0) {
|
||||
output.add(new Float[]{
|
||||
Float.parseFloat(note[0]),
|
||||
(note.length < 2 || note[1] == null) ? 0 : Float.parseFloat(note[1]),
|
||||
(note.length < 3 || note[2] == null) ? 0 : Float.parseFloat(note[2]),
|
||||
(note.length < 4 || note[3] == null) ? 1 : Float.parseFloat(note[3]),
|
||||
(note.length < 5 || note[4] == null) ? 0 : Float.parseFloat(note[4])
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.info(output);
|
||||
return output;
|
||||
};
|
||||
|
||||
Seq<Timer.Task> schedules = new Seq<>();
|
||||
void mmid_playMusicSeq(Seq<Float[]> s, @Nullable Player p) {
|
||||
Object[][] mmid_instruments = { //Sound, pitch, volume
|
||||
{Sounds.minebeam, 0.98f, 20f},
|
||||
{Sounds.minebeam, 2.2f, 0.5f}};
|
||||
|
||||
s.each(n-> {
|
||||
schedules.add(Timer.schedule(() -> {
|
||||
Log.info(mmid_instruments[n[2].intValue()][0].toString() + " sound is called");
|
||||
if(p == null || p.con == null) Call.sound(
|
||||
(Sound)mmid_instruments[n[2].intValue()][0],
|
||||
n[3]*(float)mmid_instruments[n[2].intValue()][2],
|
||||
(float)mmid_instruments[n[2].intValue()][1]*(float)Math.pow(1.0595,n[1]), n[4]);
|
||||
else Call.sound(p.con,
|
||||
(Sound)mmid_instruments[n[2].intValue()][0],
|
||||
n[3]*(float)mmid_instruments[n[2].intValue()][2],
|
||||
(float)mmid_instruments[n[2].intValue()][1]*1f*(float)Math.pow(1.0595,n[1]), n[4]);
|
||||
},n[0]));
|
||||
Log.info("start sound after" + n[0] + "sec");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,14 +48,14 @@ public class OverDrawer {
|
||||
public static int otherCores;
|
||||
public static boolean locked;
|
||||
public static ObjectMap<Team, Seq<Building>> tmpbuildobj = new ObjectMap<>();
|
||||
public static ObjectMap<Team, Seq<Unit>> tmpunitobj = new ObjectMap<>();
|
||||
|
||||
static float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
|
||||
public static void setEvent(){
|
||||
Events.run(EventType.Trigger.draw, () -> {
|
||||
|
||||
|
||||
effectBuffer.resize(graphics.getWidth(), graphics.getHeight());
|
||||
|
||||
float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
|
||||
Draw.drawRange(158, 1f, () -> effectBuffer.begin(Color.clear), () -> {
|
||||
effectBuffer.end();
|
||||
effectBuffer.blit(lineShader);
|
||||
@@ -125,7 +125,7 @@ public class OverDrawer {
|
||||
pathTiles.clear();
|
||||
}
|
||||
});
|
||||
|
||||
Draw.reset();
|
||||
Draw.z(Layer.overlayUI);
|
||||
|
||||
int[] arrows = {0};
|
||||
@@ -203,7 +203,7 @@ public class OverDrawer {
|
||||
Pal.accent, 0.25f * unit.itemTime / Scl.scl(1f), false, Align.center)
|
||||
);
|
||||
|
||||
if(!state.rules.polygonCoreProtection && settings.getBool("coreRange") && player != null){
|
||||
if(!state.rules.polygonCoreProtection && 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))){
|
||||
Draw.color(Color.darkGray);
|
||||
@@ -265,6 +265,8 @@ public class OverDrawer {
|
||||
Unit unit = player.unit();
|
||||
tmpbuildobj.clear();
|
||||
for(int i = 0; i < Team.baseTeams.length; i++){
|
||||
if(!settings.getBool("aliceRange") && player.team() == Team.baseTeams[i]) continue;
|
||||
|
||||
int finalI = i;
|
||||
tmpbuildobj.put(Team.baseTeams[i], Groups.build.copy(new Seq<Building>()).filter(b -> {
|
||||
if(!(b instanceof BaseTurret.BaseTurretBuild)) return false;
|
||||
@@ -282,7 +284,7 @@ public class OverDrawer {
|
||||
}));
|
||||
}
|
||||
tmpbuildobj.each((t, bseq) -> {
|
||||
Draw.drawRange(166+t.id*3, 1, () -> effectBuffer.begin(Color.clear), () -> {
|
||||
if(settings.getBool("RangeShader")) Draw.drawRange(166+t.id*3, 1, () -> effectBuffer.begin(Color.clear), () -> {
|
||||
effectBuffer.end();
|
||||
effectBuffer.blit(turretRange);
|
||||
});
|
||||
@@ -293,10 +295,11 @@ public class OverDrawer {
|
||||
Draw.z(166+t.id*3);
|
||||
Fill.poly(b.x, b.y, Lines.circleVertices(range), range);
|
||||
}
|
||||
else Lines.circle(b.x, b.y, range);
|
||||
else Drawf.dashCircle(b.x, b.y, range, t.color);
|
||||
});
|
||||
});
|
||||
}
|
||||
Draw.reset();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -113,13 +113,14 @@ public class SettingS {
|
||||
addGraphicCheckSetting("infoui", true, tapSeq);
|
||||
addGraphicCheckSetting("pastwave", false, tapSeq);
|
||||
addGraphicCheckSetting("emptywave", true, tapSeq);
|
||||
addGraphicCheckSetting("itemcal", false, tapSeq);
|
||||
|
||||
Seq<SharSetting> rangeSeq = new Seq<>();
|
||||
addGraphicTypeSetting("rangeRadius", 0, 500, 70, true, () -> true, s -> s + "tiles", rangeSeq);
|
||||
addGraphicCheckSetting("rangeNearby", true, rangeSeq);
|
||||
addGraphicCheckSetting("allTargetRange", false, rangeSeq);
|
||||
addGraphicCheckSetting("coreRange", false, rangeSeq);
|
||||
addGraphicCheckSetting("RangeShader", true, rangeSeq);
|
||||
addGraphicCheckSetting("aliceRange", false, rangeSeq);
|
||||
addGraphicCheckSetting("RangeShader", false, rangeSeq);
|
||||
|
||||
Seq<SharSetting> opacitySeq = new Seq<>();
|
||||
addGraphicSlideSetting("selectopacity", 50, 0, 100, 5, s -> s + "%", opacitySeq);
|
||||
|
||||
Reference in New Issue
Block a user