1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-11-11 14:56:10 +03:00

Crash report fixes / Mobile mech fixes / Multiplayer fixes

This commit is contained in:
Anuken 2018-09-02 13:12:45 -04:00
parent 54497c43b6
commit e903798fc2
4 changed files with 16 additions and 7 deletions

View File

@ -137,9 +137,9 @@ public class Recipes implements ContentList{
new Recipe(units, UpgradeBlocks.javelinFactory, new ItemStack(Items.lead, 350), new ItemStack(Items.silicon, 450), new ItemStack(Items.titanium, 500), new ItemStack(Items.plastanium, 400), new ItemStack(Items.phasematter, 200)); new Recipe(units, UpgradeBlocks.javelinFactory, new ItemStack(Items.lead, 350), new ItemStack(Items.silicon, 450), new ItemStack(Items.titanium, 500), new ItemStack(Items.plastanium, 400), new ItemStack(Items.phasematter, 200));
new Recipe(units, UpgradeBlocks.glaiveFactory, new ItemStack(Items.lead, 450), new ItemStack(Items.silicon, 650), new ItemStack(Items.titanium, 700), new ItemStack(Items.plastanium, 600), new ItemStack(Items.surgealloy, 200)); new Recipe(units, UpgradeBlocks.glaiveFactory, new ItemStack(Items.lead, 450), new ItemStack(Items.silicon, 650), new ItemStack(Items.titanium, 700), new ItemStack(Items.plastanium, 600), new ItemStack(Items.surgealloy, 200));
new Recipe(units, UpgradeBlocks.tauFactory, new ItemStack(Items.lead, 250), new ItemStack(Items.densealloy, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)); new Recipe(units, UpgradeBlocks.tauFactory, new ItemStack(Items.lead, 250), new ItemStack(Items.densealloy, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)).setDesktop();
new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.lead, 350), new ItemStack(Items.densealloy, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)); new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.lead, 350), new ItemStack(Items.densealloy, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)).setDesktop();
new Recipe(units, UpgradeBlocks.omegaFactory, new ItemStack(Items.lead, 450), new ItemStack(Items.densealloy, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)); new Recipe(units, UpgradeBlocks.omegaFactory, new ItemStack(Items.lead, 450), new ItemStack(Items.densealloy, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)).setDesktop();
//actual unit related stuff //actual unit related stuff
new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.copper, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130)); new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.copper, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130));

View File

@ -163,6 +163,8 @@ public class NetClient extends Module{
@Remote(variants = Variant.both) @Remote(variants = Variant.both)
public static void onWorldDataBegin(){ public static void onWorldDataBegin(){
Entities.clear(); Entities.clear();
netClient.removed.clear();
ui.chatfrag.clearMessages(); ui.chatfrag.clearMessages();
Net.setClientLoaded(false); Net.setClientLoaded(false);

View File

@ -42,7 +42,7 @@ public class BlockConsumeFragment extends Fragment{
table.update(() -> { table.update(() -> {
if(tile.entity == null){ if(tile.entity == null || state.is(State.menu)){
hide(); hide();
return; return;
} }

View File

@ -19,7 +19,7 @@ public class CrashHandler{
//don't create crash logs for me (anuke), as it's expected //don't create crash logs for me (anuke), as it's expected
//also don't create logs for custom builds //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;
@ -40,14 +40,21 @@ public class CrashHandler{
ex(() -> value.addChild("build", new JsonValue(Version.build))); ex(() -> value.addChild("build", new JsonValue(Version.build)));
ex(() -> value.addChild("net", new JsonValue(fn))); ex(() -> value.addChild("net", new JsonValue(fn)));
ex(() -> value.addChild("server", new JsonValue(fs))); ex(() -> value.addChild("server", new JsonValue(fs)));
ex(() -> value.addChild("gamemode", new JsonValue(Vars.state.mode.toString()))); ex(() -> value.addChild("gamemode", new JsonValue(Vars.state.mode.name())));
ex(() -> value.addChild("state", new JsonValue(Vars.state.getState().name())));
ex(() -> value.addChild("os", new JsonValue(System.getProperty("os.name")))); ex(() -> value.addChild("os", new JsonValue(System.getProperty("os.name"))));
ex(() -> value.addChild("multithreading", new JsonValue(Settings.getBool("multithread")))); ex(() -> value.addChild("multithreading", new JsonValue(Settings.getBool("multithread"))));
ex(() -> value.addChild("trace", new JsonValue(parseException(e)))); ex(() -> value.addChild("trace", new JsonValue(parseException(e))));
Log.info("Sending crash report."); Log.info("Sending crash report.");
//post to crash report URL //post to crash report URL
Net.http(Vars.crashReportURL, "POST", value.toJson(OutputType.json), r -> System.exit(1), t -> System.exit(1)); Net.http(Vars.crashReportURL, "POST", value.toJson(OutputType.json), r -> {
Log.info("Crash sent successfully.");
System.exit(1);
}, t -> {
t.printStackTrace();
System.exit(1);
});
//sleep forever //sleep forever
try{ Thread.sleep(Long.MAX_VALUE); }catch(InterruptedException ignored){} try{ Thread.sleep(Long.MAX_VALUE); }catch(InterruptedException ignored){}