1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-11-16 23:30:37 +01:00

namespace plasmascreen and inbox

This commit is contained in:
unknown 2022-02-11 20:58:04 -05:00
parent 769e14fd11
commit fb4f472443
37 changed files with 43 additions and 38 deletions

View File

@ -12,7 +12,7 @@ read_globals = {
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"screwdriver",
"screwdriver", "homedecor",
}
globals = {

View File

@ -3,7 +3,7 @@ local S = minetest.get_translator("inbox")
local inbox = {}
minetest.register_craft({
output ="inbox:empty",
output ="homedecor:inbox",
recipe = {
{"","default:steel_ingot",""},
{"default:steel_ingot","","default:steel_ingot"},
@ -16,17 +16,17 @@ local mb_cbox = {
fixed = { -5/16, -8/16, -8/16, 5/16, 2/16, 8/16 }
}
minetest.register_node("inbox:empty", {
homedecor.register("inbox", {
paramtype = "light",
drawtype = "mesh",
mesh = "inbox_mailbox.obj",
mesh = "homedecor_inbox_mailbox.obj",
description = S("Mailbox"),
tiles = {
"inbox_red_metal.png",
"inbox_white_metal.png",
"inbox_grey_metal.png",
"homedecor_inbox_red_metal.png",
"homedecor_inbox_white_metal.png",
"homedecor_inbox_grey_metal.png",
},
inventory_image = "mailbox_inv.png",
inventory_image = "homedecor_mailbox_inv.png",
selection_box = mb_cbox,
collision_box = mb_cbox,
paramtype2 = "facedir",
@ -105,6 +105,8 @@ minetest.register_node("inbox:empty", {
end,
})
minetest.register_alias("inbox:empty", "homedecor:inbox")
function inbox.get_inbox_formspec(pos)
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
local formspec =

View File

@ -1,3 +1,3 @@
name = inbox
name = homedecor_inbox
depends = default, homedecor_common
optional_depends = screwdriver

View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View File

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 319 B

View File

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 156 B

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -11,7 +11,7 @@ read_globals = {
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"screwdriver",
"screwdriver", "homedecor",
}
globals = {

View File

@ -2,9 +2,9 @@ local S = minetest.get_translator("plasmascreen")
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
minetest.register_node("plasmascreen:stand", {
homedecor.register("tv_stand", {
description = S("Plasma Screen TV Stand"),
tiles = {"plasmascreen_back.png"},
tiles = {"homedecor_plasmascreen_back.png"},
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
@ -26,13 +26,6 @@ minetest.register_node("plasmascreen:stand", {
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
})
minetest.register_alias("plasmascreen:screen1", "air")
minetest.register_alias("plasmascreen:screen2", "air")
minetest.register_alias("plasmascreen:screen3", "air")
minetest.register_alias("plasmascreen:screen4", "air")
minetest.register_alias("plasmascreen:screen5", "plasmascreen:tv")
minetest.register_alias("plasmascreen:screen6", "air")
local fdir_to_left = {
{ -1, 0 },
{ 0, 1 },
@ -95,13 +88,13 @@ local function checkwall(pos)
return true
end
minetest.register_node("plasmascreen:tv", {
homedecor.register("tv", {
description = S("Plasma TV"),
drawtype = "mesh",
mesh = "plasmascreen_tv.obj",
mesh = "homedecor_plasmascreen_tv.obj",
tiles = {
"plasmascreen_case.png",
{ name="plasmascreen_video.png",
"homedecor_plasmascreen_case.png",
{ name="homedecor_plasmascreen_video.png",
animation={
type="vertical_frames",
aspect_w = 42,
@ -111,8 +104,8 @@ minetest.register_node("plasmascreen:tv", {
}
},
inventory_image = "plasmascreen_tv_inv.png",
wield_image = "plasmascreen_tv_inv.png",
inventory_image = "homedecor_plasmascreen_tv_inv.png",
wield_image = "homedecor_plasmascreen_tv_inv.png",
paramtype = "light",
paramtype2 = "facedir",
light_source = 10,
@ -127,20 +120,20 @@ minetest.register_node("plasmascreen:tv", {
end
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "plasmascreen:tv_off", param2 = node.param2})
minetest.set_node(pos, {name = "homedecor:tv_off", param2 = node.param2})
end
})
minetest.register_node("plasmascreen:tv_off", {
homedecor.register("tv_off", {
description = S("Plasma TV (off)"),
drawtype = "mesh",
mesh = "plasmascreen_tv.obj",
mesh = "homedecor_plasmascreen_tv.obj",
tiles = {
"plasmascreen_case_off.png",
"plasmascreen_screen_off.png",
"homedecor_plasmascreen_case_off.png",
"homedecor_plasmascreen_screen_off.png",
},
inventory_image = "plasmascreen_tv_inv.png",
wield_image = "plasmascreen_tv_inv.png",
inventory_image = "homedecor_plasmascreen_tv_inv.png",
wield_image = "homedecor_plasmascreen_tv_inv.png",
paramtype = "light",
paramtype2 = "facedir",
light_source = 10,
@ -155,15 +148,15 @@ minetest.register_node("plasmascreen:tv_off", {
end
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "plasmascreen:tv", param2 = node.param2})
minetest.set_node(pos, {name = "homedecor:tv", param2 = node.param2})
end,
drop = "plasmascreen:tv"
drop = "homedecor:tv"
})
-- crafting recipes
minetest.register_craft({
output = "plasmascreen:tv",
output = "homedecor:tv",
recipe = {
{'default:glass', 'default:coal_lump', 'default:glass'},
{'default:steel_ingot', 'default:copper_ingot', 'default:steel_ingot'},
@ -173,15 +166,25 @@ minetest.register_craft({
minetest.register_craft({
type = "shapeless",
output = "plasmascreen:tv",
output = "homedecor:tv",
recipe = {'homedecor:television', 'homedecor:television'},
})
minetest.register_craft({
output = "plasmascreen:stand",
output = "homedecor:tv_stand",
recipe = {
{'', '', ''},
{'', 'default:steel_ingot', ''},
{'group:stick', 'default:coal_lump', 'group:stick'},
}
})
minetest.register_alias("plasmascreen:screen1", "air")
minetest.register_alias("plasmascreen:screen2", "air")
minetest.register_alias("plasmascreen:screen3", "air")
minetest.register_alias("plasmascreen:screen4", "air")
minetest.register_alias("plasmascreen:screen6", "air")
minetest.register_alias("plasmascreen:screen5", "homedecor:tv")
minetest.register_alias("plasmascreen:stand", "homedecor:tv_stand")
minetest.register_alias("plasmascreen:tv", "homedecor:tv")
minetest.register_alias("plasmascreen:tv_off", "homedecor:tv_off")

View File

@ -1,3 +1,3 @@
name = plasmascreen
name = homedecor_plasmascreen
depends = default, homedecor_common, homedecor_electronics
optional_depends = screwdriver

View File

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 313 B

View File

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 105 B

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB