From 62cb8169490f2942d2a08215a4aad9b566143f03 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 16 Aug 2021 15:28:15 -0400 Subject: [PATCH] Fix the big heads scaledown running before config init --- src/main/kotlin/skytils/skytilsmod/Skytils.kt | 13 +++++++++++++ .../kotlin/skytils/skytilsmod/core/Config.kt | 17 ----------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/main/kotlin/skytils/skytilsmod/Skytils.kt b/src/main/kotlin/skytils/skytilsmod/Skytils.kt index 054baa111..f9017cde1 100644 --- a/src/main/kotlin/skytils/skytilsmod/Skytils.kt +++ b/src/main/kotlin/skytils/skytilsmod/Skytils.kt @@ -299,10 +299,23 @@ class Skytils { GuiManager.GUISCALES["Crystal Hollows Map"] = 1f PersistentSave.markDirty() } + if (config.largerHeadScale > 2) { + config.largerHeadScale /= 100 + } + if (config.itemDropScale > 5) { + config.itemDropScale /= 100f + } + if (config.itemRarityOpacity > 1) { + config.itemRarityOpacity /= 100f + } + if (config.transparentHeadLayer > 1) { + config.transparentHeadLayer /= 100f + } } } } config.lastLaunchedVersion = VERSION + config.markDirty() } @SubscribeEvent diff --git a/src/main/kotlin/skytils/skytilsmod/core/Config.kt b/src/main/kotlin/skytils/skytilsmod/core/Config.kt index 60b769512..9ecf673f8 100644 --- a/src/main/kotlin/skytils/skytilsmod/core/Config.kt +++ b/src/main/kotlin/skytils/skytilsmod/core/Config.kt @@ -2172,23 +2172,6 @@ object Config : Vigilant(File("./config/skytils/config.toml"), "Skytils", sortin } this.dataURL = "https://cdn.jsdelivr.net/gh/Skytils/SkytilsMod-Data@main/" - - if (this.largerHeadScale > 2) { - this.largerHeadScale /= 100 - markDirty() - } - if (this.itemDropScale > 5) { - this.itemDropScale /= 100f - markDirty() - } - if (this.itemRarityOpacity > 1) { - this.itemRarityOpacity /= 100f - markDirty() - } - if (this.transparentHeadLayer > 1) { - this.transparentHeadLayer /= 100f - markDirty() - } } private object ConfigSorting : SortingBehavior() {