feat!: RunicNPC v1.0.0, edge → main (runicnpc 9e step 3, merge 1 of 3) #19
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user