Converted music to mp3 / New tracks / Minor cleanup

This commit is contained in:
Anuken
2020-11-09 17:02:36 -05:00
parent 29c6d7fe6c
commit 89589c3258
34 changed files with 26 additions and 32 deletions
@@ -123,8 +123,7 @@ public class AssetsProcess extends BaseProcessor{
if(SourceVersion.isKeyword(name)) name += "s";
String filepath = path.substring(path.lastIndexOf("/") + 1) + "/" + fname;
String filename = "arc.Core.app.getType() != arc.Application.ApplicationType.iOS ? \"" + filepath + "\" : \"" + filepath.replace(".ogg", ".mp3") + "\"";
String filename = "\"" + filepath + "\"";
loadBegin.addStatement("arc.Core.assets.load(" + filename + ", " + rtype + ".class).loaded = a -> " + name + " = (" + rtype + ")a", filepath, filepath.replace(".ogg", ".mp3"));
+1 -1
View File
@@ -507,7 +507,7 @@ zone.objective = [lightgray]Objective: [accent]{0}
zone.objective.survival = Survive
zone.objective.attack = Destroy Enemy Core
add = Add...
boss.health = Boss Health
boss.health = Guardian Health
connectfail = [scarlet]Connection error:\n\n[accent]{0}
error.unreachable = Server unreachable.\nIs the address spelled correctly?
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+13 -5
View File
@@ -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(){
+4
View File
@@ -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();
+5 -6
View File
@@ -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);
-16
View File
@@ -14,22 +14,6 @@ task copyAssets(){
from "../core/assets"
into "assets/"
}
exec{
ignoreExitValue true
commandLine "sh", "./convert_audio.sh", "assets/sounds"
}
exec{
ignoreExitValue true
commandLine "sh", "./convert_audio.sh", "assets/music"
}
delete{
delete fileTree('assets'){
include '**/*.ogg'
}
}
}
}