UIInfoSuite2 icon indicating copy to clipboard operation
UIInfoSuite2 copied to clipboard

Feature Request: Support for configuration of which features to use

Open jamespfluger opened this issue 1 year ago • 2 comments

Summary (tl;dr)

I'd like to see the ability to turn on/off certain features through the ModConfig
The only information I need is whether or not you want it implemented and how you'd like it to be implemented (static config property or using dependency injection)

Problem/Use Case

I love UI Info Suite,

When I play by myself, I love seeing how long a crop will take to grow and displaying the queen of sauce info and the daily luck. When I play with my sister I don't like seeing these in split-screen.

When I play with my sister I love seeing when animals need to be petted and the sprinkler/scarecrow ranges. And sometimes I prefer this when I play by myself.

So it would be nice to have those options configurable.

Solution

Using the Generic Mod Configuration, as already used by Compatability/IGenericModConfigMenuApi.cs, I suggest adding boolean options to ModConfig.cs that allow for configuration of these. They would all default to true, as that is the current behavior. For example:

internal class ModConfig
{
    public bool ShowOptionsTabInMenu { get; set; } = true;
    public string ApplyDefaultSettingsFromThisSave { get; set; } = "JohnDoe_123456789";
    public KeybindList OpenCalendarKeybind { get; set; } = KeybindList.ForSingle(SButton.B);
    public KeybindList OpenQuestBoardKeybind { get; set; } = KeybindList.ForSingle(SButton.H);

    /* NEW */
    public bool ShouldShowDailyLuck { get; set; } = true;
    public bool ShouldShowExperiencePointGains { get; set;} = true;
    public bool ShouldShowExperienceBar { get; set;} = true;
    public bool ShouldShowMoreAccurateHeartLevels { get; set;} = true;
        
    /* [and more entries for the other features] */
}

Thoughts?

The implementation would be to simply pass in the configuration or make it globally accessible. Wouldn't you love making that private static ModConfig _modConfig a public auto-property?j

In all seriousness, this could be passed in by using a static auto-property (easy) or by using class dependency injection. I'd slightly prefer the static property approach for simplicity, but have no significant strong feelings, as this isn't my code.

Who implements it?

I can! Unless you'd prefer to do it on your own.

jamespfluger avatar Feb 11 '24 18:02 jamespfluger

To be clear: I'm aware there is a configurable menu within the "Start Menu/Inventory/Relationships/Maps/etc" screen, but as far as I've been able to tell, this configuration is for the entire mod.

If I'm using the Stardrop mod manager, I can set different configurations for different profiles. This allows me to set configuration for my own games vs games with others.

Let me know your thoughts on moving the configuration to a single space. I'm not currently sure why the configuration is located in two areas.

jamespfluger avatar Feb 12 '24 03:02 jamespfluger

@jamespfluger I'm confused about the ask.
You want the config in the inventory menu to be part of the GenericModConfig menu?
Currently the implementation is per-world, so I'd imagine there'd have to be some changes to how that works

drewhoener avatar Feb 28 '24 00:02 drewhoener