Fixed crash caused by invalid NinePatch sprites

This commit is contained in:
Anuken
2021-07-06 15:23:37 -04:00
parent 01a3c772e7
commit 017552f573
5 changed files with 9 additions and 7 deletions

View File

@@ -659,12 +659,12 @@ public class Blocks implements ContentList{
}};
disassembler = new Separator("disassembler"){{
requirements(Category.crafting, with(Items.graphite, 140, Items.titanium, 100, Items.silicon, 150, Items.surgeAlloy, 70));
requirements(Category.crafting, with(Items.plastanium, 40, Items.titanium, 100, Items.silicon, 150, Items.thorium, 80));
results = with(
Items.sand, 4,
Items.graphite, 2,
Items.titanium, 2,
Items.thorium, 1
Items.thorium, 2
);
hasPower = true;
craftTime = 15f;

View File

@@ -39,6 +39,8 @@ public class Styles{
public static TreeStyle defaultTree;
public static void load(){
var whiteui = (TextureRegionDrawable)Tex.whiteui;
black = whiteui.tint(0f, 0f, 0f, 1f);
black9 = whiteui.tint(0f, 0f, 0f, 0.9f);
black8 = whiteui.tint(0f, 0f, 0f, 0.8f);

View File

@@ -423,7 +423,7 @@ public class ModsDialog extends BaseDialog{
//textures are only requested when the rendering happens; this assists with culling
if(!textureCache.containsKey(repo)){
textureCache.put(repo, last = Tex.nomap.getRegion());
textureCache.put(repo, last = Core.atlas.find("nomap"));
Core.net.httpGet("https://raw.githubusercontent.com/Anuken/MindustryMods/master/icons/" + repo.replace("/", "_"), res -> {
if(res.getStatus() == HttpStatus.OK){
Pixmap pix = new Pixmap(res.getResult());