From 6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 24 May 2020 15:46:26 +0200 Subject: Replacement for Minimal Development Test (PR) (#9450) --- games/minimal/mods/dignodes/init.lua | 37 +++++++++++++++++++++ games/minimal/mods/dignodes/mod.conf | 2 ++ .../mods/dignodes/textures/dignodes_choppy.png | Bin 0 -> 187 bytes .../mods/dignodes/textures/dignodes_cracky.png | Bin 0 -> 193 bytes .../mods/dignodes/textures/dignodes_crumbly.png | Bin 0 -> 172 bytes .../dignodes/textures/dignodes_dig_immediate.png | Bin 0 -> 170 bytes .../mods/dignodes/textures/dignodes_none.png | Bin 0 -> 201 bytes .../mods/dignodes/textures/dignodes_rating1.png | Bin 0 -> 94 bytes .../mods/dignodes/textures/dignodes_rating2.png | Bin 0 -> 92 bytes .../mods/dignodes/textures/dignodes_rating3.png | Bin 0 -> 93 bytes 10 files changed, 39 insertions(+) create mode 100644 games/minimal/mods/dignodes/init.lua create mode 100644 games/minimal/mods/dignodes/mod.conf create mode 100644 games/minimal/mods/dignodes/textures/dignodes_choppy.png create mode 100644 games/minimal/mods/dignodes/textures/dignodes_cracky.png create mode 100644 games/minimal/mods/dignodes/textures/dignodes_crumbly.png create mode 100644 games/minimal/mods/dignodes/textures/dignodes_dig_immediate.png create mode 100644 games/minimal/mods/dignodes/textures/dignodes_none.png create mode 100644 games/minimal/mods/dignodes/textures/dignodes_rating1.png create mode 100644 games/minimal/mods/dignodes/textures/dignodes_rating2.png create mode 100644 games/minimal/mods/dignodes/textures/dignodes_rating3.png (limited to 'games/minimal/mods/dignodes') diff --git a/games/minimal/mods/dignodes/init.lua b/games/minimal/mods/dignodes/init.lua new file mode 100644 index 000000000..833150873 --- /dev/null +++ b/games/minimal/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"}, +}) diff --git a/games/minimal/mods/dignodes/mod.conf b/games/minimal/mods/dignodes/mod.conf new file mode 100644 index 000000000..52a80d66e --- /dev/null +++ b/games/minimal/mods/dignodes/mod.conf @@ -0,0 +1,2 @@ +name = dignodes +description = Nodes with different digging groups diff --git a/games/minimal/mods/dignodes/textures/dignodes_choppy.png b/games/minimal/mods/dignodes/textures/dignodes_choppy.png new file mode 100644 index 000000000..a73fc2424 Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_choppy.png differ diff --git a/games/minimal/mods/dignodes/textures/dignodes_cracky.png b/games/minimal/mods/dignodes/textures/dignodes_cracky.png new file mode 100644 index 000000000..eb84e3079 Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_cracky.png differ diff --git a/games/minimal/mods/dignodes/textures/dignodes_crumbly.png b/games/minimal/mods/dignodes/textures/dignodes_crumbly.png new file mode 100644 index 000000000..23f2f7c71 Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_crumbly.png differ diff --git a/games/minimal/mods/dignodes/textures/dignodes_dig_immediate.png b/games/minimal/mods/dignodes/textures/dignodes_dig_immediate.png new file mode 100644 index 000000000..a532ad90b Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_dig_immediate.png differ diff --git a/games/minimal/mods/dignodes/textures/dignodes_none.png b/games/minimal/mods/dignodes/textures/dignodes_none.png new file mode 100644 index 000000000..60f13650b Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_none.png differ diff --git a/games/minimal/mods/dignodes/textures/dignodes_rating1.png b/games/minimal/mods/dignodes/textures/dignodes_rating1.png new file mode 100644 index 000000000..d2fee3a23 Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_rating1.png differ diff --git a/games/minimal/mods/dignodes/textures/dignodes_rating2.png b/games/minimal/mods/dignodes/textures/dignodes_rating2.png new file mode 100644 index 000000000..15329b93f Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_rating2.png differ diff --git a/games/minimal/mods/dignodes/textures/dignodes_rating3.png b/games/minimal/mods/dignodes/textures/dignodes_rating3.png new file mode 100644 index 000000000..37216bfd1 Binary files /dev/null and b/games/minimal/mods/dignodes/textures/dignodes_rating3.png differ -- cgit v1.2.3