Removed awt use / Sand recolor / Bugfixes / Link fix
@@ -10,6 +10,7 @@ buildscript{
|
|||||||
dependencies{
|
dependencies{
|
||||||
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.5'
|
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.5'
|
||||||
classpath "com.badlogicgames.gdx:gdx-tools:1.9.9"
|
classpath "com.badlogicgames.gdx:gdx-tools:1.9.9"
|
||||||
|
classpath "com.badlogicgames.packr:packr:2.1-SNAPSHOT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 1004 B |
|
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 1014 B |
BIN
core/assets-raw/sprites/blocks/environment/sandrocks-large.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
core/assets-raw/sprites/blocks/environment/sandrocks1.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/blocks/environment/sandrocks2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 510 B After Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@@ -36,7 +36,7 @@ public class Blocks implements ContentList{
|
|||||||
//environment
|
//environment
|
||||||
air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow,
|
air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow,
|
||||||
holostone, rocks, icerocks, cliffs, pine, whiteTree, whiteTreeDead, sporeCluster,
|
holostone, rocks, icerocks, cliffs, pine, whiteTree, whiteTreeDead, sporeCluster,
|
||||||
iceSnow, sandWater, duneRocks, stainedRocks, stainedStone, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder,
|
iceSnow, sandWater, duneRocks, sandRocks, stainedRocks, stainedStone, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder,
|
||||||
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks,
|
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks,
|
||||||
|
|
||||||
//crafting
|
//crafting
|
||||||
@@ -213,6 +213,10 @@ public class Blocks implements ContentList{
|
|||||||
variants = 2;
|
variants = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
sandRocks = new StaticWall("sandrocks"){{
|
||||||
|
variants = 2;
|
||||||
|
}};
|
||||||
|
|
||||||
pine = new StaticWall("pine"){{
|
pine = new StaticWall("pine"){{
|
||||||
//fillsTile = false;
|
//fillsTile = false;
|
||||||
variants = 0;
|
variants = 0;
|
||||||
@@ -283,18 +287,18 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
ignarock = new Floor("ignarock"){{
|
ignarock = new Floor("ignarock"){{
|
||||||
blendGroup = sand;
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
hotrock = new Floor("hotrock"){{
|
hotrock = new Floor("hotrock"){{
|
||||||
heat = 0.5f;
|
heat = 0.5f;
|
||||||
blendGroup = sand;
|
blendGroup = ignarock;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
magmarock = new Floor("magmarock"){{
|
magmarock = new Floor("magmarock"){{
|
||||||
heat = 0.75f;
|
heat = 0.75f;
|
||||||
updateEffect = Fx.magmasmoke;
|
updateEffect = Fx.magmasmoke;
|
||||||
blendGroup = sand;
|
blendGroup = ignarock;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
@@ -717,7 +721,8 @@ public class Blocks implements ContentList{
|
|||||||
massDriver = new MassDriver("mass-driver"){{
|
massDriver = new MassDriver("mass-driver"){{
|
||||||
requirements(Category.distribution, ItemStack.with(Items.titanium, 250, Items.silicon, 150, Items.lead, 250, Items.thorium, 100));
|
requirements(Category.distribution, ItemStack.with(Items.titanium, 250, Items.silicon, 150, Items.lead, 250, Items.thorium, 100));
|
||||||
size = 3;
|
size = 3;
|
||||||
itemCapacity = 60;
|
itemCapacity = 120;
|
||||||
|
reloadTime = 200f;
|
||||||
range = 440f;
|
range = 440f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class Items implements ContentList{
|
|||||||
flammability = 1.05f;
|
flammability = 1.05f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
sand = new Item("sand", Color.valueOf("e3d39e")){{
|
sand = new Item("sand", Color.valueOf("f7cba4")){{
|
||||||
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class Zones implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ruinousShores = new Zone("ruinousShores", new MapGenerator("ruinousShores", 1)){{
|
ruinousShores = new Zone("ruinousShores", new MapGenerator("ruinousShores", 1).dist(3f, true)){{
|
||||||
loadout = Loadouts.basicFoundation;
|
loadout = Loadouts.basicFoundation;
|
||||||
baseLaunchCost = ItemStack.with(Items.copper, 200, Items.graphite, 50);
|
baseLaunchCost = ItemStack.with(Items.copper, 200, Items.graphite, 50);
|
||||||
startingItems = ItemStack.list(Items.copper, 400);
|
startingItems = ItemStack.list(Items.copper, 400);
|
||||||
|
|||||||
@@ -17,12 +17,10 @@ public enum Binding implements KeyBind{
|
|||||||
rotate(new Axis(KeyCode.SCROLL)),
|
rotate(new Axis(KeyCode.SCROLL)),
|
||||||
pick(KeyCode.MOUSE_MIDDLE),
|
pick(KeyCode.MOUSE_MIDDLE),
|
||||||
dash(KeyCode.SHIFT_LEFT),
|
dash(KeyCode.SHIFT_LEFT),
|
||||||
drop_unit(KeyCode.SHIFT_LEFT),
|
|
||||||
gridMode(KeyCode.GRAVE),
|
gridMode(KeyCode.GRAVE),
|
||||||
gridModeShift(KeyCode.ALT_LEFT),
|
gridModeShift(KeyCode.ALT_LEFT),
|
||||||
zoom_hold(KeyCode.CONTROL_LEFT, "view"),
|
zoom_hold(KeyCode.CONTROL_LEFT, "view"),
|
||||||
zoom(new Axis(KeyCode.SCROLL)),
|
zoom(new Axis(KeyCode.SCROLL)),
|
||||||
zoom_minimap(new Axis(KeyCode.MINUS, KeyCode.PLUS)),
|
|
||||||
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE),
|
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE),
|
||||||
pause(KeyCode.SPACE),
|
pause(KeyCode.SPACE),
|
||||||
toggle_menus(KeyCode.C),
|
toggle_menus(KeyCode.C),
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
renderer.scaleCamera(Core.input.axisTap(Binding.zoom));
|
renderer.scaleCamera(Core.input.axisTap(Binding.zoom));
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.minimap.zoomBy(-Core.input.axisTap(Binding.zoom_minimap));
|
//renderer.minimap.zoomBy(-Core.input.axisTap(Binding.zoom_minimap));
|
||||||
|
|
||||||
if(player.isDead()) return;
|
if(player.isDead()) return;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class Links{
|
|||||||
|
|
||||||
private static void createLinks(){
|
private static void createLinks(){
|
||||||
links = new LinkEntry[]{
|
links = new LinkEntry[]{
|
||||||
new LinkEntry("discord", "https://discord.gg/BKADYds", Color.valueOf("7289da")),
|
new LinkEntry("discord", "https://discord.gg/mindustry", Color.valueOf("7289da")),
|
||||||
new LinkEntry("trello", "https://trello.com/b/aE2tcUwF", Color.valueOf("026aa7")),
|
new LinkEntry("trello", "https://trello.com/b/aE2tcUwF", Color.valueOf("026aa7")),
|
||||||
new LinkEntry("wiki", "http://mindustry.wikia.com/wiki/Mindustry_Wiki", Color.valueOf("0f142f")),
|
new LinkEntry("wiki", "http://mindustry.wikia.com/wiki/Mindustry_Wiki", Color.valueOf("0f142f")),
|
||||||
new LinkEntry("itch.io", "https://anuke.itch.io/mindustry", Color.valueOf("fa5c5c")),
|
new LinkEntry("itch.io", "https://anuke.itch.io/mindustry", Color.valueOf("fa5c5c")),
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
void addSettings(){
|
void addSettings(){
|
||||||
//TODO add when sound works again
|
//TODO add when sound works again
|
||||||
//sound.volumePrefs();
|
//sound.volumePrefs();
|
||||||
|
sound.add("[LIGHT_GRAY]there is no sound implemented in v4 yet");
|
||||||
|
|
||||||
game.screenshakePref();
|
game.screenshakePref();
|
||||||
game.checkPref("effects", true);
|
game.checkPref("effects", true);
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ public class Block extends BlockStorage{
|
|||||||
boolean buffered = consumes.get(ConsumePower.class).isBuffered;
|
boolean buffered = consumes.get(ConsumePower.class).isBuffered;
|
||||||
float capacity = consumes.get(ConsumePower.class).powerCapacity;
|
float capacity = consumes.get(ConsumePower.class).powerCapacity;
|
||||||
|
|
||||||
bars.add("power", entity -> new Bar(() -> buffered ? Core.bundle.format("blocks.powerbalance", Float.isNaN(entity.power.satisfaction * capacity) ? "<BUGGED>" : (int)(entity.power.satisfaction * capacity)) :
|
bars.add("power", entity -> new Bar(() -> buffered ? Core.bundle.format("blocks.powerbalance", Float.isNaN(entity.power.satisfaction * capacity) ? "<ERROR>" : (int)(entity.power.satisfaction * capacity)) :
|
||||||
Core.bundle.get("blocks.power"), () -> Pal.powerBar, () -> entity.power.satisfaction));
|
Core.bundle.get("blocks.power"), () -> Pal.powerBar, () -> entity.power.satisfaction));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import io.anuke.arc.util.serialization.JsonWriter.OutputType;
|
|||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.game.Version;
|
import io.anuke.mindustry.game.Version;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
|
import org.lwjgl.util.tinyfd.TinyFileDialogs;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
@@ -25,34 +26,24 @@ public class CrashHandler{
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
//check crash report setting
|
//check crash report setting
|
||||||
if(!Core.settings.getBool("crashreport")){
|
if(!Core.settings.getBool("crashreport", true)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}catch(Throwable ignored){
|
}catch(Throwable ignored){
|
||||||
//don't send since we don't know if the user has the setting set
|
//if there's no settings init we don't know what the user wants but chances are it's an important crash, so send it anyway
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!OS.isMac){
|
|
||||||
try{
|
|
||||||
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
|
|
||||||
}catch(Throwable ignored){}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean badGPU = false;
|
boolean badGPU = false;
|
||||||
|
|
||||||
if(!OS.isMac && e.getMessage() != null && (e.getMessage().contains("Couldn't create window") || e.getMessage().contains("OpenGL 2.0 or higher"))){
|
if(e.getMessage() != null && (e.getMessage().contains("Couldn't create window") || e.getMessage().contains("OpenGL 2.0 or higher"))){
|
||||||
try{
|
|
||||||
javax.swing.JOptionPane.showMessageDialog(null, "Your graphics card does not support OpenGL 2.0!\n" +
|
dialog(() -> TinyFileDialogs.tinyfd_messageBox("oh no", "Your graphics card does not support OpenGL 2.0!\n" +
|
||||||
"Try to update your graphics drivers.\n\n" +
|
"Try to update your graphics drivers.\n\n" +
|
||||||
"(If that doesn't work, your computer just doesn't support Mindustry.)",
|
"(If that doesn't work, your computer just doesn't support Mindustry.)", "ok", "error", true));
|
||||||
"oh no", javax.swing.JOptionPane.INFORMATION_MESSAGE);
|
badGPU = true;
|
||||||
badGPU = true;
|
|
||||||
}catch(Throwable ignored){}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//don't create crash logs for me (anuke), as it's expected
|
//don't create crash logs for me (anuke) or custom builds, as it's expected
|
||||||
//also don't create logs for custom builds
|
|
||||||
if(System.getProperty("user.name").equals("anuke") || Version.build == -1) return;
|
if(System.getProperty("user.name").equals("anuke") || Version.build == -1) return;
|
||||||
|
|
||||||
boolean netActive = false, netServer = false;
|
boolean netActive = false, netServer = false;
|
||||||
@@ -83,14 +74,12 @@ public class CrashHandler{
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
Path path = Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes",
|
Path path = Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes",
|
||||||
"crash-report-" + DateTimeFormatter.ofPattern("MM dd yyyy HH mm ss").format(LocalDateTime.now()) + ".txt");
|
"crash-report-" + DateTimeFormatter.ofPattern("MM_dd_yyyy_HH_mm_ss").format(LocalDateTime.now()) + ".txt");
|
||||||
Files.createDirectories(Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes"));
|
Files.createDirectories(Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes"));
|
||||||
|
|
||||||
Files.write(path, parseException(e).getBytes());
|
Files.write(path, parseException(e).getBytes());
|
||||||
|
|
||||||
if(!badGPU){
|
if(!badGPU){
|
||||||
javax.swing.JOptionPane.showMessageDialog(null, "A crash has occured. It has been saved in:\n" + path.toAbsolutePath().toString(),
|
dialog(() -> TinyFileDialogs.tinyfd_messageBox("oh no", "A crash has occured. It has been saved in:\n" + path.toAbsolutePath().toString(), "ok", "error", true));
|
||||||
"oh no", javax.swing.JOptionPane.INFORMATION_MESSAGE);
|
|
||||||
}
|
}
|
||||||
}catch(Throwable t){
|
}catch(Throwable t){
|
||||||
Log.err("Failed to save local crash report.");
|
Log.err("Failed to save local crash report.");
|
||||||
@@ -107,8 +96,12 @@ public class CrashHandler{
|
|||||||
System.exit(1);
|
System.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
//sleep forever
|
//sleep for 10 seconds or until crash report is sent
|
||||||
try{ Thread.sleep(Long.MAX_VALUE); }catch(InterruptedException ignored){}
|
try{ Thread.sleep(10000); }catch(InterruptedException ignored){}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void dialog(Runnable r){
|
||||||
|
new Thread(r).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String parseException(Throwable e){
|
private static String parseException(Throwable e){
|
||||||
|
|||||||