1. I have a plugin that is likely to reach several thousand lines of code with multiple classes. Using Oxide, is it possible to split up my plugin into multiple files? I would really like to have each class in its own file. Also, I have read the API section in the docs, but that doesn't allow for any typing on method calls, since it uses a string to find the method to call.

    Thanks for any help
     
  2. Wulf

    Wulf Community Admin

    Yes, you can split into as many files as you'd like. You can have Ext.Name.cs files under the oxide/plugins/include folder that plugins can reference, you can // Require: PluginName at the top of your fine and add using statements for referencing methods directly, or you can use the plugin.Call method like how you saw in the Docs.
     
  3. Brilliant! Thanks. Also, thanks for all of the work you put into this great project and community!
     
  4. Still kind of confused here. Here is an example of the structure I'm using.

    ------------------------------------------------------------------
    File: oxide/plugins/MyPlugin.cs

    // Require: MyPluginAddition

    usings...
    namespace Oxide.Plugins
    {
    [Info("MyPlugin", "Me", 0.1)]
    class MyPlugin : RustPlugin
    {
    [PluginReference] MyPluginAddition addition;
    }
    }

    ------------------------------------------------------------------
    File: oxide/plugins/include/MyPluginAddition.cs

    usings...

    namespace Oxide.Plugins
    {
    [Info("MyPluginAddition", "Me", 0.1)]
    class MyPluginAddition : RustPlugin
    {
    }
    }

    I'm getting errors "The type or namespace MyPluginAddition cannot be found from the MyPlugin.cs? I feel like I'm misunderstanding how to set this up.
     
  5. Wulf

    Wulf Community Admin

    Make your classes public in the plugin you want to access. You can then call them by their method.
     
  6. Is this still possible?
     
  7. Wulf

    Wulf Community Admin

    Yes, still possible.
     
  8. Made a new post about a issue i have splitting files (Splitting plugin over multiple files | Oxide), but i am not sure how is works, when adding
    Code:
    // Require: Foo
    it seems to completly ignore the include folder.
     
  9. Wulf

    Wulf Community Admin

    Please use the other thread, not both. The include folder is for something else entirely though (not actual plugins, just dependent code).
     
  10. You can make plugin builder