1. mTrX

    mTrX Scavenger

    So I wrote a little function helper class and put it under plugins / include.

    However, is it possible to add a Load/Unload method? I need to do some initialize when my helper class gets loaded.
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Your plugin won't compile if you rely on something in an include file, so I don't think that's really possible.
     
  3. mTrX

    mTrX Scavenger

    I think you misunderstood me, plugins do work fine. I made a namespace under plugins/include and my plugins do all have access to this namespace.

    The only question I have is since the namespace is not a plugin, just a pure namespace, is there some sort of base class where my namespace inherits some default methods like IncludeLoaded / IncludeUnloaded?

    Oxide loading the include file but they're not registered as a plugin that's fine, but I might load/unload call load Loaded/Unloaded just for includes.
     
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Once the include file is detected and loaded, it's there until modified or removed. You can access it via the namespace assigned in it as you would native Rust code or any other loaded DLL.
     
  5. mTrX

    mTrX Scavenger

    I know that. Maybe I wrote my question wrong.

    Are there any overloaded methods for an include for like Loaded/Unloaded ?
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    There are no hooks for include files if that is what you are asking.
     
  7. mTrX

    mTrX Scavenger

    Thanks. Would be nice to see two hooks for include files in the future if it's possible, Loaded + Unloaded is needed on my side.
     
  8. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    They aren't plugins, so I don't really see a need for that. If your plugin references an include file, it is reloaded automatically based on that plugin changing.