Rename “Minimal development test” to “Development Test” (#9928)
37
games/devtest/mods/dignodes/init.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
local groups = {
|
||||
"cracky", "dig_immediate"
|
||||
}
|
||||
|
||||
-- Register dig nodes with 1 digging group, a rating between 1-3 and a level between 0-2
|
||||
for g=1, #groups do
|
||||
local gr = groups[g]
|
||||
for r=1, 3 do
|
||||
for l=0, 2 do
|
||||
if not (gr=="dig_immediate" and (l>0 or r==1)) then
|
||||
local d
|
||||
if l > 0 then
|
||||
d = string.format("Dig Test Node: %s=%d, level=%d", gr, r, l)
|
||||
else
|
||||
d = string.format("Dig Test Node: %s=%d", gr, r)
|
||||
end
|
||||
local tile = "dignodes_"..gr..".png^dignodes_rating"..r..".png"
|
||||
if l==1 then
|
||||
tile = tile .. "^[colorize:#FFFF00:127"
|
||||
elseif l==2 then
|
||||
tile = tile .. "^[colorize:#FF0000:127"
|
||||
end
|
||||
minetest.register_node("dignodes:"..gr.."_"..r.."_"..l, {
|
||||
description = d,
|
||||
tiles = { tile },
|
||||
groups = { [gr] = r, level = l },
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Node without any digging groups
|
||||
minetest.register_node("dignodes:none", {
|
||||
description = "Dig Test Node: groupless",
|
||||
tiles = {"dignodes_none.png"},
|
||||
})
|
2
games/devtest/mods/dignodes/mod.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
name = dignodes
|
||||
description = Nodes with different digging groups
|
BIN
games/devtest/mods/dignodes/textures/dignodes_choppy.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
games/devtest/mods/dignodes/textures/dignodes_cracky.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
games/devtest/mods/dignodes/textures/dignodes_crumbly.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
games/devtest/mods/dignodes/textures/dignodes_dig_immediate.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
games/devtest/mods/dignodes/textures/dignodes_none.png
Normal file
After Width: | Height: | Size: 201 B |
BIN
games/devtest/mods/dignodes/textures/dignodes_rating1.png
Normal file
After Width: | Height: | Size: 94 B |
BIN
games/devtest/mods/dignodes/textures/dignodes_rating2.png
Normal file
After Width: | Height: | Size: 92 B |
BIN
games/devtest/mods/dignodes/textures/dignodes_rating3.png
Normal file
After Width: | Height: | Size: 93 B |