1. Wulf

    Wulf Community Admin

    That'd be great, because all other Oxide.Ext.* extensions I've tested along with dependent plugins have had no issues loading across multiple games.
     
  2. I'll send it your way on one condition: you start a conversation with me so I can send it privately.
     
  3. Wulf

    Wulf Community Admin

    With the version you sent me:
    1. No need to use // Reference, just use the using statement. Any // Reference will be ignored as it isn't needed, only using statements.
    2. Namespace should match filename or at least be prefixed with Oxide, so Oxide.Ext.AutoWipe, not AutoWipe.
    3. You don't need to specify IsGameExtension (or IsCoreExtension for that matter), as those should and are only used by Oxide's core stuff.

    With the above changes made, confirmed to be working just fine.

    06cd0c9de290cf2464c0876249b5d4ad.png
     
  4. Oops, I enjoy making mistakes and blaming Oxide.
     
  5. Wulf

    Wulf Community Admin

    No worries, I wasn't quite sure of how it was all handled until I dug into it for the recent changes. I can't recall who wrote it originally.
     
  6. Just to follow up, I solved the issue I was having. While digging through some more of the source code I found that the extensions "Name" property and the suffix in the extensions namespace must be the exact same in order to have plugins reference the extension correctly.
     
  7. Wulf

    Wulf Community Admin

    The Name and the namespace do not need to match, none of ours do (ex. Oxide.Core.Lua and Lua). The namespace does need to start with Oxide. though, the Name can be anything as it isn't used for the loading or referencing, only log output.
     
  8. Any "Oxide.Core" plugin does not follow the scheme.


    this function in the Compilation.cs: Oxide/Compilation.cs at 6ffe28cd16a59c6a3ccbbb80e1ccc935d667fdd7 · OxideMod/Oxide · GitHub

    handles referencing Extensions.

    So for example. With my extension "Oxide.Ext.UI" the REGEX check on line 257 from the above link would return:

    Full match 0-12 `Oxide.Ext.UI`
    Group 1. 0-12 `Oxide.Ext.UI`
    Group 2. 10-12 `UI`

    On lines 261 and 262 it becomes apparent.

    Code:
    var name = match.Groups[2].Value;
    if (extensionNames.Contains(name)) continue;
    var name becomes `UI` and this is checked against the extensionNames variable. Which is set on line 49. Code:
    Code:
    extensionNames = Interface.Oxide.GetAllExtensions().Select(ext => ext.Name).ToArray();
    So the select method returns an array of the Name property of all extensions.

    Therefore, the suffix on the extension (in this case `UI`) needs to be the same set in the extensions Name property.

    Not saying this is wrong, just saying that is what caused all my problems when trying to create my first extension and will hopefully help anyone with a similar issue.

    To show it in an extension. These underlined in red need to be the exact same.
    [​IMG]