risk-of-thunder / R2API

A modding API for Risk of Rain 2
https://thunderstore.io/package/tristanmcpherson/R2API/
MIT License
136 stars 55 forks source link

R2API.Rules submodule, simplified creation and management of RuleDefs for the RuleCatalog #454

Closed Nebby1999 closed 1 year ago

Nebby1999 commented 1 year ago

This PR adds the R2API.Rules submodule.

Despite R2API.LobbyConfig already existing (which also works on the existing RuleDef and RuleCatalog system the game has). both LobbyConfig and Rules aim to fix different issues and in different ways (LobbyConfig seems to be a pretty old API)

Alongside the new submodule, this PR also downgrades the dotNet version of the BuildCL from 7 to 6.

xiaoxiao921 commented 1 year ago

Revert Dotnet version chsnge

Nebby1999 commented 1 year ago

Need to fix an issue, closing for now

Nebby1999 commented 1 year ago

I just pushed a new commit that adds a SystemInitializer dependency injection feature to the namespace R2API.Utils

This class can be used to inject dependencies to any SystemInitializer attribute, I can see this being useful in situations where Time sensitivity is critical (IE: The rulebook system intializer executing before a mod adds new rules, which would cause a desync between the catalog and the RuleBook class)

I think some attempts should be made to avoid accidentally creating infinite loops? i'm unsure.