diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-12-06 19:02:42 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-01-02 02:59:14 +0200 |
commit | 9425fb8192cedf34044de40faafd9c2eb1bbd70d (patch) | |
tree | b941fd5d260c25b805ddc999400d6010eb8f2cf8 /data/mods/default | |
parent | e48ccd79430db7c9e25209fdff51f8f36e20f202 (diff) | |
download | minetest-9425fb8192cedf34044de40faafd9c2eb1bbd70d.tar.gz minetest-9425fb8192cedf34044de40faafd9c2eb1bbd70d.tar.bz2 minetest-9425fb8192cedf34044de40faafd9c2eb1bbd70d.zip |
Improve mini Lua reference
Diffstat (limited to 'data/mods/default')
-rw-r--r-- | data/mods/default/init.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index 2b92aef5a..948c9a199 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -168,6 +168,7 @@ -- - get_owner() -- Generic node metadata specific: -- - set_infotext(infotext) +-- - get_inventory() -> InvRef -- - inventory_set_list(name, {item1, item2, ...}) -- - inventory_get_list(name) -- - set_inventory_draw_spec(string) @@ -206,6 +207,7 @@ -- - select_horiz_by_yawpitch=false) -- Player-only: -- - get_player_name(): will return nil if is not a player +-- - get_inventory() -> InvRef -- - inventory_set_list(name, {item1, item2, ...}) -- - inventory_get_list(name) -> {item1, item2, ...} -- - get_look_dir(): get camera direction as a unit vector @@ -225,8 +227,8 @@ -- ItemStack -- - peek_item(): return item from stack without removing it -- - take_item(): remove item from stack and return it --- - put_item(): put item in stack; return false if not possible --- - put_stackstring(): put stackstring in stack; return false if not possible +-- - put_item(item): put item in stack; return false if not possible +-- - put_stackstring(stackstring): return false if not possible -- -- Registered entities: -- - Functions receive a "luaentity" as self: |