diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-01-05 20:58:36 -0700 |
---|---|---|
committer | FaceDeer <derksenmobile@gmail.com> | 2017-01-05 20:58:36 -0700 |
commit | e9e8e202f9a9d8be64ec331873791d03413bde41 (patch) | |
tree | fe2ed42c89cb6123f1670f50d309e86a68d6f05a /node_builders.lua | |
parent | 253ff1281571b888cfbfeb1a719eb98a1b5b98de (diff) |
Add logging of various events.
Diffstat (limited to 'node_builders.lua')
-rw-r--r-- | node_builders.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/node_builders.lua b/node_builders.lua index 394b627..f173c63 100644 --- a/node_builders.lua +++ b/node_builders.lua @@ -197,6 +197,7 @@ minetest.register_node("digtron:builder", { local build_facing = meta:get_int("build_facing") local facing = minetest.get_node(pos).param2 local buildpos = digtron.find_new_pos(pos, facing) + local oldnode = minetest.get_node(buildpos) if (buildpos[controlling_coordinate] + meta:get_int("offset")) % meta:get_int("period") ~= 0 then return nil @@ -210,6 +211,7 @@ minetest.register_node("digtron:builder", { if digtron.creative_mode then local returned_stack, success = digtron.item_place_node(item_stack, player, buildpos, tonumber(build_facing)) if success == true then + minetest.log("action", string.format("%s uses Digtron to build %s at (%d, %d, %d), displacing %s", player:get_player_name(), item_stack:get_name(), buildpos.x, buildpos.y, buildpos.z, oldnode.name)) nodes_dug:set(buildpos.x, buildpos.y, buildpos.z, false) return true end @@ -223,6 +225,7 @@ minetest.register_node("digtron:builder", { end local returned_stack, success = digtron.item_place_node(item_stack, player, buildpos, tonumber(build_facing)) if success == true then + minetest.log("action", string.format("%s uses Digtron to build %s at (%d, %d, %d), displacing %s", player:get_player_name(), item_stack:get_name(), buildpos.x, buildpos.y, buildpos.z, oldnode.name)) --flag this node as *not* to be dug. nodes_dug:set(buildpos.x, buildpos.y, buildpos.z, false) return true |