Skip to content

Commit

Permalink
Fix the big heads scaledown running before config init
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Aug 16, 2021
1 parent 48df988 commit 62cb816
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
13 changes: 13 additions & 0 deletions src/main/kotlin/skytils/skytilsmod/Skytils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,23 @@ class Skytils {
GuiManager.GUISCALES["Crystal Hollows Map"] = 1f
PersistentSave.markDirty<GuiManager>()
}
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
Expand Down
17 changes: 0 additions & 17 deletions src/main/kotlin/skytils/skytilsmod/core/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 62cb816

Please sign in to comment.