summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml25
-rw-r--r--doc/classes/Callable.xml16
2 files changed, 41 insertions, 0 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 95108f1613..af66a11fe5 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -652,6 +652,31 @@
Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
</description>
</method>
+ <method name="posmod">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Returns the integer modulus of [code]x/y[/code] that wraps equally in positive and negative.
+ [codeblock]
+ for i in range(-3, 4):
+ print("%2d %2d %2d" % [i, i % 3, posmod(i, 3)])
+ [/codeblock]
+ Produces:
+ [codeblock]
+ -3 0 0
+ -2 -2 1
+ -1 -1 2
+ 0 0 0
+ 1 1 1
+ 2 2 2
+ 3 0 0
+ [/codeblock]
+ </description>
+ </method>
<method name="pow">
<return type="float">
</return>
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index 0cfbd0270c..cbab1a8f50 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -151,6 +151,22 @@
Returns [code]true[/code] if both [Callable]s invoke the same custom target.
</description>
</method>
+ <method name="rpc" qualifiers="vararg const">
+ <return type="void">
+ </return>
+ <description>
+ Perform an RPC (Remote Procedure Call). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error.
+ </description>
+ </method>
+ <method name="rpc_id" qualifiers="vararg const">
+ <return type="void">
+ </return>
+ <argument index="0" name="peer_id" type="int">
+ </argument>
+ <description>
+ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error.
+ </description>
+ </method>
<method name="unbind" qualifiers="const">
<return type="Callable">
</return>