LuaCsForBarotrauma icon indicating copy to clipboard operation
LuaCsForBarotrauma copied to clipboard

Let us have souce code mod and compiled mod in the same package

Open SomeRandomNoobKekeke opened this issue 9 months ago • 1 comments

No discussions, huh?

If you try to do that you'll get: Image Image It seems that they're loaded with the same name of the package, mb add "[Code]" to "in memory" assembly?

Also changing assembly name in VSProjectSkeleton doesn't help

Why?

That could work as a workaround to this https://github.com/evilfactory/LuaCsForBarotrauma/issues/245 "In memory" mod would add harmony patches that would just call hooks And assembly mod would use hooks instead of harmony patches

Edit: Actually already did that in lua

SomeRandomNoobKekeke avatar Mar 17 '25 15:03 SomeRandomNoobKekeke

The system already supports this. No, the name of the compiled assembly is either the name of the mod (sanitized) or a specific internal name for internal type access.

You just need to name your output dlls something else in your project. The dll names do not need to match the Package name. In the rework, you can give names to different assemblies compiled from sources at runtime in the new config to make this easier.

MapleWheels avatar Mar 18 '25 19:03 MapleWheels