Skip to content

First Pass On XML-Based Store Expansions#51

Open
Dargino wants to merge 7 commits intoBetter-Scenes:masterfrom
Dargino:Dargino-patch-1
Open

First Pass On XML-Based Store Expansions#51
Dargino wants to merge 7 commits intoBetter-Scenes:masterfrom
Dargino:Dargino-patch-1

Conversation

@Dargino
Copy link
Copy Markdown

@Dargino Dargino commented Mar 26, 2024

This is a first draft for expanding the silver store with new actions via companion mods.
Action data (title, description, silver cost, etc) are provided via XML, accessible via Rimworld's DefDictionary.
The definition also has a pointer to a class (inheriting from the Action abstract).
This custom action class can be located in the assemblies of any mod loaded after RimConnect (or in RimConnect's own assemblies).
A new list for all custom actions is created, and the action definitions are loaded using the GetAction() function.
The custom actions list is appended to the built-in lists to be added to the silver store.

Everything else is handled by the existing code structure.

I have tested it to the point of working without producing console errors, but rigorous bug testing has not been done.

Also, please review this carefully.. I'm not great with github, so something might be misplaced..

@Dargino
Copy link
Copy Markdown
Author

Dargino commented Mar 26, 2024

Also, I suggest exposing the AlertManager class to public so that expansion actions can trigger the Twitch Event letters, too

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.

1 participant