Converted music to mp3 / New tracks / Minor cleanup
This commit is contained in:
@@ -6,6 +6,7 @@ import arc.audio.SoloudAudio.*;
|
||||
import arc.math.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@@ -13,12 +14,14 @@ import static mindustry.Vars.*;
|
||||
|
||||
/** Controls playback of multiple music tracks.*/
|
||||
public class MusicControl{
|
||||
protected static final float finTime = 120f, foutTime = 120f, musicInterval = 60 * 60 * 3f, musicChance = 0.6f, musicWaveChance = 0.5f;
|
||||
protected static final float finTime = 120f, foutTime = 120f, musicInterval = 60 * 60 * 3f, musicChance = 0.6f, musicWaveChance = 0.46f;
|
||||
|
||||
/** normal, ambient music, plays at any time */
|
||||
public Seq<Music> ambientMusic = Seq.with();
|
||||
/** darker music, used in times of conflict */
|
||||
public Seq<Music> darkMusic = Seq.with();
|
||||
/** music used explicitly after boss spawns */
|
||||
public Seq<Music> bossMusic = Seq.with();
|
||||
|
||||
protected Music lastRandomPlayed;
|
||||
protected Interval timer = new Interval();
|
||||
@@ -35,8 +38,12 @@ public class MusicControl{
|
||||
Events.on(ClientLoadEvent.class, e -> reload());
|
||||
|
||||
//only run music 10 seconds after a wave spawns
|
||||
Events.on(WaveEvent.class, e -> Time.run(60f * 10f, () -> {
|
||||
if(Mathf.chance(musicWaveChance)){
|
||||
Events.on(WaveEvent.class, e -> Time.run(Mathf.random(8f, 15f) * 60f, () -> {
|
||||
boolean boss = state.rules.spawns.contains(group -> group.getSpawned(state.wave - 2) > 0 && group.effect == StatusEffects.boss);
|
||||
|
||||
if(boss){
|
||||
playOnce(bossMusic.random(lastRandomPlayed));
|
||||
}else if(Mathf.chance(musicWaveChance)){
|
||||
playRandom();
|
||||
}
|
||||
}));
|
||||
@@ -45,8 +52,9 @@ public class MusicControl{
|
||||
protected void reload(){
|
||||
current = null;
|
||||
fade = 0f;
|
||||
ambientMusic = Seq.with(Musics.game1, Musics.game3, Musics.game4, Musics.game6);
|
||||
darkMusic = Seq.with(Musics.game2, Musics.game5, Musics.game7);
|
||||
ambientMusic = Seq.with(Musics.game1, Musics.game3, Musics.game6, Musics.game8, Musics.game9);
|
||||
darkMusic = Seq.with(Musics.game2, Musics.game5, Musics.game7, Musics.game4);
|
||||
bossMusic = Seq.with(Musics.boss1, Musics.boss2, Musics.game2, Musics.game5);
|
||||
}
|
||||
|
||||
public void stop(){
|
||||
|
||||
@@ -46,6 +46,10 @@ public class Version{
|
||||
}
|
||||
}
|
||||
|
||||
public static String buildString(){
|
||||
return build < 0 ? "custom" : build + (revision == 0 ? "" : "." + revision);
|
||||
}
|
||||
|
||||
/** get menu version without colors */
|
||||
public static String combined(){
|
||||
if(build == -1){
|
||||
|
||||
@@ -463,7 +463,7 @@ public class LoadRenderer implements Disposable{
|
||||
Font font = assets.get("tech");
|
||||
font.setColor(Pal.accent);
|
||||
Draw.color(Color.black);
|
||||
font.draw(red + "[[[[ " + key + " ]]\n"+orange+"<" + Version.modifier + " " + (Version.build == 0 ? " [init]" : Version.build == -1 ? " custom" : " " + Version.build) + ">", w/2f, h/2f + 110*s, Align.center);
|
||||
font.draw(red + "[[[[ " + key + " ]]\n" + orange + "<" + Version.modifier + " " + (Version.build == 0 ? "[init]" : Version.buildString()) + ">", w/2f, h/2f + 110*s, Align.center);
|
||||
}
|
||||
|
||||
Draw.flush();
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package mindustry.logic;
|
||||
|
||||
import arc.graphics.*;
|
||||
import mindustry.graphics.*;
|
||||
|
||||
public enum LCategory{
|
||||
blocks(Pal.accentBack),
|
||||
control(Color.cyan.cpy().shiftSaturation(-0.6f).mul(0.7f)),
|
||||
operations(Pal.place.cpy().shiftSaturation(-0.5f).mul(0.7f)),
|
||||
io(Pal.remove.cpy().shiftSaturation(-0.5f).mul(0.7f)),
|
||||
units(Pal.bulletYellowBack.cpy().shiftSaturation(-0.3f).mul(0.8f));
|
||||
blocks(Color.valueOf("d4816b")),
|
||||
control(Color.valueOf("6bb2b2")),
|
||||
operations(Color.valueOf("877bad")),
|
||||
io(Color.valueOf("a08a8a")),
|
||||
units(Color.valueOf("c7b59d"));
|
||||
|
||||
public final Color color;
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@ public class JoinDialog extends BaseDialog{
|
||||
}
|
||||
}).size(40f).get();
|
||||
image[0].addListener(new Tooltip(t -> t.background(Styles.black6).margin(4).label(() -> !group.hidden() ? "@server.shown" : "@server.hidden")));
|
||||
}).width(targetWidth()).padBottom(5).row();
|
||||
}).width(targetWidth()).padBottom(-2).row();
|
||||
}
|
||||
|
||||
addGlobalHost(res, g);
|
||||
|
||||
Reference in New Issue
Block a user