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

Load every options file from all asset libraries #367

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bctix
Copy link
Contributor

@bctix bctix commented Aug 17, 2024

This solves an issue I had where addons would replace the mod options.

Instead of just loading the options from the top-most library + source, it gets the options from every library.

before (only the addon1 options are shown)
image

after (now all options from every library is shown)
image

@NexIsDumb
Copy link
Member

but what if addons wanted to modify the options of that mod?

@bctix
Copy link
Contributor Author

bctix commented Aug 17, 2024

but what if addons wanted to modify the options of that mod?

Sorry if im not understanding, but why would an addon want to do that?

Also, that wouldn't stop the possibility that if multiple addons want to replace a mods options, only one of those addons would show.

@NexIsDumb
Copy link
Member

NexIsDumb commented Aug 17, 2024

but what if addons wanted to modify the options of that mod?

Sorry if im not understanding, but why would an addon want to do that?

Also, that wouldn't stop the possibility that if multiple addons want to replace a mods options, only one of those addons would show.

thats what i mean, addons aren't only for overriding
that there are certain addons that instead of overriding options, they add them

@bctix
Copy link
Contributor Author

bctix commented Aug 17, 2024

Okay, now I know I'm misunderstanding something, leme explain why i made this pr in the first place.

Lets say i have my own mod with its own options. Then lets say i got an addon like Hud Buddies for example.

Since i added hud buddies i'd be unable to change my mods options cause HudBuddies would replace it in the options menu. I would have to remove Hud Buddies temporarily from my addons so my mods options would show.

That's why i made this pr.

Sorry id there are any typos, im typing this out on my phone

@NeeEoo
Copy link
Member

NeeEoo commented Aug 17, 2024

I think like make it so if it has like the same structure? or like overrides="modname" that it would use the replaced one instead

@bctix
Copy link
Contributor Author

bctix commented Aug 17, 2024

The last commit adds that override idea neo had. intended to be used like this.

<!DOCTYPE codename-mod-options>

<menu name="Mod Options" desc="Modify mod options here" override="modname">
	...
</menu>

It's intended for just mods (since mods are loaded last). I haven't tested with addons overriding addons, but I'm not sure that will happen much if at all.

@NexIsDumb
Copy link
Member

aight i think its time to consider this since i removed the examples, though wouldnt it better if the credits menu had it too for its xmls? since the behaviour is the exact same one of options’

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

Successfully merging this pull request may close these issues.

3 participants