aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-28 00:38:20 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-03-28 00:38:20 +0300
commit04172e3dd0bf1b2645c4bbc0c819e4e3a5ab87e3 (patch)
tree6e70ee8185a0fde5bb3952f9e826ca54c846af47 /doc
parent2c56a9f58880887ae88c3707e15658855d86252e (diff)
downloadminetest-04172e3dd0bf1b2645c4bbc0c819e4e3a5ab87e3.tar.gz
minetest-04172e3dd0bf1b2645c4bbc0c819e4e3a5ab87e3.tar.bz2
minetest-04172e3dd0bf1b2645c4bbc0c819e4e3a5ab87e3.zip
Add PseudoRandom in Lua API
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 3a5927e9c..f66743a7d 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -599,6 +599,7 @@ methods:
returns the items that were actually removed (as an ItemStack)
ItemStack: A stack of items.
+- Can be created via ItemStack(itemstack or itemstring or table or nil)
methods:
- is_empty(): return true if stack is empty
- get_name(): returns item name (e.g. "default:stone")
@@ -627,6 +628,11 @@ methods:
^ returns copied ItemStack
^ if n is omitted, n=1 is used
+PseudoRandom: A pseudorandom number generator
+- Can be created via PseudoRandom(seed)
+methods:
+- next(): return next random number [0...32767]
+
Registered entities
--------------------
- Functions receive a "luaentity" as self: