Adds callback for the specified mod API
API name
callback that is called when API is loaded
Recursively copies (duplicates) the object to the new one
an object to be copied
if true, copies the object recursively
a copy of the object
Recursively clones object to the new one counting call depth and interrupting copying after 7th recursion call
an object to be cloned
if true, copies the object recursively
current recursion state, if > 6, recursion stops. Default value is 0
cloned object, all the properties that are less then then 8 in depth, get copied
same as ModAPI.cloneObject, but if call depth is more then 6, returns "stackoverflow" string value
Ensures target object has all the properties the source object has, if not, copies them from source to target object.
object to copy missing values from
object to copy missing values to
Registers new API for the mod and invokes mod API callback
API name used to import it in the other mods
object that is shared with the other mods. May contain other objects, methods, variables, etc. Sometimes it is useful to provide the ability to run third party code in your own mod, you can create a method that provides such possibility:
requireGlobal: function(command){
return eval(command);
}
simple documentation for the mod API
full name of the API, if not specified, name parameter value is used
object containing descriptions of methods and properties of the API, where keys are methods and properties names and values are their descriptions
Gets API by its name. The best approach is to call this method in the function passed as the second parameter of ModAPI.addAPICallback.
Example:
// importing API registered by IndustrialCraft PE
var ICore;
ModAPI.addAPICallback("ICore", function(api){
ICore = api;
});
When using ICore variable from the example, be sure to check it for null because Industrial Craft PE may not be installed on the user's phone
API name
API object if an API with specified was previously registered, null otherwise
Fetches information about the method or property of mod API
API name
property or method name
string description of the method or null if no description was provided by API vendor
API name
documentation for the specified mod API
Executes string in Core Engine's global context. Can be used to get functions and objects directly from AdaptedScriptAPI.
string to be executed in Core Engine's global context
Generated using TypeDoc
Module used to share mods' APIs