Added bronze, copper, gold and diamond doors
3
my_default_doors/depends.txt
Normal file
@ -0,0 +1,3 @@
|
||||
default
|
||||
doors
|
||||
my_door_wood
|
4
my_default_doors/init.lua
Normal file
@ -0,0 +1,4 @@
|
||||
dofile(minetest.get_modpath("my_default_doors").."/locked.lua")
|
||||
--dofile(minetest.get_modpath("my_default_doors").."/unlocked.lua")
|
||||
|
||||
|
41
my_default_doors/locked.lua
Normal file
@ -0,0 +1,41 @@
|
||||
local cdoor_list = { --Number , Description , Inven Image , Image
|
||||
{ "1", "Bronze Door" , "bronze", "bronze_ingot"},
|
||||
{ "2", "Copper Door" , "copper", "copper_ingot"},
|
||||
{ "3", "Gold Door" , "gold", "gold_ingot"},
|
||||
{ "4", "Diamond Door" , "diamond", "diamond"},
|
||||
}
|
||||
|
||||
|
||||
for i in ipairs(cdoor_list) do
|
||||
local num = cdoor_list[i][1]
|
||||
local desc = cdoor_list[i][2]
|
||||
local img = cdoor_list[i][3]
|
||||
local itm = cdoor_list[i][4]
|
||||
|
||||
|
||||
doors.register_door("my_default_doors:door"..num.."_locked", {
|
||||
description = desc.." Locked",
|
||||
inventory_image = "mydoors_"..img.."_inv.png",
|
||||
groups = {choppy=2,cracky=2,door=1},
|
||||
tiles_bottom = {"mydoors_"..img.."_bottom.png", "mydoors_"..img.."_edge.png"},
|
||||
tiles_top = {"mydoors_"..img.."_top.png", "mydoors_"..img.."_edge.png"},
|
||||
only_placer_can_open = true,
|
||||
})
|
||||
|
||||
|
||||
-- Crafts
|
||||
|
||||
minetest.register_craft({
|
||||
output = "my_default_doors:door"..num.."_locked 1",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"default:"..itm, "doors:door_steel", "default:"..itm},
|
||||
{"", "default:steel_ingot", ""}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
my_default_doors/textures/mydoors_bronze_bottom.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
my_default_doors/textures/mydoors_bronze_edge.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
my_default_doors/textures/mydoors_bronze_inv.png
Normal file
After Width: | Height: | Size: 818 B |
BIN
my_default_doors/textures/mydoors_bronze_top.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
my_default_doors/textures/mydoors_copper_bottom.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
my_default_doors/textures/mydoors_copper_edge.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
my_default_doors/textures/mydoors_copper_inv.png
Normal file
After Width: | Height: | Size: 782 B |
BIN
my_default_doors/textures/mydoors_copper_top.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
my_default_doors/textures/mydoors_default_doors.xcf
Normal file
BIN
my_default_doors/textures/mydoors_diamond_bottom.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
my_default_doors/textures/mydoors_diamond_edge.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
my_default_doors/textures/mydoors_diamond_inv.png
Normal file
After Width: | Height: | Size: 765 B |
BIN
my_default_doors/textures/mydoors_diamond_top.png
Normal file
After Width: | Height: | Size: 416 B |
BIN
my_default_doors/textures/mydoors_gold_bottom.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
my_default_doors/textures/mydoors_gold_edge.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
my_default_doors/textures/mydoors_gold_inv.png
Normal file
After Width: | Height: | Size: 748 B |
BIN
my_default_doors/textures/mydoors_gold_top.png
Normal file
After Width: | Height: | Size: 414 B |
41
my_default_doors/unlocked.lua
Normal file
@ -0,0 +1,41 @@
|
||||
local cdoor_list = { --Number , Description , Inven Image , Image
|
||||
{ "1", "Bronze Door" , "bronze", "bronze_ingot"},
|
||||
{ "2", "Copper Door" , "copper", "copper_ingot"},
|
||||
{ "3", "Gold Door" , "gold", "gold_ingot"},
|
||||
{ "4", "Diamond Door" , "diamond", "diamond"},
|
||||
}
|
||||
|
||||
|
||||
for i in ipairs(cdoor_list) do
|
||||
local num = cdoor_list[i][1]
|
||||
local desc = cdoor_list[i][2]
|
||||
local img = cdoor_list[i][3]
|
||||
local itm = cdoor_list[i][4]
|
||||
|
||||
|
||||
doors.register_door("my_default_doors:door"..num, {
|
||||
description = desc,
|
||||
inventory_image = "mydoors_"..img.."_inv.png",
|
||||
groups = {choppy=2,cracky=2,door=1},
|
||||
tiles_bottom = {"mydoors_"..img.."_bottom.png", "mydoors_"..img.."_edge.png"},
|
||||
tiles_top = {"mydoors_"..img.."_top.png", "mydoors_"..img.."_edge.png"},
|
||||
only_placer_can_open = false,
|
||||
})
|
||||
|
||||
|
||||
-- Crafts
|
||||
|
||||
minetest.register_craft({
|
||||
output = "my_default_doors:door"..num.." 1",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"default:"..itm, "doors:door_steel", "default:"..itm},
|
||||
{"", "", ""}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|