Improve markdown. The license said I could do anything I want, and I wanted to change to a legally viable license. Replace the texture to remove the invasive and inappropriate invasive and inappropriate CC-BY-NC-SA license. Add a node metadata diagram that is legible above the sparse ASCII art table. Move "Rewrite the table stocking" to an issue: https://github.com/poikilos/metatools/issues/4

This commit is contained in:
poikilos 2022-04-16 23:44:51 -04:00
parent 4757a123ce
commit f802bf0888
6 changed files with 77 additions and 52 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/projects/node_metadata.dia.autosave

View File

@ -2,12 +2,8 @@
-- Metadata Tools -- Metadata Tools
-- --
-- A mod providing write and read access to a nodes' metadata using commands -- A mod providing write and read access to a nodes' metadata using commands
-- ßÿ Lymkwi/LeMagnesium/Mg ; 2015-2016 -- (c) 2015-2016 ßÿ Lymkwi/LeMagnesium/Mg and Paly2; (c) 2017-2022 Poikilos
-- License: WTFPL -- License: [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/)
-- Contributors :
-- - Lymkwi/LeMagnesium
-- - Paly2
-- - Poikilos
-- --
-- Version: Poikilos fork of 1.2.2 -- Version: Poikilos fork of 1.2.2
-- --

BIN
projects/node_metadata.dia Normal file

Binary file not shown.

BIN
projects/node_metadata.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

120
readme.md
View File

@ -1,58 +1,86 @@
Minetest mod metatools # Minetest mod metatools
######################
A mod inspired by mgl512's itemframe issue Get everything possible* about a node just by clicking it with metatools:stick!
Version : 1.2.2
# Authors This goes far beyond Lymkwi's metatools.
- LeMagnesium / Mg / ElectronLibre : Source code writer
- Paly2 / Palige : Contributor for the source code
- Ataron : Texture creater
# Purpose
## Differences in Poikilos' fork
- All known* metadata is shown on click! There is no need for various commands to traverse the tree, though the original chat command code is intact.
- Click a node and get its inventory.
- Click an entity and list the entire LuaEntitySOA tree!
- See the "[Minetest API Notes](minetest-api-notes)" section below.
- The texture is redone so that doesn't any longer have an invasive and inappropriate CC-BY-NC-SA license from the upstream version of metatools.
`*` All metadata where how to obtain it is known by the maintainer of this repo (except where there is an open issue).
## Authors
Code:
- 2015-2016 LeMagnesium/Mg/ElectronLibre and Paly2/Palige (mod inspired by mgl512's itemframe issue)
- 2017-2022 Poikilos (Poikilos' fork of Version 1.2.2)
Textures:
- 2022 Poikilos (redone "metatools_stick.png" *replaces one with invasive and inappropriate CC-BY-NC-SA license [old texture was by Ataron]*)
## Purpose
This mod's aim is to provide a way for admins to navigate through any (ok, not This mod's aim is to provide a way for admins to navigate through any (ok, not
ignores) nodes on the map, and see values of its metadatas at any of their ignores) nodes on the map, and see values of its metadatas at any of their
stratum. stratum.
# Media
"metatools_stick.png" by Ataron (CC-BY-NC-SA)
# Todo ## Install
- Rewrite the table stocking : a variable containing a copy of the global - You can remove the project folder to lighten the "game" if necessary (Keeping the png is useful but only for documentation--Nothing in "projects" is used by the mod code).
table returned by :to_table(), on which we would work, and a save command to
apply it on the node
# 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, and contributed to the last version
# Command tutorial ## Special thanks
- Soon to come, please refer to /meta help until then - 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, and contributed to the last version
Node metadatas look like this :
0 1 2 3 ... ## Command tutorial
Node/ - Soon to come, please refer to /meta help until then
|
+- fields
| | ## Development
| +- foo
| +- bar ### Minetest API Notes
| +- ...
+- inventory #### Entity Metadata
| The magic sauce to get the entire LuaEntitySOA of a pointed_thing was finally discovered by accident (when researching unrelated API feature(s)) after no one would/could answer my question:
+- main ```Lua
| | local pointedObjRef = pointed_thing.ref;
| +- 1 -- . . . some other code is here, then ...
| +- 2 local luaEntity = pointedObjRef:get_luaentity();
| +- 3 ```
| +- ...
+- craft #### Node metadata
| | ![Node has fields and inventory; there are main and craft inventories, where each is a sequential table where each entry is an itemstack](projects/node_metadata.png)
| +- 1
| +- 2 ```
| +- 3 Node
| +- ... |
+- ... +-fields
| |
| +-foo
| +-bar
| +-...
+-inventory
|
+-main
| |
| +-1
| +-2
| +-3
| +-...
+-craft
| |
| +-1
| +-2
| +-3
| +-...
+-...
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 753 B