Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luk3yx/minetest-flow_inspector
https://github.com/luk3yx/minetest-flow_inspector
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/luk3yx/minetest-flow_inspector
- Owner: luk3yx
- License: lgpl-2.1
- Created: 2023-07-05T08:19:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-28T05:50:39.000Z (4 months ago)
- Last Synced: 2024-11-01T10:42:40.604Z (2 months ago)
- Language: Lua
- Size: 128 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Flow inspector
A probably buggy[^1] inspector for flow GUIs to help with debugging layouting.
[^1]: I'm not really happy with how hacky this mod is but it works.
## Usage
- `/inspector`: Toggles the inspector for all flow forms opened with
`form:show()` and `form:set_as_inventory_for()`.### Hot reload
When the "hot reload" button is pressed, the server reloads the file containing
the function passed to `flow.make_gui`. This file must have exactly one
`flow.make_gui` call for hot reload to work. Existing values in `ctx` are
preserved when hot reloading.The file containing `flow.make_gui` shouldn't contain any registrations (for
example `core.register_globalstep`) as it may result in them being
registered multiple times.### Open debug shell
If you're running Luanti (formerly Minetest) in a terminal, an "open debug
shell" button will be shown which will call `debug.debug()` (or `dbg.dd()` if
the dbg mod is installed) when pressed. `player`, `ctx`, and `name` variables
are set when the debug shell is open.## API
- `flow_inspector.enable(player)`: Enables the inspector.
- `flow_inspector.disable(player)`: Disables the inspector.
- `flow_inspector.inspect(player, form)`: Opens the inspector for `form`.