Jump to content

Modding API Improvement: SendPacket overload with non-generic version (using System.Type)


00500005

Recommended Posts

I'm currently making a simple auto-registry for various bits of a mod I'm working on, and I keep hitting my head on C#'s generic system.

It would be really nice if SendPacket (in both IClientNetworkChannel + IServerNetworkChannel) had overloads that allowed you to pass a System.Type object rather than being forced to always use the generics system.

As it stands, if I want to do some things that work across my mod and require SendPacket (for instance, making debug set commands), I have to manually re-type everything in an initialization context (because otherwise I lose type information). With the overload, I can just have a single list (that other mods can extend on as well, without also requiring knowledge of my mod's internals).

Edited by 00500005
Formatting
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.