Skip to content

Commit

Permalink
Fix Resource type usage in function docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter12345 committed Dec 26, 2024
1 parent 11c33f8 commit 0dcb836
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/laytonsmith/core/functions/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.";
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/laytonsmith/core/functions/Sandbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).";
Expand Down

0 comments on commit 0dcb836

Please sign in to comment.