Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2018-10-24 18:53:09 -04:00
21 changed files with 11081 additions and 10988 deletions
+1 -9
View File
@@ -1,14 +1,6 @@
language: android
jdk: jdk:
- openjdk8 - openjdk8
android:
components:
- android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-28
- build-tools-28.0.3
script: script:
- "./gradlew test" - "./gradlew test"
- "./gradlew desktop:dist" - "./gradlew desktop:dist"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -714,11 +714,13 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
//autofire: mobile only! //autofire: mobile only!
if(mobile){ if(mobile){
if(target == null){ if(target == null){
isShooting = false; isShooting = false;
if(Settings.getBool("autotarget")){ if(Settings.getBool("autotarget")){
target = Units.getClosestTarget(team, x, y, getWeapon().getAmmo().getRange()); target = Units.getClosestTarget(team, x, y, getWeapon().getAmmo().getRange());
if(target != null){
setMineTile(null);
}
} }
}else if(target.isValid()){ }else if(target.isValid()){
//rotate toward and shoot the target //rotate toward and shoot the target
@@ -86,14 +86,16 @@ public class MobileInput extends InputHandler implements GestureListener{
Unit unit = Units.getClosestEnemy(player.getTeam(), x, y, 20f, u -> !u.isDead()); Unit unit = Units.getClosestEnemy(player.getTeam(), x, y, 20f, u -> !u.isDead());
if(unit != null){ if(unit != null){
threads.run(() -> player.target = unit); player.setMineTile(null);
player.target = unit;
}else{ }else{
Tile tile = world.tileWorld(x, y); Tile tile = world.tileWorld(x, y);
if(tile != null) tile = tile.target(); if(tile != null) tile = tile.target();
if(tile != null && state.teams.areEnemies(player.getTeam(), tile.getTeam())){ if(tile != null && state.teams.areEnemies(player.getTeam(), tile.getTeam())){
TileEntity entity = tile.entity; TileEntity entity = tile.entity;
threads.run(() -> player.target = entity); player.setMineTile(null);
player.target = entity;
} }
} }
} }
@@ -52,7 +52,6 @@ public class FileChooser extends FloatingDialog{
} }
private void setupWidgets(){ private void setupWidgets(){
//getCell(content()).maxWidth(UIUtils.portrait() ? Gdx.graphics.getWidth() : Gdx.graphics.getWidth()/Unit.dp.scl(2f));
content().margin(-10); content().margin(-10);
Table content = new Table(); Table content = new Table();
@@ -137,7 +136,7 @@ public class FileChooser extends FloatingDialog{
icontable.add(up); icontable.add(up);
Table fieldcontent = new Table(); Table fieldcontent = new Table();
fieldcontent.bottom().left().add(new Label("File Name:")); fieldcontent.bottom().left().add(new Label("$text.filename"));
fieldcontent.add(filefield).height(40f).fillX().expandX().padLeft(10f); fieldcontent.add(filefield).height(40f).fillX().expandX().padLeft(10f);
Table buttons = new Table(); Table buttons = new Table();
+15 -1
View File
@@ -1,4 +1,18 @@
include 'desktop', 'html', 'core', 'android', 'kryonet', 'server', 'ios', 'annotations', 'tools', 'tests' include 'desktop', 'html', 'core', 'kryonet', 'server', 'ios', 'annotations', 'tools', 'tests'
Properties properties = new Properties()
if(new File(settingsDir, 'local.properties').exists()){
properties.load(new File(settingsDir, 'local.properties').newDataInputStream())
if(properties.containsKey("sdk.dir")){
include 'android'
}else{
println("No android SDK dir found Not loading Android module.")
}
}else{
println("No local.properties found. Not loading Android module.")
}
if(System.properties["release"] == null || System.properties["release"] == "false"){ if(System.properties["release"] == null || System.properties["release"] == "false"){
if (new File(settingsDir, '../uCore').exists()) { if (new File(settingsDir, '../uCore').exists()) {