fix: Potential fix for inventory buttons resetting
This commit is contained in:
@@ -60,7 +60,6 @@ object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "feature
|
||||
loadFeature(PowerUserTools)
|
||||
loadFeature(Waypoints)
|
||||
loadFeature(ChatLinks)
|
||||
loadFeature(InventoryButtons)
|
||||
loadFeature(CompatibliltyFeatures)
|
||||
loadFeature(AnniversaryFeatures)
|
||||
loadFeature(QuickCommands)
|
||||
|
||||
@@ -22,18 +22,16 @@ import moe.nea.firmament.util.data.DataHolder
|
||||
import moe.nea.firmament.util.accessors.getRectangle
|
||||
import moe.nea.firmament.util.gold
|
||||
|
||||
object InventoryButtons : FirmamentFeature {
|
||||
override val identifier: String
|
||||
get() = "inventory-buttons"
|
||||
object InventoryButtons {
|
||||
|
||||
object TConfig : ManagedConfig(identifier, Category.INVENTORY) {
|
||||
object TConfig : ManagedConfig("inventory-buttons-config", Category.INVENTORY) {
|
||||
val _openEditor by button("open-editor") {
|
||||
openEditor()
|
||||
}
|
||||
val hoverText by toggle("hover-text") { true }
|
||||
}
|
||||
|
||||
object DConfig : DataHolder<Data>(serializer(), identifier, ::Data)
|
||||
object DConfig : DataHolder<Data>(serializer(), "inventory-buttons", ::Data)
|
||||
|
||||
@Serializable
|
||||
data class Data(
|
||||
@@ -41,9 +39,6 @@ object InventoryButtons : FirmamentFeature {
|
||||
)
|
||||
|
||||
|
||||
override val config: ManagedConfig
|
||||
get() = TConfig
|
||||
|
||||
fun getValidButtons() = DConfig.data.buttons.asSequence().filter { it.isValid() }
|
||||
|
||||
@Subscribe
|
||||
|
||||
@@ -70,6 +70,7 @@ abstract class ManagedConfig(
|
||||
category.configs.add(this)
|
||||
}
|
||||
|
||||
// TODO: warn if two files use the same config file name :(
|
||||
val file = Firmament.CONFIG_DIR.resolve("$name.json")
|
||||
val data: JsonObject by lazy {
|
||||
try {
|
||||
|
||||
@@ -137,11 +137,11 @@
|
||||
"firmament.config.fixes.peek-chat.description": "Hold this keybinding to view the chat as if you have it opened, but while still being able to control your character.",
|
||||
"firmament.config.fixes.player-skins": "Fix unsigned Player Skins",
|
||||
"firmament.config.fixes.player-skins.description": "Mark all player skins as signed, preventing console spam, and some rendering issues.",
|
||||
"firmament.config.inventory-buttons": "Inventory Buttons",
|
||||
"firmament.config.inventory-buttons.hover-text": "Hover Tooltip",
|
||||
"firmament.config.inventory-buttons.hover-text.description": "Hovering over inventory buttons will show the command they run.",
|
||||
"firmament.config.inventory-buttons.open-editor": "Open Editor",
|
||||
"firmament.config.inventory-buttons.open-editor.description": "Click anywhere to create a new inventory button or to edit one. Hold SHIFT to grid align.",
|
||||
"firmament.config.inventory-buttons-config": "Inventory Buttons",
|
||||
"firmament.config.inventory-buttons-config.hover-text": "Hover Tooltip",
|
||||
"firmament.config.inventory-buttons-config.hover-text.description": "Hovering over inventory buttons will show the command they run.",
|
||||
"firmament.config.inventory-buttons-config.open-editor": "Open Editor",
|
||||
"firmament.config.inventory-buttons-config.open-editor.description": "Click anywhere to create a new inventory button or to edit one. Hold SHIFT to grid align.",
|
||||
"firmament.config.item-hotkeys": "Item Hotkeys",
|
||||
"firmament.config.item-hotkeys.global-trade-interface": "Search on Bazaar/AH",
|
||||
"firmament.config.item-hotkeys.global-trade-interface.description": "Press this button to search the hovered item on the bazaar or auction house.",
|
||||
|
||||
Reference in New Issue
Block a user