mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
DevTest: /test_place_node skips dummy/cb nodes
This commit is contained in:
parent
23ef0d0916
commit
c1e732448c
3 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue