diff options
author | Wuzzy <wuzzy2@mail.ru> | 2020-05-26 00:17:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 00:17:52 +0200 |
commit | 083b285f4319c470f307f0b52f03a2fb68facd38 (patch) | |
tree | bdd02540ad58756a38606f03a995ab837a176709 /games/devtest/mods/dignodes/init.lua | |
parent | b546e8938d41aa9e3101fb9d4d5b02924ed73b60 (diff) | |
download | minetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.gz minetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.bz2 minetest-083b285f4319c470f307f0b52f03a2fb68facd38.zip |
Rename “Minimal development test” to “Development Test” (#9928)
Diffstat (limited to 'games/devtest/mods/dignodes/init.lua')
-rw-r--r-- | games/devtest/mods/dignodes/init.lua | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/games/devtest/mods/dignodes/init.lua b/games/devtest/mods/dignodes/init.lua new file mode 100644 index 000000000..833150873 --- /dev/null +++ b/games/devtest/mods/dignodes/init.lua @@ -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"}, +}) |