commit eb9e78e8972090ed4204b155184a1d4dc342a260 Author: Thomas--S Date: Thu Jun 30 19:40:06 2016 +0200 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..7585f72 --- /dev/null +++ b/LICENSE @@ -0,0 +1,3 @@ +CC0 Public Domain + +See https://creativecommons.org/publicdomain/zero/1.0/ for details. diff --git a/README.md b/README.md new file mode 100755 index 0000000..53ce2ba --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +ts_doors +======== + +This mod adds more doors. +It was made by Thomas-S. +It is published under the CC0 license. diff --git a/depends.txt b/depends.txt new file mode 100755 index 0000000..969b4ad --- /dev/null +++ b/depends.txt @@ -0,0 +1,3 @@ +default +doors +moretrees? diff --git a/description.txt b/description.txt new file mode 100755 index 0000000..22ffc8c --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +This mod adds doors for all kinds of wood. diff --git a/init.lua b/init.lua new file mode 100755 index 0000000..fb91169 --- /dev/null +++ b/init.lua @@ -0,0 +1,60 @@ +ts_doors = {} + +function ts_doors.register_door(recipe, description, texture) + local groups = minetest.registered_nodes[recipe].groups + local door_groups = {} + for k,v in pairs(groups) do + if k ~= "wood" then + door_groups[k] = v + end + end + doors.register("ts_door_" .. recipe:gsub(":", "_"), { + tiles = {{ name = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":0,32=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. ":16,32=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base.png^[noalpha^[makealpha:0,255,0", backface_culling = true }}, + description = description .. " Door", + inventory_image = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base_inv.png^[noalpha^[makealpha:0,255,0", + groups = groups, + recipe = { + {recipe, recipe}, + {recipe, recipe}, + {recipe, recipe}, + } + }) + + + groups.level = 2 + + doors.register("ts_door_locked_" .. recipe:gsub(":", "_"), { + tiles = {{ name = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":0,32=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. ":16,32=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base_locked.png^[noalpha^[makealpha:0,255,0", backface_culling = true }}, + description = description .. " Locked Door", + inventory_image = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base_locked_inv.png^[noalpha^[makealpha:0,255,0", + protected = true, + groups = groups, + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + recipe = { + {recipe, recipe}, + {recipe, "default:steel_ingot"}, + {recipe, recipe}, + } + }) +end + +ts_doors.register_door("default:aspen_wood" , "Aspen" , "default_aspen_wood.png" ) +ts_doors.register_door("default:pine_wood" , "Pine" , "default_pine_wood.png" ) +ts_doors.register_door("default:acacia_wood", "Acacia" , "default_acacia_wood.png") +ts_doors.register_door("default:wood" , "Wooden" , "default_wood.png" ) +ts_doors.register_door("default:junglewood" , "Jungle Wood", "default_junglewood.png" ) + + +if(minetest.get_modpath("moretrees")) then + ts_furniture.register_furniture("moretrees:apple_tree_planks", "Apple Tree", "moretrees_apple_tree_wood.png") + ts_furniture.register_furniture("moretrees:beech_planks", "Beech", "moretrees_beech_wood.png") + ts_furniture.register_furniture("moretrees:birch_planks", "Birch", "moretrees_birch_wood.png") + ts_furniture.register_furniture("moretrees:fir_planks", "Fir", "moretrees_fir_wood.png") + ts_furniture.register_furniture("moretrees:oak_planks", "Oak", "moretrees_oak_wood.png") + ts_furniture.register_furniture("moretrees:palm_planks", "Palm", "moretrees_palm_wood.png") + ts_furniture.register_furniture("moretrees:rubber_tree_planks", "Rubber Tree", "moretrees_rubber_tree_wood.png") + ts_furniture.register_furniture("moretrees:sequoia_planks", "Sequoia", "moretrees_sequoia_wood.png") + ts_furniture.register_furniture("moretrees:spruce_planks", "Spruce", "moretrees_spruce_wood.png") + ts_furniture.register_furniture("moretrees:willow_planks", "Willow", "moretrees_willow_wood.png") +end diff --git a/mod.conf b/mod.conf new file mode 100755 index 0000000..24a1318 --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = ts_doors diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..65cc5b3 Binary files /dev/null and b/screenshot.png differ diff --git a/textures/ts_doors_base.png b/textures/ts_doors_base.png new file mode 100755 index 0000000..0c89c71 Binary files /dev/null and b/textures/ts_doors_base.png differ diff --git a/textures/ts_doors_base_inv.png b/textures/ts_doors_base_inv.png new file mode 100644 index 0000000..3e6a3da Binary files /dev/null and b/textures/ts_doors_base_inv.png differ diff --git a/textures/ts_doors_base_locked.png b/textures/ts_doors_base_locked.png new file mode 100755 index 0000000..f56524d Binary files /dev/null and b/textures/ts_doors_base_locked.png differ diff --git a/textures/ts_doors_base_locked_inv.png b/textures/ts_doors_base_locked_inv.png new file mode 100644 index 0000000..86e3233 Binary files /dev/null and b/textures/ts_doors_base_locked_inv.png differ