Skip to content

[WIP] Add Game Settings API contracts to Plugin Exports - #7

Open
Cryotechnic wants to merge 4 commits into
mainfrom
feat/gsp
Open

[WIP] Add Game Settings API contracts to Plugin Exports#7
Cryotechnic wants to merge 4 commits into
mainfrom
feat/gsp

Conversation

@Cryotechnic

Copy link
Copy Markdown
Member

This pull request introduces a new declarative game settings contract to the plugin core library (v0.1.6.0), enabling plugins to describe, serialize, and manage game settings pages in a standardized way. The main features include new data structures for settings pages, launcher and plugin-side APIs for settings access and mutation, and related test coverage. The library version is incremented to reflect these additions.

Game Settings Contract Implementation

  • Added new types for declarative game settings: GameSettingsPage, GameSettingsSection, GameSettingEntry, GameSettingChoice, and GameSettingKind, enabling plugins to define settings pages with various entry types (toggle, text, number, slider, choice). (UI/Settings/GameSettingsPage.cs [1] UI/Settings/GameSettingsSection.cs [2] UI/Settings/GameSettingEntry.cs [3] UI/Settings/GameSettingChoice.cs [4] UI/Settings/GameSettingKind.cs [5]
  • Implemented serialization and deserialization for the settings page contract using source-generated JSON context for efficient ABI transfer. (UI/Settings/GameSettingsPageSerializer.cs UI/Settings/GameSettingsPageSerializer.csR1-R20)

Plugin Core and Launcher Integration

  • Added new plugin ABI exports for getting the settings page, setting a value, and applying settings, with safe marshalling and error handling. (SharedStatic.V1Ext_Update6.cs [1] SharedStatic.V1Ext.cs [2]
  • Provided a launcher-side utility GameSettingsExtension.GameSettingsContext to access these APIs, check feature availability, and manipulate settings from the launcher. (Utility/GameSettingsExtension.cs Utility/GameSettingsExtension.csR1-R115)

Versioning and Documentation

  • Bumped the core library version to v0.1.6.0 and updated the implementation standard in the documentation to reflect the new version and features. (SharedStatic.cs [1] README.md [2]

Testing and CLI Enhancements

  • Added a test for the game settings contract round-trip and a corresponding CLI entry point for manual verification. (PluginTest/Test.GameSettings.cs [1] PluginTest/Program.cs [2] [3]

These changes establish a robust, extensible foundation for plugin-defined settings pages, facilitating future UI and integration work.

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