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:
parent
4757a123ce
commit
f802bf0888
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/projects/node_metadata.dia.autosave
|
8
init.lua
8
init.lua
@ -2,12 +2,8 @@
|
||||
-- Metadata Tools
|
||||
--
|
||||
-- A mod providing write and read access to a nodes' metadata using commands
|
||||
-- ßÿ Lymkwi/LeMagnesium/Mg ; 2015-2016
|
||||
-- License: WTFPL
|
||||
-- Contributors :
|
||||
-- - Lymkwi/LeMagnesium
|
||||
-- - Paly2
|
||||
-- - Poikilos
|
||||
-- (c) 2015-2016 ßÿ Lymkwi/LeMagnesium/Mg and Paly2; (c) 2017-2022 Poikilos
|
||||
-- License: [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/)
|
||||
--
|
||||
-- Version: Poikilos fork of 1.2.2
|
||||
--
|
||||
|
BIN
projects/node_metadata.dia
Normal file
BIN
projects/node_metadata.dia
Normal file
Binary file not shown.
BIN
projects/node_metadata.png
Normal file
BIN
projects/node_metadata.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
68
readme.md
68
readme.md
@ -1,40 +1,67 @@
|
||||
Minetest mod metatools
|
||||
######################
|
||||
# Minetest mod metatools
|
||||
|
||||
A mod inspired by mgl512's itemframe issue
|
||||
Version : 1.2.2
|
||||
Get everything possible* about a node just by clicking it with metatools:stick!
|
||||
|
||||
# Authors
|
||||
- LeMagnesium / Mg / ElectronLibre : Source code writer
|
||||
- Paly2 / Palige : Contributor for the source code
|
||||
- Ataron : Texture creater
|
||||
This goes far beyond Lymkwi's metatools.
|
||||
|
||||
# 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
|
||||
ignores) nodes on the map, and see values of its metadatas at any of their
|
||||
stratum.
|
||||
|
||||
# Media
|
||||
"metatools_stick.png" by Ataron (CC-BY-NC-SA)
|
||||
|
||||
# Todo
|
||||
- Rewrite the table stocking : a variable containing a copy of the global
|
||||
table returned by :to_table(), on which we would work, and a save command to
|
||||
apply it on the node
|
||||
## Install
|
||||
- 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).
|
||||
|
||||
# Special thanks
|
||||
|
||||
## 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
|
||||
|
||||
## Command tutorial
|
||||
- Soon to come, please refer to /meta help until then
|
||||
|
||||
Node metadatas look like this :
|
||||
|
||||
0 1 2 3 ...
|
||||
Node/
|
||||
## Development
|
||||
|
||||
### Minetest API Notes
|
||||
|
||||
#### 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:
|
||||
```Lua
|
||||
local pointedObjRef = pointed_thing.ref;
|
||||
-- . . . some other code is here, then ...
|
||||
local luaEntity = pointedObjRef:get_luaentity();
|
||||
```
|
||||
|
||||
#### 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)
|
||||
|
||||
```
|
||||
Node
|
||||
|
|
||||
+-fields
|
||||
| |
|
||||
@ -56,3 +83,4 @@ allowing to see/edit metadatas
|
||||
| +-3
|
||||
| +-...
|
||||
+-...
|
||||
```
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 753 B |
Loading…
Reference in New Issue
Block a user