From 0dcb836f37ef047b56ba5bfd5adcf7510c838199 Mon Sep 17 00:00:00 2001 From: Pieter12345 Date: Fri, 27 Dec 2024 00:01:52 +0100 Subject: [PATCH] Fix Resource type usage in function docs --- src/main/java/com/laytonsmith/core/functions/Meta.java | 2 +- .../java/com/laytonsmith/core/functions/ResourceManager.java | 4 ++-- src/main/java/com/laytonsmith/core/functions/Sandbox.java | 3 ++- .../java/com/laytonsmith/core/functions/StringHandling.java | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/laytonsmith/core/functions/Meta.java b/src/main/java/com/laytonsmith/core/functions/Meta.java index d0a0b88cf..12898fd3a 100644 --- a/src/main/java/com/laytonsmith/core/functions/Meta.java +++ b/src/main/java/com/laytonsmith/core/functions/Meta.java @@ -1402,7 +1402,7 @@ public Integer[] numArgs() { @Override public String docs() { - return "resource {} Returns a copy of the underlying engine's environment object. This is only useful to embedded scripting" + return "Resource {} Returns a copy of the underlying engine's environment object. This is only useful to embedded scripting" + " engines that are attempting to call back into " + Implementation.GetServerType().getBranding() + ". The object returned" + " is a CResource."; } diff --git a/src/main/java/com/laytonsmith/core/functions/ResourceManager.java b/src/main/java/com/laytonsmith/core/functions/ResourceManager.java index 0b74eec87..290d6ba6a 100644 --- a/src/main/java/com/laytonsmith/core/functions/ResourceManager.java +++ b/src/main/java/com/laytonsmith/core/functions/ResourceManager.java @@ -170,7 +170,7 @@ public Integer[] numArgs() { @Override public String docs() { - return "resource {type, [data]} Creates a new resource, which is stored in memory. Various" + return "Resource {type, [data]} Creates a new resource, which is stored in memory. Various" + " functions require resources of certain types, which are created with this function." + " Barring resources that you intend on keeping around indefinitely, each call" + " to res_create_resource should be paired with a res_free_resource, being careful" @@ -235,7 +235,7 @@ public Integer[] numArgs() { @Override public String docs() { - return "void {resource} Frees the given resource. This should ALWAYS be called at some point after creating a resource" + return "void {Resource} Frees the given resource. This should ALWAYS be called at some point after creating a resource" + " with res_create_resource, once you are done with the resource."; } diff --git a/src/main/java/com/laytonsmith/core/functions/Sandbox.java b/src/main/java/com/laytonsmith/core/functions/Sandbox.java index 5842e5440..78bfe9015 100644 --- a/src/main/java/com/laytonsmith/core/functions/Sandbox.java +++ b/src/main/java/com/laytonsmith/core/functions/Sandbox.java @@ -419,7 +419,8 @@ public Integer[] numArgs() { @Override public String docs() { - return "double {randomResource} Returns a new rand value. If the seed used to create the resource is the same, each resulting" + return "double {Resource} Returns a new rand value using the provided a RANDOM Resource." + + " If the seed used to create the resource is the same, each resulting" + " series of numbers will be the same."; } diff --git a/src/main/java/com/laytonsmith/core/functions/StringHandling.java b/src/main/java/com/laytonsmith/core/functions/StringHandling.java index 153340bf5..46c8f19a8 100644 --- a/src/main/java/com/laytonsmith/core/functions/StringHandling.java +++ b/src/main/java/com/laytonsmith/core/functions/StringHandling.java @@ -2071,7 +2071,7 @@ public Integer[] numArgs() { @Override public String docs() { - return "void {resource, toAppend...} Appends any number of values to the underlying" + return "void {Resource, toAppend...} Appends any number of values to the underlying" + " string builder. This is much more efficient than doing normal concatenation" + " with a string when building a string in a loop. The underlying resource may" + " be converted to a string via a cast, string(@res).";