diff options
| author | Wuzzy <Wuzzy@disroot.org> | 2022-10-08 18:58:02 +0200 |
|---|---|---|
| committer | sfan5 <sfan5@live.de> | 2022-10-23 21:58:56 +0200 |
| commit | c1e732448ca3cfc1c7e2b1a8c19b8f80ac06bd06 (patch) | |
| tree | 48b60c3aff96083517906b84108580edd1b65a46 /games/devtest/mods/testnodes/commands.lua | |
| parent | 23ef0d0916207c9d00ec3b39778fb8a7ec29e1cb (diff) | |
| download | minetest-c1e732448ca3cfc1c7e2b1a8c19b8f80ac06bd06.tar.xz | |
DevTest: /test_place_node skips dummy/cb nodes
Diffstat (limited to 'games/devtest/mods/testnodes/commands.lua')
| -rw-r--r-- | games/devtest/mods/testnodes/commands.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/games/devtest/mods/testnodes/commands.lua b/games/devtest/mods/testnodes/commands.lua index 9de506ae5..b04a2c16d 100644 --- a/games/devtest/mods/testnodes/commands.lua +++ b/games/devtest/mods/testnodes/commands.lua @@ -91,7 +91,7 @@ end minetest.register_chatcommand("test_place_nodes", { params = "[ no_param2 ]", - description = "Test: Place all nodes and optionally their permissible param2 variants", + description = "Test: Place all nodes (except dummy and callback nodes) and optionally their permissible param2 variants", func = function(name, param) local player = minetest.get_player_by_name(name) if not player then @@ -113,7 +113,11 @@ minetest.register_chatcommand("test_place_nodes", { local nodes = {} local emerge_estimate = 0 for itemstring, def in pairs(minetest.registered_nodes) do - if itemstring ~= "ignore" then + if itemstring ~= "ignore" and + -- Skip callback test and dummy nodes + -- to avoid clutter and chat spam + minetest.get_item_group(itemstring, "callback_test") == 0 and + minetest.get_item_group(itemstring, "dummy") == 0 then table.insert(nodes, itemstring) if def.paramtype2 == 0 then emerge_estimate = emerge_estimate + 1 |
