Display content in mod error
This commit is contained in:
@@ -7,6 +7,7 @@ import io.anuke.arc.util.*;
|
|||||||
import io.anuke.mindustry.content.*;
|
import io.anuke.mindustry.content.*;
|
||||||
import io.anuke.mindustry.ctype.*;
|
import io.anuke.mindustry.ctype.*;
|
||||||
import io.anuke.mindustry.entities.bullet.*;
|
import io.anuke.mindustry.entities.bullet.*;
|
||||||
|
import io.anuke.mindustry.mod.Mods.*;
|
||||||
import io.anuke.mindustry.type.*;
|
import io.anuke.mindustry.type.*;
|
||||||
import io.anuke.mindustry.world.*;
|
import io.anuke.mindustry.world.*;
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@ public class ContentLoader{
|
|||||||
callable.accept(content);
|
callable.accept(content);
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
if(content.mod != null){
|
if(content.mod != null){
|
||||||
mods.handleError(e, content.mod);
|
mods.handleError(new ModLoadException(content, e), content.mod);
|
||||||
}else{
|
}else{
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -567,5 +567,13 @@ public class Mods implements Loadable{
|
|||||||
this.mod = content.mod;
|
this.mod = content.mod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ModLoadException(@Nullable Content content, Throwable cause){
|
||||||
|
super(cause);
|
||||||
|
this.content = content;
|
||||||
|
if(content != null){
|
||||||
|
this.mod = content.mod;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import io.anuke.arc.Core;
|
|||||||
import io.anuke.arc.graphics.Color;
|
import io.anuke.arc.graphics.Color;
|
||||||
import io.anuke.arc.graphics.g2d.TextureRegion;
|
import io.anuke.arc.graphics.g2d.TextureRegion;
|
||||||
import io.anuke.arc.scene.ui.layout.Table;
|
import io.anuke.arc.scene.ui.layout.Table;
|
||||||
|
import io.anuke.arc.util.ArcAnnotate.*;
|
||||||
import io.anuke.mindustry.entities.type.Player;
|
import io.anuke.mindustry.entities.type.Player;
|
||||||
import io.anuke.mindustry.ctype.UnlockableContent;
|
import io.anuke.mindustry.ctype.UnlockableContent;
|
||||||
import io.anuke.mindustry.graphics.Pal;
|
import io.anuke.mindustry.graphics.Pal;
|
||||||
@@ -31,7 +32,7 @@ public class Mech extends UnlockableContent{
|
|||||||
public float compoundSpeed, compoundSpeedBoost;
|
public float compoundSpeed, compoundSpeedBoost;
|
||||||
|
|
||||||
public float weaponOffsetX, weaponOffsetY, engineOffset = 5f, engineSize = 2.5f;
|
public float weaponOffsetX, weaponOffsetY, engineOffset = 5f, engineSize = 2.5f;
|
||||||
public Weapon weapon;
|
public @NonNull Weapon weapon;
|
||||||
|
|
||||||
public TextureRegion baseRegion, legRegion, region;
|
public TextureRegion baseRegion, legRegion, region;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user