Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per Slot Text Toggle #1043

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

viciscat
Copy link
Collaborator

@viciscat viciscat commented Nov 3, 2024

Moved Slot Text config to UI & Visuals and allowed configuring each adder individually

Adders just need to override a method that returns a ConfigInformation record.

Also I wanted to add a data fixer to move things but couldn't manage to do that :(

image

@LifeIsAParadox LifeIsAParadox added the reviews needed This PR needs reviews label Nov 3, 2024
Copy link
Collaborator

@kevinthegreat1 kevinthegreat1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine. I am wondering if all that ConfigInformation is needed instead of just an id but should be fine.

Also cc @Emirlol if he wants to look at the api. The system is that SlotTextAdder gets config information from each slot text adder instance, than calls SlotTextManager with the config information to get whether it's enabled.

@Emirlol
Copy link
Collaborator

Emirlol commented Nov 4, 2024

Looks pretty good. 2 things though:

  • Perhaps the ConfigInformation could be stored in SimpleSlotTextAdder, which is passed in with the constructor with a default overriding method to retrieve it rather than each class handling it by itself.
  • The way that the default value of true for enabled is hardcoded in multiple places (the createSlotTextToggles method and the getOrDefault calls) rather than just handing the value from the default config kinda feels unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviews needed This PR needs reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants