mirror of
https://github.com/LeMagnesium/minetest-mod-metatools.git
synced 2025-01-06 22:40:18 +01:00
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:
parent
23b46dad8d
commit
58e462a485
@ -2,6 +2,7 @@ Minetest mod metatools
|
|||||||
######################
|
######################
|
||||||
|
|
||||||
A mod inspired by mgl512's itemframe issue
|
A mod inspired by mgl512's itemframe issue
|
||||||
|
Version : 1.0
|
||||||
|
|
||||||
# Authors
|
# Authors
|
||||||
- LeMagnesium / Mg / ElectronLibre : Source code writer
|
- LeMagnesium / Mg / ElectronLibre : Source code writer
|
||||||
@ -16,17 +17,19 @@ stratum.
|
|||||||
"metatools_stick.png" by Ataron (CC-BY-NC-SA)
|
"metatools_stick.png" by Ataron (CC-BY-NC-SA)
|
||||||
|
|
||||||
# Todo
|
# Todo
|
||||||
- Add a check if set is done in Node/fields/
|
|
||||||
- Add a table handler for meta::set
|
- Add a table handler for meta::set
|
||||||
|
- Create a better ASCII-art graph at the end of this file...
|
||||||
|
|
||||||
# Special thanks
|
# Special thanks
|
||||||
- mgl512 (Le_Docteur) for its locked itemframe which gave me the idea of a tool
|
- mgl512 (Le_Docteur) for its locked itemframe which gave me the idea of a tool
|
||||||
allowing to see/edit metadatas
|
allowing to see/edit metadatas
|
||||||
- Ataron who created the stick's texture
|
- Ataron who created the stick's texture
|
||||||
|
- palige who agreed to test the mod for its first release
|
||||||
|
|
||||||
# Command tutorial
|
# Command tutorial
|
||||||
|
|
||||||
- help => Get help
|
- help => Get help
|
||||||
|
- version => Get version
|
||||||
- open (x,y,z) => Open the node to manipulate at pos (x,y,z)
|
- open (x,y,z) => Open the node to manipulate at pos (x,y,z)
|
||||||
- show => Show fields/path list at actual position
|
- show => Show fields/path list at actual position
|
||||||
- enter <path> => Enter next stratum through <path>
|
- enter <path> => Enter next stratum through <path>
|
||||||
|
13
init.lua
13
init.lua
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
metatools = {}
|
metatools = {}
|
||||||
meta_info = {}
|
meta_info = {}
|
||||||
|
metatools.version = "1.0"
|
||||||
|
|
||||||
metatools.actualize_metalist = function(name)
|
metatools.actualize_metalist = function(name)
|
||||||
-- We need to actualize the tables
|
-- We need to actualize the tables
|
||||||
@ -64,8 +65,10 @@ minetest.register_chatcommand("meta", {
|
|||||||
|
|
||||||
|
|
||||||
if paramlist[1] == "help" then
|
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," 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," 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," show : show fields at node/depth")
|
||||||
minetest.chat_send_player(name," enter name : enter in field name 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," write <field> <itemstring> [amount]: set the itemstack <field>")
|
||||||
minetest.chat_send_player(name," close : close the current node")
|
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
|
elseif paramlist[1] == "open" then
|
||||||
if meta_info[name] and meta_info[name]["node"] 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")
|
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
|
return false
|
||||||
end
|
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
|
local i = 4
|
||||||
while (true) do
|
while (true) do
|
||||||
if paramlist[i] ~= nil then
|
if paramlist[i] ~= nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user