Skip to content

Create a new Assembly Attribute for an easy Soft Dependency#56

Merged
MaxWasUnavailable merged 3 commits into
masterfrom
assembly-attribute
Mar 1, 2024
Merged

Create a new Assembly Attribute for an easy Soft Dependency#56
MaxWasUnavailable merged 3 commits into
masterfrom
assembly-attribute

Conversation

@Xilophor
Copy link
Copy Markdown
Collaborator

@Xilophor Xilophor commented Mar 1, 2024

Currently, for soft dependencies, you have to register your mod with the method provided, which modders would have to use a somewhat weird way to access that method only when this mod is loaded. Attributes are significantly easier and generally do not cause issues during runtime, however the current attribute causes issues due to how BepInEx attempts to load the "plugin" class - including the attribute - at runtime.

For this, a new attribute - currently called SoftLobbyCompatibility - is added in this PR. It is an assembly attribute that can be used to register a mod only when the Lobby Compatibility mod is loaded. The attribute is simple and clean.

Comment thread LobbyCompatibility/Attributes/SoftLobbyCompatibilityAttribute.cs
@MaxWasUnavailable MaxWasUnavailable merged commit 1d29571 into master Mar 1, 2024
@Xilophor Xilophor deleted the assembly-attribute branch March 1, 2024 17:59
Xilophor added a commit that referenced this pull request Mar 22, 2024
MaxWasUnavailable pushed a commit that referenced this pull request Mar 22, 2024
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.

2 participants