Many buildscript changes
This commit is contained in:
+12
-7
@@ -19,9 +19,7 @@ configurations{ natives }
|
||||
repositories{
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven{
|
||||
url "https://maven.google.com"
|
||||
}
|
||||
maven{ url "https://maven.google.com" }
|
||||
}
|
||||
|
||||
dependencies{
|
||||
@@ -29,10 +27,10 @@ dependencies{
|
||||
|
||||
implementation arcModule("backends:backend-android")
|
||||
implementation 'com.jakewharton.android.repackaged:dalvik-dx:9.0.0_r3'
|
||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
|
||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
|
||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
|
||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
|
||||
|
||||
natives "com.github.Anuken.Arc:natives-android:${getArcHash()}"
|
||||
natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}"
|
||||
|
||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
|
||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
|
||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
|
||||
@@ -134,6 +132,13 @@ task copyAndroidNatives(){
|
||||
into outputDir
|
||||
include "*.so"
|
||||
}
|
||||
}else{
|
||||
println("copying $jar")
|
||||
copy{
|
||||
from zipTree(jar)
|
||||
into file("libs/")
|
||||
include "**"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-12
@@ -168,12 +168,11 @@ project(":desktop"){
|
||||
|
||||
dependencies{
|
||||
compile project(":core")
|
||||
compile arcModule("natives:natives-desktop")
|
||||
compile arcModule("natives:natives-freetype-desktop")
|
||||
|
||||
if(debugged()) compile project(":debug")
|
||||
|
||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
||||
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
|
||||
|
||||
compile "com.github.Anuken:steamworks4j:$steamworksVersion"
|
||||
|
||||
compile arcModule("backends:backend-sdl")
|
||||
@@ -204,14 +203,12 @@ project(":ios"){
|
||||
|
||||
dependencies{
|
||||
compile project(":core")
|
||||
compileOnly project(":annotations")
|
||||
|
||||
compile arcModule("natives:natives-ios")
|
||||
compile arcModule("natives:natives-freetype-ios")
|
||||
compile arcModule("backends:backend-robovm")
|
||||
|
||||
compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
|
||||
compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
|
||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
|
||||
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
|
||||
compileOnly project(":annotations")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,11 +292,11 @@ project(":tools"){
|
||||
dependencies{
|
||||
compile project(":core")
|
||||
|
||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
||||
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
|
||||
compile "org.reflections:reflections:0.9.12"
|
||||
|
||||
compile arcModule("natives:natives-desktop")
|
||||
compile arcModule("natives:natives-freetype-desktop")
|
||||
compile arcModule("backends:backend-headless")
|
||||
|
||||
compile "org.reflections:reflections:0.9.12"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,17 +13,17 @@ import static mindustry.Vars.*;
|
||||
|
||||
/** Controls playback of multiple music tracks.*/
|
||||
public class MusicControl{
|
||||
private 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.5f;
|
||||
|
||||
/** normal, ambient music, plays at any time */
|
||||
public Array<Music> ambientMusic = Array.with();
|
||||
/** darker music, used in times of conflict */
|
||||
public Array<Music> darkMusic = Array.with();
|
||||
private Music lastRandomPlayed;
|
||||
private Interval timer = new Interval();
|
||||
private @Nullable Music current;
|
||||
private float fade;
|
||||
private boolean silenced;
|
||||
protected Music lastRandomPlayed;
|
||||
protected Interval timer = new Interval();
|
||||
protected @Nullable Music current;
|
||||
protected float fade;
|
||||
protected boolean silenced;
|
||||
|
||||
public MusicControl(){
|
||||
Events.on(ClientLoadEvent.class, e -> reload());
|
||||
@@ -36,7 +36,7 @@ public class MusicControl{
|
||||
}));
|
||||
}
|
||||
|
||||
private void reload(){
|
||||
protected void reload(){
|
||||
current = null;
|
||||
fade = 0f;
|
||||
ambientMusic = Array.with(Musics.game1, Musics.game3, Musics.game4, Musics.game6);
|
||||
@@ -81,7 +81,7 @@ public class MusicControl{
|
||||
}
|
||||
|
||||
/** Plays a random track.*/
|
||||
private void playRandom(){
|
||||
protected void playRandom(){
|
||||
if(isDark()){
|
||||
playOnce(darkMusic.random(lastRandomPlayed));
|
||||
}else{
|
||||
@@ -90,7 +90,7 @@ public class MusicControl{
|
||||
}
|
||||
|
||||
/** Whether to play dark music.*/
|
||||
private boolean isDark(){
|
||||
protected boolean isDark(){
|
||||
if(state.teams.get(player.team()).hasCore() && state.teams.get(player.team()).core().healthf() < 0.85f){
|
||||
//core damaged -> dark
|
||||
return true;
|
||||
@@ -107,7 +107,7 @@ public class MusicControl{
|
||||
|
||||
/** Plays and fades in a music track. This must be called every frame.
|
||||
* If something is already playing, fades out that track and fades in this new music.*/
|
||||
private void play(@Nullable Music music){
|
||||
protected void play(@Nullable Music music){
|
||||
if(!shouldPlay()){
|
||||
if(current != null){
|
||||
current.setVolume(0);
|
||||
@@ -159,7 +159,7 @@ public class MusicControl{
|
||||
}
|
||||
|
||||
/** Plays a music track once and only once. If something is already playing, does nothing.*/
|
||||
private void playOnce(Music music){
|
||||
protected void playOnce(Music music){
|
||||
if(current != null || music == null || !shouldPlay()) return; //do not interrupt already-playing tracks
|
||||
|
||||
//save last random track played to prevent duplicates
|
||||
@@ -179,12 +179,12 @@ public class MusicControl{
|
||||
current.play();
|
||||
}
|
||||
|
||||
private boolean shouldPlay(){
|
||||
protected boolean shouldPlay(){
|
||||
return Core.settings.getInt("musicvol") > 0;
|
||||
}
|
||||
|
||||
/** Fades out the current track, unless it has already been silenced. */
|
||||
private void silence(){
|
||||
protected void silence(){
|
||||
play(null);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=26861a21f52e7efed4469c604c40e9ad5b54001e
|
||||
archash=eafc01d165a28ff49935ed80e59509eb4ebcdd72
|
||||
|
||||
+17
-10
@@ -30,23 +30,30 @@ if(hasSdk){
|
||||
if(!hasProperty("release")){
|
||||
if(new File(settingsDir, '../Arc').exists()){
|
||||
use(
|
||||
':Arc',
|
||||
':Arc:arc-core',
|
||||
':Arc:extensions',
|
||||
':Arc:extensions:freetype',
|
||||
':Arc:extensions:recorder',
|
||||
':Arc:extensions:arcnet',
|
||||
':Arc',
|
||||
':Arc:arc-core',
|
||||
':Arc:extensions',
|
||||
':Arc:extensions:freetype',
|
||||
':Arc:extensions:recorder',
|
||||
':Arc:extensions:arcnet',
|
||||
':Arc:extensions:packer',
|
||||
':Arc:extensions:g3d',
|
||||
':Arc:extensions:fx',
|
||||
':Arc:backends',
|
||||
':Arc:backends:backend-sdl',
|
||||
':Arc:extensions:fx',
|
||||
':Arc:natives',
|
||||
':Arc:natives:natives-desktop',
|
||||
':Arc:natives:natives-android',
|
||||
':Arc:natives:natives-ios',
|
||||
':Arc:natives:natives-freetype-desktop',
|
||||
':Arc:natives:natives-freetype-android',
|
||||
':Arc:natives:natives-freetype-ios',
|
||||
':Arc:backends',
|
||||
':Arc:backends:backend-sdl',
|
||||
':Arc:backends:backend-android',
|
||||
':Arc:backends:backend-robovm',
|
||||
':Arc:backends:backend-headless'
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if(new File(settingsDir, '../Mindustry-Debug').exists()){
|
||||
include(":debug")
|
||||
project(":debug").projectDir = new File(settingsDir, "../Mindustry-Debug")
|
||||
|
||||
Reference in New Issue
Block a user