feat: API 5, bosses, passive NPCs and the example profiles (stage 6) #10

Merged
whitlocktech merged 4 commits from feat/stage-6 into edge 2026-10-06 00:45:58 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 1e927f6a66 - Show all commits

View File

@@ -3946,7 +3946,7 @@ namespace Oxide.Plugins
private const string DataState = "RunicNPC/state";
/// <summary>The permission every example kit needs, which nobody is granted: no player can claim one by name (D284).</summary>
private const string ExamplePermission = "runicnpc.examplekits";
private const string ExamplePermission = "kits.runicnpc";
private sealed class StateFile
{

View File

@@ -2143,8 +2143,8 @@ namespace Oxide.Plugins
string[] missing = exampleKits.Where(k => !(kits?.Call("IsKit", k) is bool && (bool)kits.Call("IsKit", k))).ToArray();
Check("s6.examples.kits", missing.Length == 0, missing.Length == 0 ? "all four in Kits" : "missing: " + string.Join(", ", missing));
JObject kitFile = Interface.Oxide.DataFileSystem.ReadObject<JObject>("Kits/kits_data");
Check("s6.examples.permission", exampleKits.All(k => (string)kitFile?["_kits"]?[k]?["RequiredPermission"] == "runicnpc.examplekits"),
"each needs runicnpc.examplekits, which nobody is granted");
Check("s6.examples.permission", exampleKits.All(k => (string)kitFile?["_kits"]?[k]?["RequiredPermission"] == "kits.runicnpc"),
"each needs kits.runicnpc, which nobody is granted");
JObject state = Interface.Oxide.DataFileSystem.ReadObject<JObject>("RunicNPC/state");
Check("s6.examples.once", state?["examplesWritten"]?.Type == JTokenType.Boolean && (bool)state["examplesWritten"], "state.json: " + state?.ToString(Formatting.None));
JObject items = kitFile?["_kits"]?["rnpc_juggernaut"] as JObject;