Rune580 / LethalCompanyInputUtils

GNU Lesser General Public License v3.0
12 stars 5 forks source link

Allow optionally-defined BepInPlugin to support library usage #43

Closed FerusGrim closed 2 months ago

FerusGrim commented 2 months ago

For 99% of use-cases, LcInputActions as it is now works fine. However, if you're developing a library that interfaces with it and want to wrap around it, the check for the plugin from the calling assembly will always return the library, which obviously causes a problem.

This modification is simple, won't break existing usages, and allows you to optionally define which Plugin owns the LcInputActions implementation.

Rune580 commented 2 months ago

I see, I never considered this use case. it'll have to wait until the next 0.x.x release but, it seems fine.

Rune580 commented 2 months ago

This PR breaks existing mods. Said mods would have to re-compile against the newest version of InputUtils and thus breaks backwards-compatibility.

Rune580 commented 2 months ago

This is because the constructors method signature is changed since the parameters were modified. In order to maintain backwards-compat, you'd need to make an overload of the constructor instead.