From 2a845a8c3bdae7159e339056d9ecd7934b44e573 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 3 Feb 2013 21:31:52 +0100 Subject: [PATCH] removed several spamming messages; added liszence --- README.md | 20 +++++++++++++++++++- check_owner.lua | 3 ++- init.lua | 24 ++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 239125d..87ee7ee 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ - TODO: A distinct image is still missing. Right now, it looks like a steel axe! + Replacement tool for creative building (Mod for MineTest) + This tool is helpful for creative purposes (i.e. build a wall and "paint" windows into it). It replaces nodes with a previously selected other type of node (i.e. places said windows into a brick wall). @@ -18,3 +19,20 @@ When in creative mode, the node will just be replaced. Your inventory will not b When not in creative mode, digging will be simulated and you will get what was there. In return, the replacement node will be taken from your inventory. + + + Copyright (C) 2013 Sokomine + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + diff --git a/check_owner.lua b/check_owner.lua index 85778bb..f9ac907 100644 --- a/check_owner.lua +++ b/check_owner.lua @@ -1,4 +1,5 @@ --- taken from VannesaEs homedecor mod +-- taken from Vanessa Ezekowitz' homedecor mod +-- see http://forum.minetest.net/viewtopic.php?pid=26061 or https://github.com/VanessaE/homedecor for details! function replacer_homedecor_node_is_owned(pos, placer) local ownername = false if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod diff --git a/init.lua b/init.lua index a2cbeaa..e1ab661 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,24 @@ + +--[[ + Replacement tool for creative building (Mod for MineTest) + Copyright (C) 2013 Sokomine + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +--]] + + -- adds a function to check ownership of a node; taken from VanessaEs homedecor mod dofile(minetest.get_modpath("replacer").."/check_owner.lua"); @@ -91,7 +111,7 @@ minetest.register_tool( "replacer:replacer", -- do not replace if there is nothing to be done if( node.name == item[ "metadata"] ) then - minetest.chat_send_player( name, "Node already is '"..( item[ "metadata"] or "?" ).."'. Nothing to do."); + --minetest.chat_send_player( name, "Node already is '"..( item[ "metadata"] or "?" ).."'. Nothing to do."); return nil; end @@ -135,7 +155,7 @@ minetest.register_tool( "replacer:replacer", --user:get_inventory():add_item( "main", node.name.." 1"); end - minetest.chat_send_player( name, "Replacing node '"..( node.name or "air" ).."' with '"..( item[ "metadata"] or "?" ).."'."); + --minetest.chat_send_player( name, "Replacing node '"..( node.name or "air" ).."' with '"..( item[ "metadata"] or "?" ).."'."); --minetest.env:place_node( pos, { name = item[ "metadata" ] } ); minetest.env:add_node( pos, { name = item[ "metadata" ] } );