Compare commits

...

10 Commits

Author SHA1 Message Date
SmallJoker
5d78183cf2
Make 'screwdriver' optional (#39)
Some checks failed
luacheck / luacheck (push) Has been cancelled
This eases the integration for other games. The screwdriver API should
still be provided when needed to avoid incorrect node rotations.
2024-11-15 21:23:19 +01:00
Niklp
83d55f241a
Remove obsolete mesecons integration (#37) 2024-10-22 17:40:16 +02:00
Niklp
79547ede26
Disallow rotation of various doors (#36)
Rotating them would result in a strange-looking state.
2024-07-18 18:15:58 +02:00
Niklp
e23201a251
Add mesecons support for locked doors (#35) 2024-05-26 17:35:39 +02:00
Niklp
aee9b46d42 Optimize textures to fix sRGB profile warnings 2024-04-25 21:45:01 +02:00
Niklp
55cc1b04b1 Add choppy group to sliding doors 2023-12-27 09:12:43 +01:00
Niklp
f1fdabe0b0 Enable luacheck 2023-12-27 09:12:43 +01:00
Niklp
1f9875fced
Fix protection of unlocked old doors (#32) 2023-10-14 12:19:20 +02:00
Niklp
5264626c79
Add sliding door and garage door crafts (#31) 2023-07-16 09:50:07 +02:00
SmallJoker
9389bf37e7 Remove "Locked" label from unlocked hidden doors 2023-05-27 20:36:09 +02:00
152 changed files with 239 additions and 161 deletions

10
.github/workflows/luacheck.yml vendored Normal file
View File

@ -0,0 +1,10 @@
name: luacheck
on: [push, pull_request]
jobs:
luacheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Luacheck
uses: lunarmodules/luacheck@master

View File

@ -1,20 +1,15 @@
unused_args = false
allow_defined_top = true
max_line_length = 140
read_globals = {
"doors",
"DIR_DELIM",
"minetest", "core",
"dump",
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"intllib",
table = {fields = {"copy"}},
"minetest",
"core",
"vector",
"default",
"armor",
"doors",
"screwdriver",
"stairs",
"stairsplus",
}
globals = {
core = { fields = { "do_item_eat" }},
}

View File

@ -15,7 +15,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
}
local function add_door(desc, img)
doors.register("my_castle_doors:"..img.."_locked", {
doors.register_door("my_castle_doors:"..img.."_locked", {
description = desc.." Locked",
inventory_image = "mydoors_"..img.."_inv.png",
groups = {choppy=2,cracky=2,door=1},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -15,7 +15,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
}
local function add_door(desc, img)
mydoors.register_door("my_castle_doors:"..img, {
doors.register_door("my_castle_doors:"..img, {
description = desc,
inventory_image = "mydoors_"..img.."_inv.png",
groups = {choppy=2,cracky=2,door=1},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -4,7 +4,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
}
local function add_door(desc, img)
mydoors.register_door("my_cottage_doors:"..img, {
doors.register_door("my_cottage_doors:"..img, {
description = desc,
inventory_image = "mycdoors_"..img.."_inv.png",
groups = {choppy=2,cracky=2,door=1},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 348 B

View File

@ -7,7 +7,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
}
local function add_door(num, desc, img, itm)
mydoors.register_door("my_default_doors:door"..num, {
doors.register_door("my_default_doors:door"..num, {
description = desc,
inventory_image = "mydoors_"..img.."_inv.png",
groups = {choppy=2,cracky=2,door=1},

View File

@ -1,3 +0,0 @@
default
stairs?
moreblocks?

View File

@ -1 +0,0 @@
Wood that is used to make doors.

View File

@ -38,7 +38,6 @@ local function add_door(color, desc, img)
my_door_wood_block_stairs("my_door_wood:wood_"..color, {
description = desc.." Wood",
drawtype = "normal",
paramtype = "light",
tiles = {"mydoors_"..img.."_wood.png"},
paramtype = "light",
groups = {cracky = 2, choppy = 2, wood = 1},
@ -59,27 +58,3 @@ end
for _,door in ipairs(door_wood) do
add_door(unpack(door))
end
mydoors = {}
local mesecons = {effector = {
action_on = function(pos)
local door = doors.get(pos)
if door then
door:open()
end
end,
action_off = function(pos)
local door = doors.get(pos)
if door then
door:close()
end
end,
rules = minetest.global_exists("mesecon") and mesecon.rules.pplate or nil
}}
-- Helper function for mesecons support
function mydoors.register_door(name, def)
def.mesecons = mesecons
doors.register(name, def)
end

View File

@ -1,4 +1,4 @@
name = my_door_wood
description = Doors made from default ores. Copper, bronze, gold, diamond and mese.
description = Wood that is used to make doors.
depends = default
optional_depends = stairs, moreblocks, mesecons
optional_depends = stairs, moreblocks

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -10,7 +10,7 @@ local fdoor_list = { --Number , Description , Inven Image , Image
}
local function add_door(desc, img)
mydoors.register_door("my_fancy_doors:"..img, {
doors.register_door("my_fancy_doors:"..img, {
description = desc,
inventory_image = "myfdoors_"..img.."_inv.png",
groups = {choppy=2,cracky=2,door=1},

View File

@ -1,3 +1,4 @@
local rotate_disallow = rawget(_G, "screwdriver") and screwdriver.disallow or nil
local doorcolors = {"white","red","black"}
local function add_door(col)
@ -36,7 +37,7 @@ local function add_door(col)
{-0.625, 1.4375,-0.5625, 0.625, 1.625, 0.5625}, --top
}
},
on_rotate = rotate_disallow,
on_place = function(itemstack, placer, pointed_thing)
local pos1 = pointed_thing.above
local pos2 = vector.add(pos1, {x=0,y=1,z=0})
@ -112,6 +113,7 @@ local function add_door(col)
{-0.5, -0.5, -0.5, -0.5, -0.5, -0.5},
}
},
on_rotate = rotate_disallow,
})
minetest.register_node("my_future_doors:door1c_"..col, {
tiles = {
@ -146,6 +148,7 @@ local function add_door(col)
}
},
drop = "my_future_doors:door1a_"..col,
on_rotate = rotate_disallow,
after_place_node = function(pos, placer, itemstack, pointed_thing)
local node = minetest.get_node(pos)
local timer = minetest.get_node_timer(pos)
@ -194,6 +197,7 @@ local function add_door(col)
{-0.5, -0.5, -0.5, -0.5, -0.5, -0.5},
}
},
on_rotate = rotate_disallow,
})
minetest.register_craft({
output = "my_future_doors:door1a_"..col.." 1",

View File

@ -1,3 +1,4 @@
name = my_future_doors
description = Futuristic style doors.
depends = my_door_wood
optional_depends = screwdriver

View File

@ -1,3 +1,5 @@
local rotate_disallow = rawget(_G, "screwdriver") and screwdriver.disallow or nil
local doors = {
{"my_future_doors:door2a","my_future_doors:door2b","my_future_doors:door2c","my_future_doors:door2d","2","Steel",
{{"default:steel_ingot", "default:steelblock", ""},
@ -147,6 +149,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
{-0.5, -0.5, -0.0625, 0.5, 1.5, 0.0625}
}
},
on_rotate = rotate_disallow,
on_place = onplace,
@ -179,6 +182,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
{0, 0, 0, 0, 0, 0},
}
},
on_rotate = rotate_disallow,
})
minetest.register_node(doorc, {
tiles = {
@ -209,6 +213,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
after_place_node = afterplace,
after_destruct = afterdestruct,
on_timer = ontimer,
on_rotate = rotate_disallow,
})
minetest.register_node(doord, {
tiles = {
@ -235,6 +240,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
{0, 0, 0, 0, 0, 0},
}
},
on_rotate = rotate_disallow,
})
minetest.register_craft({
output = "my_future_doors:door"..num.."a 2",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 984 B

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 897 B

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1002 B

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 B

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1 +0,0 @@
A garage door.

View File

@ -1,3 +1,5 @@
local rotate_disallow = rawget(_G, "screwdriver") and screwdriver.disallow or nil
local function buildable_to(pos)
local node = minetest.get_node(pos).name
if minetest.registered_nodes[node] then -- The checked node is maybe an unknown node
@ -6,6 +8,17 @@ local function buildable_to(pos)
return false
end
local nodebox_closed = {
type = "fixed",
fixed = {
{-1.5, -0.5, -0.125, 1.5, 0.5, -0.0625},
{-1.5, -0.5, -0.1875, 1.5, -0.3125, -0.0625},
{-1.5, -0.25, -0.1875, 1.5, -0.0624999, -0.0625},
{-1.5, 0, -0.1875, 1.5, 0.1875, -0.0625},
{-1.5, 0.25, -0.1875, 1.5, 0.4375, -0.0625},
}
}
minetest.register_node("my_garage_door:garage_door", {
description = "Garage Door",
tiles = {
@ -15,22 +28,14 @@ minetest.register_node("my_garage_door:garage_door", {
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3},
node_box = {
type = "fixed",
fixed = {
{-1.5, -0.5, -0.125, 1.5, 0.5, -0.0625},
{-1.5, -0.5, -0.1875, 1.5, -0.3125, -0.0625},
{-1.5, -0.25, -0.1875, 1.5, -0.0624999, -0.0625},
{-1.5, 0, -0.1875, 1.5, 0.1875, -0.0625},
{-1.5, 0.25, -0.1875, 1.5, 0.4375, -0.0625},
}
},
node_box = table.copy(nodebox_closed),
selection_box = {
type = "fixed",
fixed = {
{-1.5, -0.5, -0.1875, 1.5, 1.5, -0.0625},
}
},
on_rotate = rotate_disallow,
on_place = function(itemstack, placer, pointed_thing)
local pos1 = pointed_thing.above
local pos2 = vector.add(pos1, {x=0,y=1,z=0})
@ -80,7 +85,7 @@ minetest.register_node("my_garage_door:garage_door", {
return
end
if buildable_to(t1) or
if not buildable_to(t1) or
not buildable_to(t2) then
minetest.chat_send_player(player:get_player_name(), "Not enough room to open")
return
@ -113,18 +118,22 @@ minetest.register_node("my_garage_door:garage_door_top", {
diggable = false,
pointable = false,
groups = {cracky=3},
node_box = {
type = "fixed",
fixed = {
{-1.5, -0.5, -0.125, 1.5, 0.5, -0.0625},
{-1.5, -0.5, -0.1875, 1.5, -0.3125, -0.0625},
{-1.5, -0.25, -0.1875, 1.5, -0.0624999, -0.0625},
{-1.5, 0, -0.1875, 1.5, 0.1875, -0.0625},
{-1.5, 0.25, -0.1875, 1.5, 0.4375, -0.0625},
}
},
node_box = table.copy(nodebox_closed),
selection_box = {type = "fixed",fixed = {{0, 0, 0, 0, 0, 0},}},
on_rotate = rotate_disallow,
})
local nodebox_open = {
type = "fixed",
fixed = {
{-1.5, 0.4375, -0.5, 1.5, 0.375, 0.5},
{-1.5, 0.375, 0.3125, 1.5, 0.5, 0.5},
{-1.5, 0.375, 0.0625, 1.5, 0.5, 0.25},
{-1.5, 0.375, -0.1875, 1.5, 0.5, 0},
{-1.5, 0.375, -0.4375, 1.5, 0.5, -0.25},
}
}
minetest.register_node("my_garage_door:garage_door_open", {
tiles = {
"default_snow.png"
@ -135,18 +144,9 @@ minetest.register_node("my_garage_door:garage_door_open", {
drop = "my_garage_door:garage_door",
diggable = false,
groups = {cracky=3},
node_box = {
type = "fixed",
fixed = {
{-1.5, 0.4375, -0.5, 1.5, 0.375, 0.5},
{-1.5, 0.375, 0.3125, 1.5, 0.5, 0.5},
{-1.5, 0.375, 0.0625, 1.5, 0.5, 0.25},
{-1.5, 0.375, -0.1875, 1.5, 0.5, 0},
{-1.5, 0.375, -0.4375, 1.5, 0.5, -0.25},
}
},
node_box = table.copy(nodebox_open),
selection_box = {type = "fixed",fixed = {{-1.5, 0.375, -0.5, 1.5, 0.5, 1.5},}},
on_rotate = rotate_disallow,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
local p2 = node.param2
local dir = minetest.facedir_to_dir((p2+2)%4)
@ -193,16 +193,19 @@ minetest.register_node("my_garage_door:garage_door_open2", {
diggable = false,
pointable = false,
groups = {cracky=3},
node_box = {
type = "fixed",
fixed = {
{-1.5, 0.4375, -0.5, 1.5, 0.375, 0.5},
{-1.5, 0.375, 0.3125, 1.5, 0.5, 0.5},
{-1.5, 0.375, 0.0625, 1.5, 0.5, 0.25},
{-1.5, 0.375, -0.1875, 1.5, 0.5, 0},
{-1.5, 0.375, -0.4375, 1.5, 0.5, -0.25},
}
},
node_box = table.copy(nodebox_open),
selection_box = {type = "fixed",fixed = {{0, 0, 0, 0, 0, 0},}},
on_rotate = rotate_disallow,
})
-- craft
if minetest.get_modpath("basic_materials") then
minetest.register_craft({
output = "my_garage_door:garage_door",
recipe = {
{"basic_materials:steel_bar", "", "basic_materials:steel_bar"},
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"}
}
})
end

View File

@ -1,2 +1,3 @@
name = my_garage_door
description = A garage door.
optional_depends = basic_materials, screwdriver

View File

@ -11,11 +11,11 @@ local hdoor_list = { --Number , Description , default image
}
local function add_door(img, desc)
-- Cannot add locked doors because the tooltip defies the purpose of being a hidden door
doors.register_door("my_hidden_doors:hidden_door"..img, {
description = desc.." Locked",
description = desc,
inventory_image = "mydoors_"..img.."_inv.png",
groups = {choppy=2,cracky=2,door=1},
only_placer_can_open = false,
tiles = {{ name = "mydoors_"..img..".png", backface_culling = true }},
protected = false,
})
@ -27,7 +27,7 @@ for _,hdoor in ipairs(hdoor_list) do
end
doors.register_door("my_hidden_doors:hidden_door_grey", {
description = "Grey Door Locked",
description = "Grey Door",
inventory_image = "mydoors_grey_inv.png",
groups = {choppy=2,cracky=2,door=1},
tiles = {{ name = "mydoors_grey.png", backface_culling = true }},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 874 B

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 538 B

Some files were not shown because too many files have changed in this diff Show More