summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.luacheckrc8
-rw-r--r--depends.txt2
-rw-r--r--init.lua4
-rw-r--r--mod.conf4
4 files changed, 14 insertions, 4 deletions
diff --git a/.luacheckrc b/.luacheckrc
new file mode 100644
index 0000000..4dca9a8
--- /dev/null
+++ b/.luacheckrc
@@ -0,0 +1,8 @@
+max_line_length = 160
+
+read_globals = {
+ "minetest",
+ "unifieddyes",
+ "stairsplus",
+ "default",
+}
diff --git a/depends.txt b/depends.txt
deleted file mode 100644
index b46e7ca..0000000
--- a/depends.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-moreblocks?
-unifieddyes
diff --git a/init.lua b/init.lua
index 1b4fe18..8ff6bba 100644
--- a/init.lua
+++ b/init.lua
@@ -3,7 +3,7 @@ minetest.register_node("plasticbox:plasticbox", {
tiles = {"plasticbox_white.png"},
is_ground_content = false,
groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1},
- sounds = default.node_sound_stone_defaults(),
+ sounds = minetest.global_exists("default") and default.node_sound_stone_defaults(),
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
on_construct = unifieddyes.on_construct,
@@ -15,7 +15,7 @@ if minetest.global_exists("stairsplus") then
description = "Plastic",
tiles = {"plasticbox_white.png"},
groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1},
- sounds = default.node_sound_stone_defaults(),
+ sounds = minetest.global_exists("default") and default.node_sound_stone_defaults(),
})
end
diff --git a/mod.conf b/mod.conf
new file mode 100644
index 0000000..ef22f44
--- /dev/null
+++ b/mod.conf
@@ -0,0 +1,4 @@
+name = plasticbox
+description = Plastic Box
+depends = unifieddyes
+optional_depends = moreblocks,default