Bumped version to 1.0

- Added check for stratum when meta::set
 - Updated README.md
 - Bumped version to 1.0
This commit is contained in:
LeMagnesium 2015-05-08 14:50:47 +02:00
parent 23b46dad8d
commit 58e462a485
2 changed files with 16 additions and 2 deletions

View File

@ -2,6 +2,7 @@ Minetest mod metatools
######################
A mod inspired by mgl512's itemframe issue
Version : 1.0
# Authors
- LeMagnesium / Mg / ElectronLibre : Source code writer
@ -16,17 +17,19 @@ stratum.
"metatools_stick.png" by Ataron (CC-BY-NC-SA)
# Todo
- Add a check if set is done in Node/fields/
- Add a table handler for meta::set
- Create a better ASCII-art graph at the end of this file...
# Special thanks
- mgl512 (Le_Docteur) for its locked itemframe which gave me the idea of a tool
allowing to see/edit metadatas
- Ataron who created the stick's texture
- palige who agreed to test the mod for its first release
# Command tutorial
- help => Get help
- version => Get version
- open (x,y,z) => Open the node to manipulate at pos (x,y,z)
- show => Show fields/path list at actual position
- enter <path> => Enter next stratum through <path>

View File

@ -4,6 +4,7 @@
metatools = {}
meta_info = {}
metatools.version = "1.0"
metatools.actualize_metalist = function(name)
-- We need to actualize the tables
@ -64,8 +65,10 @@ minetest.register_chatcommand("meta", {
if paramlist[1] == "help" then
minetest.chat_send_player(name,"Meta help: /meta +")
minetest.chat_send_player(name,"Metatools version " .. metatools.version)
minetest.chat_send_player(name,"Help: /meta +")
minetest.chat_send_player(name," help : show this help")
minetest.chat_send_player(name," version : show metatools version")
minetest.chat_send_player(name," open (x,y,z) : open node at pos x,y,z")
minetest.chat_send_player(name," show : show fields at node/depth")
minetest.chat_send_player(name," enter name : enter in field name at node/depth")
@ -77,6 +80,9 @@ minetest.register_chatcommand("meta", {
minetest.chat_send_player(name," write <field> <itemstring> [amount]: set the itemstack <field>")
minetest.chat_send_player(name," close : close the current node")
elseif paramlist[1] == "version" then
minetest.chat_send_player(name, "- meta::version - Metatools' version : " .. metatools.version)
elseif paramlist[1] == "open" then
if meta_info[name] and meta_info[name]["node"] then
minetest.chat_send_player(name,"- meta::open - You already have opened a node without closing it, use /meta close "..minetest.pos_to_string(meta_info[name]["node"]).." to close it and retry")
@ -228,6 +234,11 @@ minetest.register_chatcommand("meta", {
return false
end
if meta_info[name]["stratum"] ~= 1 then
minetest.chat_send_player(name, "- meta::set - Warning: Meta set can only work at stratum 1 (node/fields). Use itemstack in node/inventory/* or any other command for other stratums")
return false
end
local i = 4
while (true) do
if paramlist[i] ~= nil then