Remove obsolete mesecons integration (#37)
This commit is contained in:
parent
79547ede26
commit
83d55f241a
@ -9,9 +9,4 @@ read_globals = {
|
|||||||
"screwdriver",
|
"screwdriver",
|
||||||
"stairs",
|
"stairs",
|
||||||
"stairsplus",
|
"stairsplus",
|
||||||
"mesecon",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
globals = {
|
|
||||||
"mydoors"
|
|
||||||
}
|
|
@ -15,7 +15,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_castle_doors:"..img.."_locked", {
|
doors.register_door("my_castle_doors:"..img.."_locked", {
|
||||||
description = desc.." Locked",
|
description = desc.." Locked",
|
||||||
inventory_image = "mydoors_"..img.."_inv.png",
|
inventory_image = "mydoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -15,7 +15,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_castle_doors:"..img, {
|
doors.register_door("my_castle_doors:"..img, {
|
||||||
description = desc,
|
description = desc,
|
||||||
inventory_image = "mydoors_"..img.."_inv.png",
|
inventory_image = "mydoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -4,7 +4,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_cottage_doors:"..img.."_locked", {
|
doors.register_door("my_cottage_doors:"..img.."_locked", {
|
||||||
description = desc.." Locked",
|
description = desc.." Locked",
|
||||||
inventory_image = "mycdoors_"..img.."_inv.png",
|
inventory_image = "mycdoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -4,7 +4,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_cottage_doors:"..img, {
|
doors.register_door("my_cottage_doors:"..img, {
|
||||||
description = desc,
|
description = desc,
|
||||||
inventory_image = "mycdoors_"..img.."_inv.png",
|
inventory_image = "mycdoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -7,7 +7,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(num, desc, img, itm)
|
local function add_door(num, desc, img, itm)
|
||||||
mydoors.register_door("my_default_doors:door"..num.."_locked", {
|
doors.register_door("my_default_doors:door"..num.."_locked", {
|
||||||
description = desc.." Locked",
|
description = desc.." Locked",
|
||||||
inventory_image = "mydoors_"..img.."_inv.png",
|
inventory_image = "mydoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -7,7 +7,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(num, desc, img, itm)
|
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,
|
description = desc,
|
||||||
inventory_image = "mydoors_"..img.."_inv.png",
|
inventory_image = "mydoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -58,27 +58,3 @@ end
|
|||||||
for _,door in ipairs(door_wood) do
|
for _,door in ipairs(door_wood) do
|
||||||
add_door(unpack(door))
|
add_door(unpack(door))
|
||||||
end
|
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
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name = my_door_wood
|
name = my_door_wood
|
||||||
description = Wood that is used to make doors.
|
description = Wood that is used to make doors.
|
||||||
depends = default
|
depends = default
|
||||||
optional_depends = stairs, moreblocks, mesecons
|
optional_depends = stairs, moreblocks
|
@ -10,7 +10,7 @@ local fdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_fancy_doors:"..img.."_locked", {
|
doors.register_door("my_fancy_doors:"..img.."_locked", {
|
||||||
description = desc.." Locked",
|
description = desc.." Locked",
|
||||||
inventory_image = "myfdoors_"..img.."_inv.png",
|
inventory_image = "myfdoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -10,7 +10,7 @@ local fdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_fancy_doors:"..img, {
|
doors.register_door("my_fancy_doors:"..img, {
|
||||||
description = desc,
|
description = desc,
|
||||||
inventory_image = "myfdoors_"..img.."_inv.png",
|
inventory_image = "myfdoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -12,7 +12,7 @@ local hdoor_list = { --Number , Description , default image
|
|||||||
|
|
||||||
local function add_door(img, desc)
|
local function add_door(img, desc)
|
||||||
-- Cannot add locked doors because the tooltip defies the purpose of being a hidden door
|
-- Cannot add locked doors because the tooltip defies the purpose of being a hidden door
|
||||||
mydoors.register_door("my_hidden_doors:hidden_door"..img, {
|
doors.register_door("my_hidden_doors:hidden_door"..img, {
|
||||||
description = desc,
|
description = desc,
|
||||||
inventory_image = "mydoors_"..img.."_inv.png",
|
inventory_image = "mydoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
@ -26,7 +26,7 @@ for _,hdoor in ipairs(hdoor_list) do
|
|||||||
add_door(unpack(hdoor))
|
add_door(unpack(hdoor))
|
||||||
end
|
end
|
||||||
|
|
||||||
mydoors.register_door("my_hidden_doors:hidden_door_grey", {
|
doors.register_door("my_hidden_doors:hidden_door_grey", {
|
||||||
description = "Grey Door",
|
description = "Grey Door",
|
||||||
inventory_image = "mydoors_grey_inv.png",
|
inventory_image = "mydoors_grey_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -7,7 +7,7 @@ local mdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_misc_doors:"..img.."_locked", {
|
doors.register_door("my_misc_doors:"..img.."_locked", {
|
||||||
description = desc.." Locked",
|
description = desc.." Locked",
|
||||||
inventory_image = "mymdoors_"..img.."_inv.png",
|
inventory_image = "mymdoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -7,7 +7,7 @@ local mdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(desc, img)
|
local function add_door(desc, img)
|
||||||
mydoors.register_door("my_misc_doors:"..img, {
|
doors.register_door("my_misc_doors:"..img, {
|
||||||
description = desc,
|
description = desc,
|
||||||
inventory_image = "mymdoors_"..img.."_inv.png",
|
inventory_image = "mymdoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -6,7 +6,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(num, desc, img)
|
local function add_door(num, desc, img)
|
||||||
mydoors.register_door("my_old_doors:door"..num.."_locked", {
|
doors.register_door("my_old_doors:door"..num.."_locked", {
|
||||||
description = desc.." Locked",
|
description = desc.." Locked",
|
||||||
inventory_image = "mydoors_"..img.."_inv.png",
|
inventory_image = "mydoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
@ -6,7 +6,7 @@ local cdoor_list = { --Number , Description , Inven Image , Image
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_door(num, desc, img)
|
local function add_door(num, desc, img)
|
||||||
mydoors.register_door("my_old_doors:door"..num, {
|
doors.register_door("my_old_doors:door"..num, {
|
||||||
description = desc,
|
description = desc,
|
||||||
inventory_image = "mydoors_"..img.."_inv.png",
|
inventory_image = "mydoors_"..img.."_inv.png",
|
||||||
groups = {choppy=2,cracky=2,door=1},
|
groups = {choppy=2,cracky=2,door=1},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user