Converted music to mp3 / New tracks / Minor cleanup
This commit is contained in:
@@ -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"));
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
BIN
core/assets/music/boss1.mp3
Normal file
BIN
core/assets/music/boss1.mp3
Normal file
Binary file not shown.
BIN
core/assets/music/boss2.mp3
Normal file
BIN
core/assets/music/boss2.mp3
Normal file
Binary file not shown.
BIN
core/assets/music/editor.mp3
Normal file
BIN
core/assets/music/editor.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game1.mp3
Normal file
BIN
core/assets/music/game1.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game2.mp3
Normal file
BIN
core/assets/music/game2.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game3.mp3
Normal file
BIN
core/assets/music/game3.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game4.mp3
Normal file
BIN
core/assets/music/game4.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game5.mp3
Normal file
BIN
core/assets/music/game5.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game6.mp3
Normal file
BIN
core/assets/music/game6.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game7.mp3
Normal file
BIN
core/assets/music/game7.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/game8.mp3
Normal file
BIN
core/assets/music/game8.mp3
Normal file
Binary file not shown.
BIN
core/assets/music/game9.mp3
Normal file
BIN
core/assets/music/game9.mp3
Normal file
Binary file not shown.
BIN
core/assets/music/land.mp3
Normal file
BIN
core/assets/music/land.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/launch.mp3
Normal file
BIN
core/assets/music/launch.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/music/menu.mp3
Normal file
BIN
core/assets/music/menu.mp3
Normal file
Binary file not shown.
Binary file not shown.
@@ -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);
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user