From c3658e7c797cbf5b9d04a6d950505d37dcdd422b Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 5 Jun 2012 23:09:18 +0300 Subject: place_node, dig_node and punch_node; an in-game tester tool; remove old code --- doc/lua_api.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 8b2b81c75..5e0f2f118 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -842,13 +842,23 @@ EnvRef: basically ServerEnvironment and ServerMap combined. methods: - set_node(pos, node) - add_node(pos, node): alias set_node(pos, node) -- remove_node(pos): equivalent to set_node(pos, "air") + ^ Set node at position (node = {name="foo", param1=0, param2=0}) +- remove_node(pos) + ^ Equivalent to set_node(pos, "air") - get_node(pos) ^ Returns {name="ignore", ...} for unloaded area - get_node_or_nil(pos) ^ Returns nil for unloaded area - get_node_light(pos, timeofday) -> 0...15 or nil ^ timeofday: nil = current time, 0 = night, 0.5 = day + +- place_node(pos, node) + ^ Place node with the same effects that a player would cause +- dig_node(pos) + ^ Dig node with the same effects that a player would cause +- punch_node(pos) + ^ Punch node with the same effects that a player would cause + - add_entity(pos, name): Spawn Lua-defined entity at position ^ Returns ObjectRef, or nil if failed - add_item(pos, itemstring): Spawn item -- cgit v1.2.3