Merge fixes
This commit is contained in:
@@ -28,7 +28,7 @@ import java.util.Locale;
|
||||
public class Vars{
|
||||
|
||||
public static final boolean testMobile = false;
|
||||
//shorthand for whether or not this is running on android
|
||||
//shorthand for whether or not this is running on android or ios
|
||||
public static final boolean mobile = (Gdx.app.getType() == ApplicationType.Android) ||
|
||||
Gdx.app.getType() == ApplicationType.iOS || testMobile;
|
||||
public static final boolean ios = Gdx.app.getType() == ApplicationType.iOS;
|
||||
|
||||
@@ -146,7 +146,7 @@ public class Recipes {
|
||||
|
||||
public static Array<Recipe> getBy(Section section, Array<Recipe> r){
|
||||
for(Recipe recipe : list){
|
||||
if(recipe.section == section && !(Vars.android && recipe.desktopOnly) && !(!debug && recipe.debugOnly)) {
|
||||
if(recipe.section == section && !(Vars.mobile && recipe.desktopOnly) && !(!debug && recipe.debugOnly)) {
|
||||
r.add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public class Renderer extends RendererModule{
|
||||
if(!smoothcam){
|
||||
setCamera(player.x, player.y);
|
||||
}else{
|
||||
smoothCamera(player.x, player.y, android ? 0.3f : 0.14f);
|
||||
smoothCamera(player.x, player.y, mobile ? 0.3f : 0.14f);
|
||||
}
|
||||
|
||||
if(Settings.getBool("pixelate"))
|
||||
|
||||
@@ -15,7 +15,6 @@ import io.anuke.ucore.scene.ui.ImageButton;
|
||||
import io.anuke.ucore.scene.ui.Label;
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
import io.anuke.ucore.util.Tmp;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -92,38 +91,11 @@ public class Tutorial{
|
||||
}
|
||||
|
||||
void move(boolean forward){
|
||||
|
||||
if(forward && !canMove(forward)){
|
||||
complete();
|
||||
}else{
|
||||
int current = stage.ordinal();
|
||||
|
||||
while(true){
|
||||
current += Mathf.sign(forward);
|
||||
|
||||
if(current < 0 || current >= Stage.values().length){
|
||||
break;
|
||||
}else if(android == Stage.values()[current].androidOnly || android != Stage.values()[current].desktopOnly){
|
||||
stage = Stage.values()[current];
|
||||
stage.onSwitch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//TODO
|
||||
}
|
||||
|
||||
boolean canMove(boolean forward){
|
||||
int current = stage.ordinal();
|
||||
|
||||
while(true){
|
||||
current += Mathf.sign(forward);
|
||||
|
||||
if(current < 0 || current >= Stage.values().length){
|
||||
return false;
|
||||
}else if(android == Stage.values()[current].androidOnly || android != Stage.values()[current].desktopOnly){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ public class BlockRenderer{
|
||||
public void handlePreview(Block block, float rotation, float drawx, float drawy, int tilex, int tiley) {
|
||||
|
||||
if(control.input().recipe != null && state.inventory.hasItems(control.input().recipe.requirements)
|
||||
&& control.input().validPlace(tilex, tiley, block) && (android || control.input().cursorNear())) {
|
||||
&& control.input().validPlace(tilex, tiley, block) && (mobile || control.input().cursorNear())) {
|
||||
|
||||
if(block.isMultiblock()) {
|
||||
float halfBlockWidth = (block.size * tilesize) / 2;
|
||||
|
||||
Reference in New Issue
Block a user