Edit TODO, fix crashes

This commit is contained in:
Anuken 2017-12-16 23:27:02 -05:00
parent f2027cd58c
commit 9f9f153125
8 changed files with 27 additions and 19 deletions

View File

@ -2,7 +2,7 @@ _Keep in mind that this is just a basic outline of planned features, and will be
### 3.x Planned
- New save system: toggleable autosave, named slots, less clunky save UI
- Optimize for tablets
- [DONE?] Optimize for tablets
- Teleporter UI changes, more colors (?)
- [DONE] New building tools: selection-delete, hold to place blocks in a line, one-tap delete mode (mobile). New 'tool' menu (desktop).
- [DONE] Refactor `Renderer`, remove code for rendering platform-specific placement and move to 2 different classes
@ -13,8 +13,9 @@ _Keep in mind that this is just a basic outline of planned features, and will be
- Fix bugs with junction not accepting blocks (low FPS)
- Fix bugs with tunnel merging and/or removing items (low FPS)
- Edit descriptions for conveyors to be more clear about how to use them
- Add link to Mindustry discord everywhere
- [DONE] Add link to Mindustry discord everywhere
- Balancing to slow down progression
- Map editor
### Major Bugs
- Black screen when tabbing out on Android

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.anuke.mindustry"
android:versionCode="35"
android:versionName="3.1b2" >
android:versionCode="37"
android:versionName="3.1.1" >
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
<uses-permission android:name="com.android.vending.BILLING" />

View File

@ -10,9 +10,9 @@ import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import io.anuke.mindustry.io.PlatformFunction;
import io.anuke.ucore.function.Callable;
import io.anuke.ucore.scene.ui.layout.Unit;
@ -51,12 +51,8 @@ public class AndroidLauncher extends AndroidApplication{
Mindustry.donationsCallable = new Callable(){ @Override public void run(){ showDonations(); } };
if(doubleScaleTablets){
if(isTablet(this.getContext())){
Unit.dp.multiplier = 2f;
}else{
Unit.dp.multiplier = 1f;
}
if(doubleScaleTablets && isTablet(this.getContext())){
Unit.dp.addition = 0.5f;
}
config.hideStatusBar = true;
@ -74,9 +70,8 @@ public class AndroidLauncher extends AndroidApplication{
}
private boolean isTablet(Context context) {
boolean xlarge = ((context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE);
boolean large = ((context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE);
return (xlarge || large);
TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
return manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE;
}
private void showDonations(){

View File

@ -79,7 +79,7 @@ project(":core") {
apply plugin: "java"
dependencies {
compile 'com.github.anuken:ucore:d56206b7c0'
compile 'com.github.anuken:ucore:283ecacfef'
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
}

View File

@ -20,8 +20,8 @@ public class Vars{
public static final float respawnduration = 60*4;
//time between waves in frames (on normal mode)
public static final float wavespace = 60*60*(android ? 1 : 1);
//waves can last no longer than 5 minutes, otherwise the next one spawns
public static final float maxwavespace = 60*60*5;
//waves can last no longer than 2 minutes, otherwise the next one spawns
public static final float maxwavespace = 60*60*2;
//advance time the pathfinding starts at
public static final float aheadPathfinding = 60*20;
//how far away from spawn points the player can't place blocks

View File

@ -87,7 +87,7 @@ public class Player extends DestructibleEntity{
vector.x += speed;
boolean shooting = !Inputs.keyDown("dash") && Inputs.buttonDown(Buttons.LEFT) && recipe == null
&& !ui.hasMouse() && !control.getInput().onConfigurable() && !Inputs.keyDown("area_delete_mode");
&& !ui.hasMouse() && !control.getInput().onConfigurable();
if(shooting && Timers.get(this, "reload", weapon.reload)){
weapon.shoot(this);

View File

@ -22,11 +22,13 @@ public class DesktopInput extends InputHandler{
int mousex, mousey;
int endx, endy;
private boolean enableHold = false;
private boolean beganBreak;
@Override public float getCursorEndX(){ return endx; }
@Override public float getCursorEndY(){ return endy; }
@Override public float getCursorX(){ return (int)(Graphics.screen(mousex, mousey).x + 2); }
@Override public float getCursorY(){ return (int)(Gdx.graphics.getHeight() - 1 - Graphics.screen(mousex, mousey).y); }
@Override public boolean drawPlace(){ return !beganBreak; }
@Override
public boolean touchDown (int screenX, int screenY, int pointer, int button){
@ -41,7 +43,7 @@ public class DesktopInput extends InputHandler{
public boolean touchUp(int screenX, int screenY, int pointer, int button){
if(button == Buttons.LEFT){
player.placeMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY());
}else if(button == Buttons.RIGHT){
}else if(button == Buttons.RIGHT && !beganBreak){
player.breakMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY());
}
return false;
@ -104,8 +106,13 @@ public class DesktopInput extends InputHandler{
if(Inputs.buttonUp(Buttons.RIGHT)){
ui.hideConfig();
}
if(Inputs.buttonRelease(Buttons.RIGHT)){
beganBreak = false;
}
if(player.recipe != null && Inputs.buttonUp(Buttons.RIGHT)){
beganBreak = true;
player.recipe = null;
Cursors.restoreCursor();
}

View File

@ -0,0 +1,5 @@
package io.anuke.mindustry.ui;
public class MapEditor{
}