diff options
Diffstat (limited to 'prefab')
-rw-r--r-- | prefab/description.txt | 1 | ||||
-rw-r--r-- | prefab/init.lua | 9 | ||||
-rw-r--r-- | prefab/mod.conf | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/prefab/description.txt b/prefab/description.txt new file mode 100644 index 0000000..74d899a --- /dev/null +++ b/prefab/description.txt @@ -0,0 +1 @@ +Adds pre-fabricated concrete elements. diff --git a/prefab/init.lua b/prefab/init.lua index d1c7918..abc88bd 100644 --- a/prefab/init.lua +++ b/prefab/init.lua @@ -7,6 +7,11 @@ dofile(minetest.get_modpath("prefab").."/other.lua") print("Prefab Other loaded!")
print("Prefab Loaded!")
+local creative = minetest.setting_getbool("creative_mode")
+
+local damage = 30
+if creative then damage = 0 end
+
minetest.register_node("prefab:concrete", {
drawtype = "normal",
description = "Block of Prefab Concrete",
@@ -333,7 +338,7 @@ minetest.register_node("prefab:electric_fence", { sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
-
+ damage_per_second = damage,
node_box = {
type = "fixed",
fixed = {
@@ -358,7 +363,7 @@ minetest.register_node("prefab:electric_fence_corner", { sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
-
+ damage_per_second = damage,
node_box = {
type = "fixed",
fixed = {
diff --git a/prefab/mod.conf b/prefab/mod.conf new file mode 100644 index 0000000..3843864 --- /dev/null +++ b/prefab/mod.conf @@ -0,0 +1 @@ +name = prefab |