Hi, I've seen the PluginReference implementation, but if I want to bring out certain functionality not as a separate plugin, but for more readable code. There were such suggestions https://oxidemod.org/threads/is-it-possible-to-break-plugins-out-into-multiple-files.21919/ Can you give a definite answer whether it is possible
Splitting the plugin into several filesSolved
Your plugin (oxide/plugins/Example.cs):
using Oxide.Ext.ExampleExt;
namespace Oxide.Plugins
{
[Info("Example", "Me", "0.0.1")]
public class Example: CovalencePlugin
{
private Init()
{
LogWarning(GetHello());
}
}
}
Your include file (oxide/plugins/include/Ext.Example.cs):
namespace Oxide.Ext.ExampleExt
{
public class ExampleExt
{
public string GetHello()
{
return "Hello world";
}
}
}
This is based on memory, so may not entirely be working. I believe // Include is the actual magic comment to use, not // Requires like I originally mentioned in the thread you linked.
Unfortunately, this functionality is limited. I want all plugins to have a reference to my requests, because it will not differ
Merged post
Roughly speaking, the library
This would be the same functionality as referencing native C# files essentially. The only other option is writing an extension or standard DLL.
Well, in the DLL example, how do you plug it in?
Any DLL you want to use would have to be referenced by your plugin. For extensions, those are loaded automatically by Oxide. For regular DLLs, you'd have to add a "// Reference: DLLName" to the top of your plugin in order for the DLL to be picked up by the compiler.rtbbebdWell, in the DLL example, how do you plug it in?
Locked automatically