Skip to content

Commit

Permalink
Add Hide Vanilla HUD Options from SBA
Browse files Browse the repository at this point in the history
See #350
  • Loading branch information
My-Name-Is-Jeff committed Mar 21, 2023
1 parent 20f704d commit 77e0b5a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,13 @@ object Config : Vigilant(
)
var hideAirDisplay = false

@Property(
type = PropertyType.SWITCH, name = "Hide Armor Display",
description = "Prevents the game from rendering the vanilla armor points.",
category = "Miscellaneous", subcategory = "Quality of Life"
)
var hideArmorDisplay = false

@Property(
type = PropertyType.SWITCH, name = "Hide Cheap Coins",
description = "Prevents the game from rendering cheap coins.",
Expand Down Expand Up @@ -1844,6 +1851,13 @@ object Config : Vigilant(
)
var hideFishingHooks = false

@Property(
type = PropertyType.SWITCH, name = "Hide Hunger Display",
description = "Prevents the game from rendering the vanilla hunger points.",
category = "Miscellaneous", subcategory = "Quality of Life"
)
var hideHungerDisplay = false

@Property(
type = PropertyType.SWITCH, name = "Hide Jerry Rune",
description = "Prevents the game from rendering the items spawned by the Jerry rune.",
Expand Down Expand Up @@ -1879,6 +1893,14 @@ object Config : Vigilant(
)
var hideScoreboardScore = false


@Property(
type = PropertyType.SWITCH, name = "Hide Vanilla Health Display",
description = "Prevents the game from rendering the vanilla heart points.",
category = "Miscellaneous", subcategory = "Quality of Life"
)
var hideHealthDisplay = false

@Property(
type = PropertyType.SWITCH, name = "Highlight Disabled Potion Effects",
description = "Marks disabled potion effects in the toggle menu.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ object MiscFeatures {
if (!Utils.inSkyblock) return
if (event.type == RenderGameOverlayEvent.ElementType.AIR && Skytils.config.hideAirDisplay && !Utils.inDungeons) {
event.isCanceled = true
} else if (event.type == RenderGameOverlayEvent.ElementType.ARMOR && Skytils.config.hideArmorDisplay) {
event.isCanceled = true
} else if (event.type == RenderGameOverlayEvent.ElementType.FOOD && Skytils.config.hideHungerDisplay) {
event.isCanceled = true
} else if (event.type == RenderGameOverlayEvent.ElementType.HEALTH && Skytils.config.hideHealthDisplay) {
event.isCanceled = true
}
}

Expand Down

0 comments on commit 77e0b5a

Please sign in to comment.