mirror of
https://github.com/Sokomine/replacer.git
synced 2024-11-15 06:10:21 +01:00
removed several spamming messages; added liszence
This commit is contained in:
parent
99f22d2aaa
commit
2a845a8c3b
20
README.md
20
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
24
init.lua
24
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 <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
|
||||
-- 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" ] } );
|
||||
|
|
Loading…
Reference in New Issue
Block a user