From 71ae9e1274a83b1121b5b083c63da01ca7c116c5 Mon Sep 17 00:00:00 2001 From: DeltaNedas Date: Tue, 10 Nov 2020 22:46:57 +0000 Subject: [PATCH 1/2] add more info to schematic errors --- core/src/mindustry/game/Schematics.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/mindustry/game/Schematics.java b/core/src/mindustry/game/Schematics.java index 52de993d32..0f92fe87c7 100644 --- a/core/src/mindustry/game/Schematics.java +++ b/core/src/mindustry/game/Schematics.java @@ -133,6 +133,7 @@ public class Schematics implements Loadable{ try{ write(newSchematic, target.file); }catch(Exception e){ + Log.err("Failed to overwrite schematic '@' (@)", newSchematic.name, target.file); Log.err(e); ui.showException(e); } @@ -153,6 +154,7 @@ public class Schematics implements Loadable{ return s; }catch(Throwable e){ + Log.err("Failed to read schematic from file '@'", file); Log.err(e); } return null; @@ -188,6 +190,7 @@ public class Schematics implements Loadable{ try{ return getBuffer(schematic).getTexture(); }catch(Throwable t){ + Log.err("Failed to get preview for schematic '@' (@)", schematic.name, schematic.file); Log.err(t); errored.add(schematic); return errorTexture; From 6ba0bfe06a680a7fdb994cf330d04f92cc999636 Mon Sep 17 00:00:00 2001 From: DeltaNedas Date: Tue, 10 Nov 2020 23:33:53 +0000 Subject: [PATCH 2/2] h --- core/src/mindustry/game/Schematics.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/game/Schematics.java b/core/src/mindustry/game/Schematics.java index 0f92fe87c7..7db0531fb7 100644 --- a/core/src/mindustry/game/Schematics.java +++ b/core/src/mindustry/game/Schematics.java @@ -133,7 +133,7 @@ public class Schematics implements Loadable{ try{ write(newSchematic, target.file); }catch(Exception e){ - Log.err("Failed to overwrite schematic '@' (@)", newSchematic.name, target.file); + Log.err("Failed to overwrite schematic '@' (@)", newSchematic.name(), target.file); Log.err(e); ui.showException(e); } @@ -190,7 +190,7 @@ public class Schematics implements Loadable{ try{ return getBuffer(schematic).getTexture(); }catch(Throwable t){ - Log.err("Failed to get preview for schematic '@' (@)", schematic.name, schematic.file); + Log.err("Failed to get preview for schematic '@' (@)", schematic.name(), schematic.file); Log.err(t); errored.add(schematic); return errorTexture;