From 694bfe5fe74b41a2a9b42f7e21d74ddf504ae1ec Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Mon, 14 Feb 2022 17:54:32 -0500 Subject: [PATCH] namespace plasmascreen and inbox (#22) --- {inbox => homedecor_inbox}/.luacheckrc | 2 +- {inbox => homedecor_inbox}/init.lua | 16 ++--- {inbox => homedecor_inbox}/locale/inbox.de.tr | 0 {inbox => homedecor_inbox}/locale/inbox.es.tr | 0 {inbox => homedecor_inbox}/locale/inbox.fr.tr | 0 {inbox => homedecor_inbox}/locale/inbox.ms.tr | 0 {inbox => homedecor_inbox}/locale/inbox.pt.tr | 0 .../locale/inbox.pt_BR.tr | 0 {inbox => homedecor_inbox}/locale/inbox.ru.tr | 0 .../locale/inbox.zh_CN.tr | 0 .../locale/template.txt | 0 {inbox => homedecor_inbox}/mod.conf | 2 +- .../models/homedecor_inbox_mailbox.obj | 0 .../textures/homedecor_inbox_grey_metal.png | Bin .../textures/homedecor_inbox_red_metal.png | Bin .../textures/homedecor_inbox_white_metal.png | Bin .../textures/homedecor_mailbox_inv.png | Bin .../.luacheckrc | 2 +- .../README.md | 0 .../init.lua | 57 +++++++++--------- .../locale/plasmascreen.de.tr | 0 .../locale/plasmascreen.es.tr | 0 .../locale/plasmascreen.fr.tr | 0 .../locale/plasmascreen.ms.tr | 0 .../locale/plasmascreen.pt.tr | 0 .../locale/plasmascreen.pt_BR.tr | 0 .../locale/plasmascreen.ru.tr | 0 .../locale/plasmascreen.zh_CN.tr | 0 .../locale/template.txt | 0 .../mod.conf | 2 +- .../models/homedecor_plasmascreen_tv.obj | 0 .../textures/homedecor_plasmascreen_back.png | Bin .../textures/homedecor_plasmascreen_case.png | Bin .../homedecor_plasmascreen_case_off.png | Bin .../homedecor_plasmascreen_screen_off.png | Bin .../homedecor_plasmascreen_tv_inv.png | Bin .../textures/homedecor_plasmascreen_video.png | Bin 37 files changed, 43 insertions(+), 38 deletions(-) rename {inbox => homedecor_inbox}/.luacheckrc (91%) rename {inbox => homedecor_inbox}/init.lua (91%) rename {inbox => homedecor_inbox}/locale/inbox.de.tr (100%) rename {inbox => homedecor_inbox}/locale/inbox.es.tr (100%) rename {inbox => homedecor_inbox}/locale/inbox.fr.tr (100%) rename {inbox => homedecor_inbox}/locale/inbox.ms.tr (100%) rename {inbox => homedecor_inbox}/locale/inbox.pt.tr (100%) rename {inbox => homedecor_inbox}/locale/inbox.pt_BR.tr (100%) rename {inbox => homedecor_inbox}/locale/inbox.ru.tr (100%) rename {inbox => homedecor_inbox}/locale/inbox.zh_CN.tr (100%) rename {inbox => homedecor_inbox}/locale/template.txt (100%) rename {inbox => homedecor_inbox}/mod.conf (74%) rename inbox/models/inbox_mailbox.obj => homedecor_inbox/models/homedecor_inbox_mailbox.obj (100%) rename inbox/textures/inbox_grey_metal.png => homedecor_inbox/textures/homedecor_inbox_grey_metal.png (100%) rename inbox/textures/inbox_red_metal.png => homedecor_inbox/textures/homedecor_inbox_red_metal.png (100%) rename inbox/textures/inbox_white_metal.png => homedecor_inbox/textures/homedecor_inbox_white_metal.png (100%) rename inbox/textures/mailbox_inv.png => homedecor_inbox/textures/homedecor_mailbox_inv.png (100%) rename {plasmascreen => homedecor_plasmascreen}/.luacheckrc (90%) rename {plasmascreen => homedecor_plasmascreen}/README.md (100%) rename {plasmascreen => homedecor_plasmascreen}/init.lua (80%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.de.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.es.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.fr.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.ms.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.pt.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.pt_BR.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.ru.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/plasmascreen.zh_CN.tr (100%) rename {plasmascreen => homedecor_plasmascreen}/locale/template.txt (100%) rename {plasmascreen => homedecor_plasmascreen}/mod.conf (75%) rename plasmascreen/models/plasmascreen_tv.obj => homedecor_plasmascreen/models/homedecor_plasmascreen_tv.obj (100%) rename plasmascreen/textures/plasmascreen_back.png => homedecor_plasmascreen/textures/homedecor_plasmascreen_back.png (100%) rename plasmascreen/textures/plasmascreen_case.png => homedecor_plasmascreen/textures/homedecor_plasmascreen_case.png (100%) rename plasmascreen/textures/plasmascreen_case_off.png => homedecor_plasmascreen/textures/homedecor_plasmascreen_case_off.png (100%) rename plasmascreen/textures/plasmascreen_screen_off.png => homedecor_plasmascreen/textures/homedecor_plasmascreen_screen_off.png (100%) rename plasmascreen/textures/plasmascreen_tv_inv.png => homedecor_plasmascreen/textures/homedecor_plasmascreen_tv_inv.png (100%) rename plasmascreen/textures/plasmascreen_video.png => homedecor_plasmascreen/textures/homedecor_plasmascreen_video.png (100%) diff --git a/inbox/.luacheckrc b/homedecor_inbox/.luacheckrc similarity index 91% rename from inbox/.luacheckrc rename to homedecor_inbox/.luacheckrc index 2ef25d14..0a057505 100644 --- a/inbox/.luacheckrc +++ b/homedecor_inbox/.luacheckrc @@ -12,7 +12,7 @@ read_globals = { "VoxelManip", "VoxelArea", "PseudoRandom", "ItemStack", "default", - "screwdriver", + "screwdriver", "homedecor", } globals = { diff --git a/inbox/init.lua b/homedecor_inbox/init.lua similarity index 91% rename from inbox/init.lua rename to homedecor_inbox/init.lua index 0ec889b8..1701dc51 100644 --- a/inbox/init.lua +++ b/homedecor_inbox/init.lua @@ -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 = diff --git a/inbox/locale/inbox.de.tr b/homedecor_inbox/locale/inbox.de.tr similarity index 100% rename from inbox/locale/inbox.de.tr rename to homedecor_inbox/locale/inbox.de.tr diff --git a/inbox/locale/inbox.es.tr b/homedecor_inbox/locale/inbox.es.tr similarity index 100% rename from inbox/locale/inbox.es.tr rename to homedecor_inbox/locale/inbox.es.tr diff --git a/inbox/locale/inbox.fr.tr b/homedecor_inbox/locale/inbox.fr.tr similarity index 100% rename from inbox/locale/inbox.fr.tr rename to homedecor_inbox/locale/inbox.fr.tr diff --git a/inbox/locale/inbox.ms.tr b/homedecor_inbox/locale/inbox.ms.tr similarity index 100% rename from inbox/locale/inbox.ms.tr rename to homedecor_inbox/locale/inbox.ms.tr diff --git a/inbox/locale/inbox.pt.tr b/homedecor_inbox/locale/inbox.pt.tr similarity index 100% rename from inbox/locale/inbox.pt.tr rename to homedecor_inbox/locale/inbox.pt.tr diff --git a/inbox/locale/inbox.pt_BR.tr b/homedecor_inbox/locale/inbox.pt_BR.tr similarity index 100% rename from inbox/locale/inbox.pt_BR.tr rename to homedecor_inbox/locale/inbox.pt_BR.tr diff --git a/inbox/locale/inbox.ru.tr b/homedecor_inbox/locale/inbox.ru.tr similarity index 100% rename from inbox/locale/inbox.ru.tr rename to homedecor_inbox/locale/inbox.ru.tr diff --git a/inbox/locale/inbox.zh_CN.tr b/homedecor_inbox/locale/inbox.zh_CN.tr similarity index 100% rename from inbox/locale/inbox.zh_CN.tr rename to homedecor_inbox/locale/inbox.zh_CN.tr diff --git a/inbox/locale/template.txt b/homedecor_inbox/locale/template.txt similarity index 100% rename from inbox/locale/template.txt rename to homedecor_inbox/locale/template.txt diff --git a/inbox/mod.conf b/homedecor_inbox/mod.conf similarity index 74% rename from inbox/mod.conf rename to homedecor_inbox/mod.conf index c36bc793..d6a2322d 100644 --- a/inbox/mod.conf +++ b/homedecor_inbox/mod.conf @@ -1,3 +1,3 @@ -name = inbox +name = homedecor_inbox depends = default, homedecor_common optional_depends = screwdriver diff --git a/inbox/models/inbox_mailbox.obj b/homedecor_inbox/models/homedecor_inbox_mailbox.obj similarity index 100% rename from inbox/models/inbox_mailbox.obj rename to homedecor_inbox/models/homedecor_inbox_mailbox.obj diff --git a/inbox/textures/inbox_grey_metal.png b/homedecor_inbox/textures/homedecor_inbox_grey_metal.png similarity index 100% rename from inbox/textures/inbox_grey_metal.png rename to homedecor_inbox/textures/homedecor_inbox_grey_metal.png diff --git a/inbox/textures/inbox_red_metal.png b/homedecor_inbox/textures/homedecor_inbox_red_metal.png similarity index 100% rename from inbox/textures/inbox_red_metal.png rename to homedecor_inbox/textures/homedecor_inbox_red_metal.png diff --git a/inbox/textures/inbox_white_metal.png b/homedecor_inbox/textures/homedecor_inbox_white_metal.png similarity index 100% rename from inbox/textures/inbox_white_metal.png rename to homedecor_inbox/textures/homedecor_inbox_white_metal.png diff --git a/inbox/textures/mailbox_inv.png b/homedecor_inbox/textures/homedecor_mailbox_inv.png similarity index 100% rename from inbox/textures/mailbox_inv.png rename to homedecor_inbox/textures/homedecor_mailbox_inv.png diff --git a/plasmascreen/.luacheckrc b/homedecor_plasmascreen/.luacheckrc similarity index 90% rename from plasmascreen/.luacheckrc rename to homedecor_plasmascreen/.luacheckrc index 4002b90d..f65fce03 100644 --- a/plasmascreen/.luacheckrc +++ b/homedecor_plasmascreen/.luacheckrc @@ -11,7 +11,7 @@ read_globals = { "vector", "nodeupdate", "VoxelManip", "VoxelArea", "PseudoRandom", "ItemStack", - "screwdriver", + "screwdriver", "homedecor", } globals = { diff --git a/plasmascreen/README.md b/homedecor_plasmascreen/README.md similarity index 100% rename from plasmascreen/README.md rename to homedecor_plasmascreen/README.md diff --git a/plasmascreen/init.lua b/homedecor_plasmascreen/init.lua similarity index 80% rename from plasmascreen/init.lua rename to homedecor_plasmascreen/init.lua index 4f76bf41..a3df75b0 100644 --- a/plasmascreen/init.lua +++ b/homedecor_plasmascreen/init.lua @@ -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") \ No newline at end of file diff --git a/plasmascreen/locale/plasmascreen.de.tr b/homedecor_plasmascreen/locale/plasmascreen.de.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.de.tr rename to homedecor_plasmascreen/locale/plasmascreen.de.tr diff --git a/plasmascreen/locale/plasmascreen.es.tr b/homedecor_plasmascreen/locale/plasmascreen.es.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.es.tr rename to homedecor_plasmascreen/locale/plasmascreen.es.tr diff --git a/plasmascreen/locale/plasmascreen.fr.tr b/homedecor_plasmascreen/locale/plasmascreen.fr.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.fr.tr rename to homedecor_plasmascreen/locale/plasmascreen.fr.tr diff --git a/plasmascreen/locale/plasmascreen.ms.tr b/homedecor_plasmascreen/locale/plasmascreen.ms.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.ms.tr rename to homedecor_plasmascreen/locale/plasmascreen.ms.tr diff --git a/plasmascreen/locale/plasmascreen.pt.tr b/homedecor_plasmascreen/locale/plasmascreen.pt.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.pt.tr rename to homedecor_plasmascreen/locale/plasmascreen.pt.tr diff --git a/plasmascreen/locale/plasmascreen.pt_BR.tr b/homedecor_plasmascreen/locale/plasmascreen.pt_BR.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.pt_BR.tr rename to homedecor_plasmascreen/locale/plasmascreen.pt_BR.tr diff --git a/plasmascreen/locale/plasmascreen.ru.tr b/homedecor_plasmascreen/locale/plasmascreen.ru.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.ru.tr rename to homedecor_plasmascreen/locale/plasmascreen.ru.tr diff --git a/plasmascreen/locale/plasmascreen.zh_CN.tr b/homedecor_plasmascreen/locale/plasmascreen.zh_CN.tr similarity index 100% rename from plasmascreen/locale/plasmascreen.zh_CN.tr rename to homedecor_plasmascreen/locale/plasmascreen.zh_CN.tr diff --git a/plasmascreen/locale/template.txt b/homedecor_plasmascreen/locale/template.txt similarity index 100% rename from plasmascreen/locale/template.txt rename to homedecor_plasmascreen/locale/template.txt diff --git a/plasmascreen/mod.conf b/homedecor_plasmascreen/mod.conf similarity index 75% rename from plasmascreen/mod.conf rename to homedecor_plasmascreen/mod.conf index ea247cfb..4f5edfc2 100644 --- a/plasmascreen/mod.conf +++ b/homedecor_plasmascreen/mod.conf @@ -1,3 +1,3 @@ -name = plasmascreen +name = homedecor_plasmascreen depends = default, homedecor_common, homedecor_electronics optional_depends = screwdriver diff --git a/plasmascreen/models/plasmascreen_tv.obj b/homedecor_plasmascreen/models/homedecor_plasmascreen_tv.obj similarity index 100% rename from plasmascreen/models/plasmascreen_tv.obj rename to homedecor_plasmascreen/models/homedecor_plasmascreen_tv.obj diff --git a/plasmascreen/textures/plasmascreen_back.png b/homedecor_plasmascreen/textures/homedecor_plasmascreen_back.png similarity index 100% rename from plasmascreen/textures/plasmascreen_back.png rename to homedecor_plasmascreen/textures/homedecor_plasmascreen_back.png diff --git a/plasmascreen/textures/plasmascreen_case.png b/homedecor_plasmascreen/textures/homedecor_plasmascreen_case.png similarity index 100% rename from plasmascreen/textures/plasmascreen_case.png rename to homedecor_plasmascreen/textures/homedecor_plasmascreen_case.png diff --git a/plasmascreen/textures/plasmascreen_case_off.png b/homedecor_plasmascreen/textures/homedecor_plasmascreen_case_off.png similarity index 100% rename from plasmascreen/textures/plasmascreen_case_off.png rename to homedecor_plasmascreen/textures/homedecor_plasmascreen_case_off.png diff --git a/plasmascreen/textures/plasmascreen_screen_off.png b/homedecor_plasmascreen/textures/homedecor_plasmascreen_screen_off.png similarity index 100% rename from plasmascreen/textures/plasmascreen_screen_off.png rename to homedecor_plasmascreen/textures/homedecor_plasmascreen_screen_off.png diff --git a/plasmascreen/textures/plasmascreen_tv_inv.png b/homedecor_plasmascreen/textures/homedecor_plasmascreen_tv_inv.png similarity index 100% rename from plasmascreen/textures/plasmascreen_tv_inv.png rename to homedecor_plasmascreen/textures/homedecor_plasmascreen_tv_inv.png diff --git a/plasmascreen/textures/plasmascreen_video.png b/homedecor_plasmascreen/textures/homedecor_plasmascreen_video.png similarity index 100% rename from plasmascreen/textures/plasmascreen_video.png rename to homedecor_plasmascreen/textures/homedecor_plasmascreen_video.png