From d8cd07127c0d476e964b8731723b77fdd56817df Mon Sep 17 00:00:00 2001 From: DeltaNedas Date: Wed, 19 Aug 2020 07:07:56 +0100 Subject: [PATCH] print mod load time to log --- core/src/mindustry/mod/Mods.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index f7893eea1f..0b80960ba7 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -454,7 +454,7 @@ public class Mods implements Loadable{ content.setCurrentMod(null); } - Log.debug("Time to initialize modded scripts: @", Time.elapsed()); + Log.info("Time to initialize modded scripts: @", Time.elapsed()); } /** Creates all the content found in mod files. */ @@ -586,6 +586,8 @@ public class Mods implements Loadable{ /** Loads a mod file+meta, but does not add it to the list. * Note that directories can be loaded as mods.*/ private LoadedMod loadMod(Fi sourceFile) throws Exception{ + Time.mark(); + Fi zip = sourceFile.isDirectory() ? sourceFile : new ZipFi(sourceFile); if(zip.list().length == 1 && zip.list()[0].isDirectory()){ zip = zip.list()[0]; @@ -637,6 +639,7 @@ public class Mods implements Loadable{ meta.hidden = true; } + Log.info("Loaded mod '@' in @", meta.name, Time.elapsed()); return new LoadedMod(sourceFile, zip, mainMod, meta); }