summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua87
1 files changed, 87 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..50c434c
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,87 @@
+local materials = {
+ {
+ name = "tcop",
+ description = "Terucopper",
+ },
+ {
+ name = "ttin",
+ description = "Terutin",
+ },
+ {
+ name = "tste",
+ description = "Terusteel",
+ },
+ {
+ name = "tcha",
+ description = "Teruchalcum",
+ },
+ {
+ name = "tgol",
+ description = "Terugold",
+ },
+ {
+ name = "cgls",
+ description = "Coreglass",
+ },
+}
+
+local doortypes = {
+ {
+ name = "full",
+ description = "Solid",
+ },
+ {
+ name = "mesh",
+ description = "Mesh",
+ },
+ {
+ name = "slat",
+ description = "Slatted",
+ },
+ {
+ name = "vert",
+ description = "Fancy",
+ },
+}
+
+for _,mat in ipairs(materials) do
+ for _,doortype in ipairs(doortypes) do
+ doors.register("door"..doortype.name.."_"..mat.name,{
+ tiles = {
+ "terumet_lite_door"..doortype.name.."_"..mat.name..".png",
+ },
+ description = doortype.description.." "..mat.description.." Door",
+ inventory_image = "terumet_lite_dinv"..doortype.name.."_"..mat.name..".png",
+ groups = {
+ cracky = 2,
+ },
+ sounds = default.node_sound_metal_defaults(),
+ sound_open = "doors_steel_door_open",
+ sound_close = "doors_steel_door_close",
+ })
+ doors.register("door"..doortype.name.."_locked_"..mat.name,{
+ tiles = {
+ "terumet_lite_door"..doortype.name.."_"..mat.name..".png",
+ },
+ description = "Locked "..doortype.description.." "..mat.description.." Door",
+ inventory_image = "terumet_lite_dinv"..doortype.name.."_"..mat.name..".png",
+ groups = {
+ cracky = 2,
+ },
+ sounds = default.node_sound_metal_defaults(),
+ sound_open = "doors_steel_door_open",
+ sound_close = "doors_steel_door_close",
+ protected = true,
+ })
+ end
+ core.register_node("terumet_lite:"..mat.name.."_block",{
+ tiles = {
+ "terumet_lite_block_"..mat.name..".png",
+ },
+ description = mat.description.." Block",
+ groups = {
+ cracky = 2,
+ },
+ sounds = default.node_sound_metal_defaults(),
+ })
+end