Crash fix + drill balance

This commit is contained in:
Anuken
2019-06-19 21:41:49 -04:00
parent 47b1e700ea
commit 8e95be0ac2
4 changed files with 20 additions and 18 deletions

View File

@@ -331,7 +331,7 @@ zone.resources = Resources Detected:
add = Add... add = Add...
boss.health = Boss Health boss.health = Boss Health
connectfail = [crimson]Failed to connect to server:\n\n[accent]{0} connectfail = [crimson]Connection error:\n\n[accent]{0}
error.unreachable = Server unreachable.\nIs the address spelled correctly? error.unreachable = Server unreachable.\nIs the address spelled correctly?
error.invalidaddress = Invalid address. error.invalidaddress = Invalid address.
error.timedout = Timed out!\nMake sure the host has port forwarding set up, and that the address is correct! error.timedout = Timed out!\nMake sure the host has port forwarding set up, and that the address is correct!

View File

@@ -1125,7 +1125,7 @@ public class Blocks implements ContentList{
}}; }};
pneumaticDrill = new Drill("pneumatic-drill"){{ pneumaticDrill = new Drill("pneumatic-drill"){{
requirements(Category.production, ItemStack.with(Items.copper, 60, Items.graphite, 50)); requirements(Category.production, ItemStack.with(Items.copper, 35, Items.graphite, 15));
tier = 3; tier = 3;
drillTime = 480; drillTime = 480;
size = 2; size = 2;
@@ -1134,7 +1134,7 @@ public class Blocks implements ContentList{
}}; }};
laserDrill = new Drill("laser-drill"){{ laserDrill = new Drill("laser-drill"){{
requirements(Category.production, ItemStack.with(Items.copper, 70, Items.graphite, 90, Items.silicon, 60, Items.titanium, 50)); requirements(Category.production, ItemStack.with(Items.copper, 70, Items.graphite, 60, Items.silicon, 60, Items.titanium, 40));
drillTime = 280; drillTime = 280;
size = 3; size = 3;
hasPower = true; hasPower = true;
@@ -1147,8 +1147,8 @@ public class Blocks implements ContentList{
}}; }};
blastDrill = new Drill("blast-drill"){{ blastDrill = new Drill("blast-drill"){{
requirements(Category.production, ItemStack.with(Items.copper, 130, Items.silicon, 120, Items.titanium, 100, Items.thorium, 100)); requirements(Category.production, ItemStack.with(Items.copper, 130, Items.silicon, 120, Items.titanium, 100, Items.thorium, 150));
drillTime = 200; drillTime = 220;
size = 4; size = 4;
drawRim = true; drawRim = true;
hasPower = true; hasPower = true;

View File

@@ -50,6 +50,17 @@ public class CrashSender{
} }
} }
try{
File file = new File(OS.getAppDataDirectoryString(Vars.appName), "crashes/crash-report-" + DateTimeFormatter.ofPattern("MM_dd_yyyy_HH_mm_ss").format(LocalDateTime.now()) + ".txt");
new File(OS.getAppDataDirectoryString(Vars.appName)).mkdir();
new BufferedOutputStream(new FileOutputStream(file), Streams.DEFAULT_BUFFER_SIZE).write(parseException(exception).getBytes());
Files.createDirectories(Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes"));
writeListener.accept(file);
}catch(Throwable ignored){
Log.err("Failed to save local crash report.");
}
try{ try{
//check crash report setting //check crash report setting
if(!Core.settings.getBool("crashreport", true)){ if(!Core.settings.getBool("crashreport", true)){
@@ -64,17 +75,6 @@ public class CrashSender{
return; return;
} }
try{
File file = new File(OS.getAppDataDirectoryString(Vars.appName), "crashes/crash-report-" + DateTimeFormatter.ofPattern("MM_dd_yyyy_HH_mm_ss").format(LocalDateTime.now()) + ".txt");
new File(OS.getAppDataDirectoryString(Vars.appName)).mkdir();
new BufferedOutputStream(new FileOutputStream(file), Streams.DEFAULT_BUFFER_SIZE).write(parseException(exception).getBytes());
Files.createDirectories(Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes"));
writeListener.accept(file);
}catch(Throwable ignored){
Log.err("Failed to save local crash report.");
}
boolean netActive = false, netServer = false; boolean netActive = false, netServer = false;
//attempt to close connections, if applicable //attempt to close connections, if applicable

View File

@@ -385,7 +385,7 @@ public class HudFragment extends Fragment{
//paused table //paused table
parent.fill(t -> { parent.fill(t -> {
t.top().visible(() -> state.is(State.paused) && !Net.active()); t.top().visible(() -> state.isPaused());
t.table("button", top -> top.add("$paused").pad(6f)); t.table("button", top -> top.add("$paused").pad(6f));
}); });
@@ -551,7 +551,9 @@ public class HudFragment extends Fragment{
} }
shown = !shown; shown = !shown;
flip.getParent().act(Core.graphics.getDeltaTime()); if(flip != null){
flip.getParent().act(Core.graphics.getDeltaTime());
}
} }
private void addWaveTable(TextButton table){ private void addWaveTable(TextButton table){