From 78045a752ff1045f20763b36fd50d11f1a40eacb Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 24 Jan 2015 00:34:02 +0100 Subject: [PATCH] move most other homedecor nodes to the new registration function, remove any unnecessary fields due to minetest or homedecor defaults --- homedecor/bathroom_furniture.lua | 4 - homedecor/bathroom_sanitation.lua | 31 +---- homedecor/climate-control.lua | 30 +---- homedecor/clocks.lua | 20 +--- homedecor/doors_and_gates.lua | 4 - homedecor/electronics.lua | 40 ++----- homedecor/fences.lua | 104 +++------------- homedecor/furniture.lua | 26 +--- homedecor/furniture_medieval.lua | 20 +--- homedecor/kitchen_appliances.lua | 16 +-- homedecor/kitchen_furniture.lua | 21 +--- homedecor/laundry.lua | 10 +- homedecor/lighting.lua | 85 +++---------- homedecor/misc-electrical.lua | 15 +-- homedecor/misc-nodes.lua | 191 ++++++------------------------ homedecor/nightstands.lua | 11 -- homedecor/paintings.lua | 5 +- homedecor/shingles.lua | 5 - homedecor/shutters.lua | 3 +- homedecor/tables.lua | 35 ++---- homedecor/window_treatments.lua | 38 ++---- 21 files changed, 131 insertions(+), 583 deletions(-) diff --git a/homedecor/bathroom_furniture.lua b/homedecor/bathroom_furniture.lua index 33e88a79..50c17316 100644 --- a/homedecor/bathroom_furniture.lua +++ b/homedecor/bathroom_furniture.lua @@ -25,7 +25,6 @@ for i in ipairs(bathroom_tile_colors) do "homedecor_bathroom_tiles_"..color..".png^[transformR90", "homedecor_bathroom_tiles_"..color..".png^[transformR90" }, - is_ground_content = true, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), }) @@ -60,7 +59,6 @@ homedecor.register("towel_rod", { }) homedecor.register("medicine_cabinet", { - drawtype = "nodebox", description = S("Medicine Cabinet"), tiles = { 'homedecor_medicine_cabinet_tb.png', @@ -71,8 +69,6 @@ homedecor.register("medicine_cabinet", { 'homedecor_medicine_cabinet_front.png' }, inventory_image = "homedecor_medicine_cabinet_inv.png", - sunlight_propagates = false, - walkable = true, selection_box = { type = "fixed", fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5} diff --git a/homedecor/bathroom_sanitation.lua b/homedecor/bathroom_sanitation.lua index f3f0e785..cfa37af3 100644 --- a/homedecor/bathroom_sanitation.lua +++ b/homedecor/bathroom_sanitation.lua @@ -1,12 +1,8 @@ local S = homedecor.gettext -minetest.register_node("homedecor:toilet", { +homedecor.register("toilet", { description = S("Toilet"), tiles = { "forniture_marble.png" }, - drawtype = "nodebox", - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -26,14 +22,11 @@ minetest.register_node("homedecor:toilet", { end, }) -minetest.register_node("homedecor:toilet_open", { +homedecor.register("toilet_open", { tiles = { "forniture_marble_top_toilet.png", "forniture_marble.png" }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -67,16 +60,13 @@ minetest.register_node("homedecor:toilet_open", { }) --Sink -minetest.register_node("homedecor:sink", { +homedecor.register("sink", { description = S("Sink"), tiles = { "forniture_marble_top_sink.png", "forniture_marble.png" }, inventory_image="3dforniture_inv_sink.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -101,14 +91,11 @@ minetest.register_node("homedecor:sink", { }) --Taps -minetest.register_node("homedecor:taps", { +homedecor.register("taps", { description = S("Taps"), tiles = { "forniture_metal.png" }, inventory_image="3dforniture_inv_taps.png", - drawtype = "nodebox", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -132,16 +119,13 @@ minetest.register_node("homedecor:taps", { }) --Shower Tray -minetest.register_node("homedecor:shower_tray", { +homedecor.register("shower_tray", { description = S("Shower Tray"), tiles = { "forniture_marble_base_ducha_top.png", "forniture_marble.png" }, - drawtype = "nodebox", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", legacy_facedir_simple = true, node_box = { type = "fixed", @@ -162,14 +146,11 @@ minetest.register_node("homedecor:shower_tray", { }) --Shower Head -minetest.register_node("homedecor:shower_head", { +homedecor.register("shower_head", { description = S("Shower Head"), tiles = { "forniture_metal.png" }, inventory_image="3dforniture_inv_shower_head.png", - drawtype = "nodebox", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { diff --git a/homedecor/climate-control.lua b/homedecor/climate-control.lua index c6b2e318..b3e08335 100644 --- a/homedecor/climate-control.lua +++ b/homedecor/climate-control.lua @@ -2,8 +2,7 @@ local S = homedecor.gettext -minetest.register_node('homedecor:air_conditioner', { - drawtype = "nodebox", +homedecor.register("air_conditioner", { description = S("Air Conditioner"), tiles = { 'homedecor_ac_tb.png', 'homedecor_ac_tb.png', @@ -11,10 +10,6 @@ minetest.register_node('homedecor:air_conditioner', { 'homedecor_ac_sides.png', 'homedecor_ac_back.png', 'homedecor_ac_front.png'}, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), node_box = { @@ -37,12 +32,9 @@ minetest.register_entity("homedecor:mesh_desk_fan", { visual_size = {x=10, y=10}, }) -minetest.register_node("homedecor:desk_fan", { +homedecor.register("desk_fan", { description = "Desk Fan", - drawtype = "nodebox", - paramtype2 = "facedir", legacy_facedir_simple = true, - paramtype = "light", groups = {oddly_breakable_by_hand=2}, node_box = { type = "fixed", @@ -112,9 +104,8 @@ minetest.register_node("homedecor:desk_fan", { -- ceiling fan -minetest.register_node('homedecor:ceiling_fan', { +homedecor.register("ceiling_fan", { description = S("Ceiling Fan"), - drawtype = "nodebox", tiles = { { name="homedecor_ceiling_fan_top.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5} }, @@ -130,10 +121,6 @@ minetest.register_node('homedecor:ceiling_fan', { { -0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625 } } }, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), @@ -141,8 +128,7 @@ minetest.register_node('homedecor:ceiling_fan', { -- heating devices -minetest.register_node('homedecor:space_heater', { - drawtype = "nodebox", +homedecor.register("space_heater", { description = S("Space heater"), tiles = { 'homedecor_heater_tb.png', 'homedecor_heater_tb.png', @@ -153,9 +139,6 @@ minetest.register_node('homedecor:space_heater', { }, inventory_image = "homedecor_heater_inv.png", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), node_box = { @@ -170,13 +153,10 @@ minetest.register_node('homedecor:space_heater', { } }) -minetest.register_node("homedecor:radiator", { +homedecor.register("radiator", { tiles = { "homedecor_white_metal.png" }, inventory_image = "homedecor_radiator_inv.png", description = "Radiator heater", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", diff --git a/homedecor/clocks.lua b/homedecor/clocks.lua index b0750916..c51a4b25 100644 --- a/homedecor/clocks.lua +++ b/homedecor/clocks.lua @@ -1,11 +1,8 @@ -minetest.register_node("homedecor:analog_clock_plastic", { +homedecor.register("analog_clock_plastic", { description = "Analog clock (plastic)", - drawtype = "mesh", mesh = "homedecor_analog_clock.obj", tiles = { "homedecor_analog_clock_plastic.png" }, inventory_image = "homedecor_analog_clock_plastic_inv.png", - paramtype = "light", - paramtype2 = "facedir", collision_box = { type = "fixed", fixed = { @@ -23,14 +20,11 @@ minetest.register_node("homedecor:analog_clock_plastic", { groups = {snappy=3}, }) -minetest.register_node("homedecor:analog_clock_wood", { +homedecor.register("analog_clock_wood", { description = "Analog clock (wood)", - drawtype = "mesh", mesh = "homedecor_analog_clock.obj", tiles = { "homedecor_analog_clock_wood.png" }, inventory_image = "homedecor_analog_clock_wood_inv.png", - paramtype = "light", - paramtype2 = "facedir", collision_box = { type = "fixed", fixed = { @@ -48,9 +42,8 @@ minetest.register_node("homedecor:analog_clock_wood", { groups = {snappy=3}, }) -minetest.register_node("homedecor:digital_clock", { +homedecor.register("digital_clock", { description = "Digital clock", - drawtype = "nodebox", tiles = { "homedecor_digital_clock_edges.png", "homedecor_digital_clock_edges.png", @@ -60,8 +53,6 @@ minetest.register_node("homedecor:digital_clock", { "homedecor_digital_clock_front.png" }, inventory_image = "homedecor_digital_clock_inv.png", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -71,9 +62,8 @@ minetest.register_node("homedecor:digital_clock", { groups = {snappy=3}, }) -minetest.register_node("homedecor:alarm_clock", { +homedecor.register("alarm_clock", { description = "Alarm clock", - drawtype = "nodebox", tiles = { "homedecor_alarm_clock_top.png", "homedecor_alarm_clock_bottom.png", @@ -83,8 +73,6 @@ minetest.register_node("homedecor:alarm_clock", { "homedecor_alarm_clock_front.png" }, inventory_image = "homedecor_alarm_clock_inv.png", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { diff --git a/homedecor/doors_and_gates.lua b/homedecor/doors_and_gates.lua index b349cb19..7eedb516 100644 --- a/homedecor/doors_and_gates.lua +++ b/homedecor/doors_and_gates.lua @@ -186,7 +186,6 @@ for i in ipairs(sides) do paramtype2 = "facedir", groups = {snappy=3, not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), - walkable = true, use_texture_alpha = texalpha, selection_box = selectboxes_top, node_box = { @@ -219,7 +218,6 @@ for i in ipairs(sides) do paramtype2 = "facedir", groups = dgroups, sounds = default.node_sound_wood_defaults(), - walkable = true, use_texture_alpha = texalpha, selection_box = selectboxes_bottom, node_box = { @@ -329,10 +327,8 @@ for i in ipairs(gates_list) do "homedecor_gate_"..gate.."_front.png" }, paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, paramtype2 = "facedir", selection_box = { type = "fixed", diff --git a/homedecor/electronics.lua b/homedecor/electronics.lua index 3b447e96..85cf8fe7 100644 --- a/homedecor/electronics.lua +++ b/homedecor/electronics.lua @@ -2,7 +2,7 @@ local S = homedecor.gettext -minetest.register_node('homedecor:speaker', { +homedecor.register("speaker", { description = S("Large Stereo Speaker"), tiles = { 'homedecor_speaker_top.png', 'homedecor_speaker_bottom.png', @@ -10,17 +10,12 @@ minetest.register_node('homedecor:speaker', { 'homedecor_speaker_left.png', 'homedecor_speaker_back.png', 'homedecor_speaker_front.png'}, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), }) -minetest.register_node('homedecor:speaker_small', { +homedecor.register("speaker_small", { description = S("Small Surround Speaker"), - drawtype = "nodebox", tiles = { 'homedecor_speaker_top.png', 'homedecor_speaker_bottom.png', @@ -37,16 +32,11 @@ minetest.register_node('homedecor:speaker_small', { type = "fixed", fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } }, - - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), }) -minetest.register_node('homedecor:stereo', { +homedecor.register("stereo", { description = S("Stereo Receiver"), tiles = { 'homedecor_stereo_top.png', 'homedecor_stereo_bottom.png', @@ -54,22 +44,16 @@ minetest.register_node('homedecor:stereo', { 'homedecor_stereo_left.png', 'homedecor_stereo_back.png', 'homedecor_stereo_front.png'}, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), }) -minetest.register_node('homedecor:projection_screen', { +homedecor.register("projection_screen", { description = S("Projection Screen Material"), drawtype = 'signlike', tiles = { 'homedecor_projection_screen.png' }, wield_image = 'homedecor_projection_screen_inv.png', inventory_image = 'homedecor_projection_screen_inv.png', - sunlight_propagates = false, - paramtype = 'light', walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -80,7 +64,7 @@ minetest.register_node('homedecor:projection_screen', { }, }) -minetest.register_node('homedecor:television', { +homedecor.register("television", { description = S("Small CRT Television"), tiles = { 'homedecor_television_top.png', 'homedecor_television_bottom.png', @@ -96,18 +80,13 @@ minetest.register_node('homedecor:television', { } } }, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, light_source = LIGHT_MAX - 1, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), }) -minetest.register_node("homedecor:dvd_vcr", { +homedecor.register("dvd_vcr", { description = S("DVD and VCR"), - drawtype = "nodebox", tiles = { "homedecor_dvdvcr_top.png", "homedecor_dvdvcr_bottom.png", @@ -117,8 +96,6 @@ minetest.register_node("homedecor:dvd_vcr", { "homedecor_dvdvcr_front.png", }, inventory_image = "homedecor_dvdvcr_inv.png", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -130,7 +107,7 @@ minetest.register_node("homedecor:dvd_vcr", { sounds = default.node_sound_wood_defaults(), }) -minetest.register_node("homedecor:telephone", { +homedecor.register("telephone", { tiles = { "homedecor_telephone_sides.png^[transformR180", "homedecor_telephone_sides.png", @@ -141,9 +118,6 @@ minetest.register_node("homedecor:telephone", { }, inventory_image = "homedecor_telephone_inv.png", description = "Telephone", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", diff --git a/homedecor/fences.lua b/homedecor/fences.lua index 3e503525..27b33be5 100644 --- a/homedecor/fences.lua +++ b/homedecor/fences.lua @@ -16,35 +16,30 @@ end local S = homedecor.gettext -minetest.register_node("homedecor:fence_brass", { +homedecor.register("fence_brass", { description = S("Brass Fence/railing"), drawtype = "fencelike", tiles = {"homedecor_tile_brass.png"}, inventory_image = "homedecor_fence_brass.png", - paramtype = "light", selection_box = homedecor.nodebox.bar_y(1/7), groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, }) -minetest.register_node("homedecor:fence_wrought_iron", { +homedecor.register("fence_wrought_iron", { description = S("Wrought Iron Fence/railing"), drawtype = "fencelike", tiles = {"homedecor_tile_wrought_iron.png"}, inventory_image = "homedecor_fence_wrought_iron.png", - paramtype = "light", selection_box = homedecor.nodebox.bar_y(1/7), groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, }) -- brass/wrought iron with signs: -minetest.register_node("homedecor:fence_brass_with_sign", { +homedecor.register("fence_brass_with_sign", { description = S("Brass Fence/railing with sign"), - drawtype = "nodebox", tiles = { "homedecor_sign_brass_post_top.png", "homedecor_sign_brass_post_bottom.png", @@ -54,12 +49,9 @@ minetest.register_node("homedecor:fence_brass_with_sign", { "homedecor_sign_brass_post_front.png", }, wield_image = "homedecor_sign_brass_post.png", - paramtype = "light", - paramtype2 = "facedir", node_box = sign_post_model, groups = {snappy=3,not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), - walkable = true, sunlight_propagates = true, drop = { max_items = 2, @@ -70,9 +62,8 @@ minetest.register_node("homedecor:fence_brass_with_sign", { }, }) -minetest.register_node("homedecor:fence_wrought_iron_with_sign", { +homedecor.register("fence_wrought_iron_with_sign", { description = S("Wrought Iron Fence/railing with sign"), - drawtype = "nodebox", tiles = { "homedecor_sign_wrought_iron_post_top.png", "homedecor_sign_wrought_iron_post_bottom.png", @@ -82,12 +73,9 @@ minetest.register_node("homedecor:fence_wrought_iron_with_sign", { "homedecor_sign_wrought_iron_post_front.png", }, wield_image = "homedecor_sign_wrought_iron_post.png", - paramtype = "light", - paramtype2 = "facedir", node_box = sign_post_model, groups = {snappy=3,not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), - walkable = true, sunlight_propagates = true, drop = { max_items = 2, @@ -100,8 +88,7 @@ minetest.register_node("homedecor:fence_wrought_iron_with_sign", { -- other types of fences -minetest.register_node("homedecor:fence_picket", { - drawtype = "nodebox", +homedecor.register("fence_picket", { description = S("Unpainted Picket Fence"), tiles = { "homedecor_blanktile.png", @@ -111,12 +98,8 @@ minetest.register_node("homedecor:fence_picket", { "homedecor_fence_picket_backside.png", "homedecor_fence_picket.png" }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 } @@ -127,8 +110,7 @@ minetest.register_node("homedecor:fence_picket", { }, }) -minetest.register_node("homedecor:fence_picket_corner", { - drawtype = "nodebox", +homedecor.register("fence_picket_corner", { description = S("Unpainted Picket Fence Corner"), tiles = { "homedecor_blanktile.png", @@ -138,12 +120,8 @@ minetest.register_node("homedecor:fence_picket_corner", { "homedecor_fence_picket_backside.png", "homedecor_fence_picket.png", }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { @@ -160,8 +138,7 @@ minetest.register_node("homedecor:fence_picket_corner", { }, }) -minetest.register_node("homedecor:fence_picket_white", { - drawtype = "nodebox", +homedecor.register("fence_picket_white", { description = S("White Picket Fence"), tiles = { "homedecor_blanktile.png", @@ -171,12 +148,8 @@ minetest.register_node("homedecor:fence_picket_white", { "homedecor_fence_picket_white_backside.png", "homedecor_fence_picket_white.png" }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 } @@ -187,8 +160,7 @@ minetest.register_node("homedecor:fence_picket_white", { }, }) -minetest.register_node("homedecor:fence_picket_corner_white", { - drawtype = "nodebox", +homedecor.register("fence_picket_corner_white", { description = S("White Picket Fence Corner"), tiles = { "homedecor_blanktile.png", @@ -198,12 +170,8 @@ minetest.register_node("homedecor:fence_picket_corner_white", { "homedecor_fence_picket_white_backside.png", "homedecor_fence_picket_white.png", }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { @@ -220,8 +188,7 @@ minetest.register_node("homedecor:fence_picket_corner_white", { }, }) -minetest.register_node("homedecor:fence_privacy", { - drawtype = "nodebox", +homedecor.register("fence_privacy", { description = S("Wooden Privacy Fence"), tiles = { "homedecor_fence_privacy_tb.png", @@ -231,12 +198,8 @@ minetest.register_node("homedecor:fence_privacy", { "homedecor_fence_privacy_backside.png", "homedecor_fence_privacy_front.png" }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { -0.5, -0.5, 5/16, 0.5, 0.5, 8/16 } @@ -252,8 +215,7 @@ minetest.register_node("homedecor:fence_privacy", { }, }) -minetest.register_node("homedecor:fence_privacy_corner", { - drawtype = "nodebox", +homedecor.register("fence_privacy_corner", { description = S("Wooden Privacy Fence Corner"), tiles = { "homedecor_fence_privacy_corner_top.png", @@ -263,12 +225,8 @@ minetest.register_node("homedecor:fence_privacy_corner", { "homedecor_fence_privacy_backside.png", "homedecor_fence_privacy_corner_front.png" }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { @@ -292,16 +250,11 @@ minetest.register_node("homedecor:fence_privacy_corner", { }, }) -minetest.register_node("homedecor:fence_barbed_wire", { - drawtype = "nodebox", +homedecor.register("fence_barbed_wire", { description = S("Barbed Wire Fence"), tiles = {"homedecor_fence_barbed_wire.png"}, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 } @@ -316,18 +269,13 @@ minetest.register_node("homedecor:fence_barbed_wire", { }, }) -minetest.register_node("homedecor:fence_barbed_wire_corner", { - drawtype = "nodebox", +homedecor.register("fence_barbed_wire_corner", { description = S("Barbed Wire Fence Corner"), tiles = { "homedecor_fence_barbed_wire.png" }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { @@ -348,8 +296,7 @@ minetest.register_node("homedecor:fence_barbed_wire_corner", { }, }) -minetest.register_node("homedecor:fence_chainlink", { - drawtype = "nodebox", +homedecor.register("fence_chainlink", { description = S("Chainlink Fence"), tiles = { "homedecor_fence_chainlink_tb.png", @@ -359,12 +306,8 @@ minetest.register_node("homedecor:fence_chainlink", { "homedecor_fence_chainlink_fb.png", "homedecor_fence_chainlink_fb.png", }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 } @@ -381,8 +324,7 @@ minetest.register_node("homedecor:fence_chainlink", { }, }) -minetest.register_node("homedecor:fence_chainlink_corner", { - drawtype = "nodebox", +homedecor.register("fence_chainlink_corner", { description = S("Chainlink Fence Corner"), tiles = { "homedecor_fence_chainlink_corner_top.png", @@ -392,12 +334,8 @@ minetest.register_node("homedecor:fence_chainlink_corner", { "homedecor_fence_chainlink_corner_front.png", "homedecor_fence_chainlink_corner_front.png", }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { @@ -421,8 +359,7 @@ minetest.register_node("homedecor:fence_chainlink_corner", { }, }) -minetest.register_node("homedecor:fence_wrought_iron_2", { - drawtype = "nodebox", +homedecor.register("fence_wrought_iron_2", { description = S("Wrought Iron fence (type 2)"), tiles = { "homedecor_fence_wrought_iron_2_tb.png", @@ -432,12 +369,8 @@ minetest.register_node("homedecor:fence_wrought_iron_2", { "homedecor_fence_wrought_iron_2_fb.png", "homedecor_fence_wrought_iron_2_fb.png" }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { -0.5, -0.5, 0.42, 0.5, 0.5, 0.5 } @@ -456,8 +389,7 @@ minetest.register_node("homedecor:fence_wrought_iron_2", { }, }) -minetest.register_node("homedecor:fence_wrought_iron_2_corner", { - drawtype = "nodebox", +homedecor.register("fence_wrought_iron_2_corner", { description = S("Wrought Iron fence (type 2) Corner"), tiles = { "homedecor_fence_corner_wrought_iron_2_tb.png", @@ -467,12 +399,8 @@ minetest.register_node("homedecor:fence_wrought_iron_2_corner", { "homedecor_fence_corner_wrought_iron_2_fb.png^[transformFX", "homedecor_fence_corner_wrought_iron_2_fb.png" }, - paramtype = "light", - is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { diff --git a/homedecor/furniture.lua b/homedecor/furniture.lua index 521d944c..40445288 100644 --- a/homedecor/furniture.lua +++ b/homedecor/furniture.lua @@ -13,12 +13,9 @@ for _, i in ipairs(table_colors) do desc = S("Table") end - minetest.register_node("homedecor:table"..color, { + homedecor.register("table"..color, { description = desc, tiles = { "forniture_wood"..color..".png" }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -65,12 +62,9 @@ for i in ipairs(chaircolors) do chairtiles = { "forniture_wood.png" } end - minetest.register_node("homedecor:chair"..color, { + homedecor.register("chair"..color, { description = S("Kitchen chair (%s)"):format(name), tiles = chairtiles, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -90,13 +84,10 @@ for i in ipairs(chaircolors) do }) if color ~= "" then - minetest.register_node("homedecor:armchair"..color, { + homedecor.register("armchair"..color, { description = S("Armchair (%s)"):format(name), tiles = { "forniture_armchair_top"..color..".png" }, - drawtype = "nodebox", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -134,14 +125,11 @@ end minetest.register_node(":homedecor:openframe_bookshelf", { description = "Bookshelf (open-frame)", - drawtype = "mesh", mesh = "homedecor_openframe_bookshelf.obj", tiles = { "homedecor_openframe_bookshelf.png" }, is_ground_content = false, groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3}, sounds = default.node_sound_wood_defaults(), - paramtype = "light", - paramtype2 = "facedir", selection_box = { type = "fixed", fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 } @@ -539,9 +527,6 @@ homedecor.register("deckchair_foot", { }, description = "Deck chair", inventory_image = "homedecor_deckchair_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy = 3 }, node_box = { type = "fixed", @@ -562,14 +547,11 @@ homedecor.register("deckchair_foot", { expand = { forward="homedecor:deckchair_head" }, }) -minetest.register_node("homedecor:wall_shelf", { +homedecor.register("wall_shelf", { description = "Wall Shelf", tiles = { "homedecor_wood_table_large_edges.png", }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy = 3 }, node_box = { type = "fixed", diff --git a/homedecor/furniture_medieval.lua b/homedecor/furniture_medieval.lua index eae09e3d..a780d313 100644 --- a/homedecor/furniture_medieval.lua +++ b/homedecor/furniture_medieval.lua @@ -1,13 +1,10 @@ local S = homedecor.gettext -minetest.register_node("homedecor:bars", { +homedecor.register("bars", { description = S("Bars"), tiles = { "forniture_black_metal.png" }, - drawtype = "nodebox", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -26,13 +23,10 @@ minetest.register_node("homedecor:bars", { }) --L Binding Bars -minetest.register_node("homedecor:L_binding_bars", { +homedecor.register("L_binding_bars", { description = S("Binding Bars"), tiles = { "forniture_black_metal.png" }, - drawtype = "nodebox", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -48,14 +42,11 @@ minetest.register_node("homedecor:L_binding_bars", { groups = {cracky=1,} }) -minetest.register_node("homedecor:chains", { +homedecor.register("chains", { description = S("Chains"), tiles = { "forniture_black_metal.png" }, inventory_image="3dforniture_inv_chains.png", - drawtype = "nodebox", sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -116,9 +107,8 @@ minetest.register_node("homedecor:chains", { groups = {cracky=1}, }) -minetest.register_node("homedecor:torch_wall", { +homedecor.register("torch_wall", { description = S("Wall Torch"), - drawtype = "nodebox", tiles = { "forniture_torch_wall_s.png", "forniture_torch_wall_i.png", @@ -133,8 +123,6 @@ minetest.register_node("homedecor:torch_wall", { }, }, inventory_image="3dforniture_inv_torch_wall.png", - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { diff --git a/homedecor/kitchen_appliances.lua b/homedecor/kitchen_appliances.lua index 5cff1fa9..b70d5b10 100644 --- a/homedecor/kitchen_appliances.lua +++ b/homedecor/kitchen_appliances.lua @@ -210,7 +210,7 @@ homedecor.register_furnace("homedecor:microwave_oven", { -- coffee! -- coffee! -- coffee! -minetest.register_node("homedecor:coffee_maker", { +homedecor.register("coffee_maker", { tiles = { "homedecor_coffeemaker_top.png", "homedecor_coffeemaker_bottom.png", @@ -288,7 +288,7 @@ minetest.register_abm({ end }) -minetest.register_node("homedecor:toaster", { +homedecor.register("toaster", { description = "Toaster", tiles = { "homedecor_toaster_sides.png", @@ -321,7 +321,7 @@ minetest.register_node("homedecor:toaster", { end }) -minetest.register_node("homedecor:toaster_loaf", { +homedecor.register("toaster_loaf", { tiles = { "homedecor_toaster_toploaf.png", "homedecor_toaster_sides.png", @@ -351,7 +351,7 @@ minetest.register_node("homedecor:toaster_loaf", { }) -minetest.register_node("homedecor:dishwasher", { +homedecor.register("dishwasher", { description = "Dishwasher", drawtype = "nodebox", tiles = { @@ -377,7 +377,7 @@ minetest.register_node("homedecor:dishwasher", { groups = { snappy = 3 }, }) -minetest.register_node("homedecor:dishwasher_wood", { +homedecor.register("dishwasher_wood", { description = "Dishwasher", tiles = { "homedecor_kitchen_cabinet_top.png", @@ -392,7 +392,7 @@ minetest.register_node("homedecor:dishwasher_wood", { groups = { snappy = 3 }, }) -minetest.register_node("homedecor:dishwasher_steel", { +homedecor.register("dishwasher_steel", { description = "Dishwasher", tiles = { "homedecor_kitchen_cabinet_top_steel.png", @@ -407,7 +407,7 @@ minetest.register_node("homedecor:dishwasher_steel", { groups = { snappy = 3 }, }) -minetest.register_node("homedecor:dishwasher_marble", { +homedecor.register("dishwasher_marble", { description = "Dishwasher", tiles = { "homedecor_kitchen_cabinet_top_marble.png", @@ -422,7 +422,7 @@ minetest.register_node("homedecor:dishwasher_marble", { groups = { snappy = 3 }, }) -minetest.register_node("homedecor:dishwasher_granite", { +homedecor.register("dishwasher_granite", { description = "Dishwasher", tiles = { "homedecor_kitchen_cabinet_top_granite.png", diff --git a/homedecor/kitchen_furniture.lua b/homedecor/kitchen_furniture.lua index 20188e14..df3c1781 100644 --- a/homedecor/kitchen_furniture.lua +++ b/homedecor/kitchen_furniture.lua @@ -22,8 +22,6 @@ for _, mat in ipairs(counter_materials) do 'homedecor_kitchen_cabinet_sides.png', 'homedecor_kitchen_cabinet_sides.png', 'homedecor_kitchen_cabinet_front.png'}, - sunlight_propagates = false, - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), infotext=S("Kitchen Cabinet"), @@ -42,8 +40,6 @@ homedecor.register("kitchen_cabinet_half", { 'homedecor_kitchen_cabinet_sides.png', 'homedecor_kitchen_cabinet_sides.png', 'homedecor_kitchen_cabinet_front_half.png'}, - sunlight_propagates = false, - walkable = true, selection_box = kitchen_cabinet_half_box, node_box = kitchen_cabinet_half_box, groups = { snappy = 3 }, @@ -58,8 +54,6 @@ homedecor.register("kitchen_cabinet_with_sink", { description = S("Kitchen Cabinet with sink"), mesh = "homedecor_kitchen_sink.obj", tiles = { "homedecor_kitchen_sink.png" }, - sunlight_propagates = false, - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), infotext=S("Under-sink cabinet"), @@ -68,15 +62,12 @@ homedecor.register("kitchen_cabinet_with_sink", { }, }) -minetest.register_node("homedecor:copper_pans", { +homedecor.register("copper_pans", { description = "Copper pans", tiles = { "homedecor_polished_copper.png" }, inventory_image = "homedecor_copper_pans_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3 }, node_box = { type = "fixed", @@ -102,13 +93,10 @@ minetest.register_node("homedecor:copper_pans", { on_place = minetest.rotate_node }) -minetest.register_node("homedecor:kitchen_faucet", { +homedecor.register("kitchen_faucet", { tiles = { "homedecor_bright_metal.png" }, inventory_image = "homedecor_kitchen_faucet_inv.png", description = "Kitchen Faucet", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", @@ -128,14 +116,11 @@ minetest.register_node("homedecor:kitchen_faucet", { }, }) -minetest.register_node("homedecor:paper_towel", { - drawtype = "mesh", +homedecor.register("paper_towel", { mesh = "homedecor_paper_towel.obj", tiles = { "homedecor_paper_towel.png" }, inventory_image = "homedecor_paper_towel_inv.png", description = "Paper towels", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3 }, selection_box = { type = "fixed", diff --git a/homedecor/laundry.lua b/homedecor/laundry.lua index 45bad348..14780600 100644 --- a/homedecor/laundry.lua +++ b/homedecor/laundry.lua @@ -1,8 +1,7 @@ -- laundry devices -minetest.register_node("homedecor:washing_machine", { +homedecor.register("washing_machine", { description = "Washing Machine", - drawtype = "nodebox", tiles = { "homedecor_washing_machine_top.png", "homedecor_washing_machine_bottom.png", @@ -11,8 +10,6 @@ minetest.register_node("homedecor:washing_machine", { "homedecor_washing_machine_back.png", "homedecor_washing_machine_front.png" }, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -24,9 +21,8 @@ minetest.register_node("homedecor:washing_machine", { groups = { snappy = 3 }, }) -minetest.register_node("homedecor:dryer", { +homedecor.register("dryer", { description = "Tumble dryer", - drawtype = "nodebox", tiles = { "homedecor_dryer_top.png", "homedecor_dryer_bottom.png", @@ -35,8 +31,6 @@ minetest.register_node("homedecor:dryer", { "homedecor_dryer_back.png", "homedecor_dryer_front.png" }, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { diff --git a/homedecor/lighting.lua b/homedecor/lighting.lua index bd4ce63d..628234ab 100644 --- a/homedecor/lighting.lua +++ b/homedecor/lighting.lua @@ -72,9 +72,8 @@ local glowlight_nodebox = { -- Yellow -minetest.register_node('homedecor:glowlight_half_yellow', { +homedecor.register("glowlight_half_yellow", { description = S("Yellow Glowlight (thick)"), - drawtype = "nodebox", tiles = { 'homedecor_glowlight_yellow_top.png', 'homedecor_glowlight_yellow_bottom.png', @@ -85,19 +84,14 @@ minetest.register_node('homedecor:glowlight_half_yellow', { }, selection_box = glowlight_nodebox.half, node_box = glowlight_nodebox.half, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) -minetest.register_node('homedecor:glowlight_quarter_yellow', { +homedecor.register("glowlight_quarter_yellow", { description = S("Yellow Glowlight (thin)"), - drawtype = "nodebox", tiles = { 'homedecor_glowlight_yellow_top.png', 'homedecor_glowlight_yellow_bottom.png', @@ -108,10 +102,6 @@ minetest.register_node('homedecor:glowlight_quarter_yellow', { }, selection_box = glowlight_nodebox.quarter, node_box = glowlight_nodebox.quarter, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), @@ -120,9 +110,8 @@ minetest.register_node('homedecor:glowlight_quarter_yellow', { -- White -minetest.register_node('homedecor:glowlight_half_white', { +homedecor.register("glowlight_half_white", { description = S("White Glowlight (thick)"), - drawtype = "nodebox", tiles = { 'homedecor_glowlight_white_top.png', 'homedecor_glowlight_white_bottom.png', @@ -133,19 +122,14 @@ minetest.register_node('homedecor:glowlight_half_white', { }, selection_box = glowlight_nodebox.half, node_box = glowlight_nodebox.half, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) -minetest.register_node('homedecor:glowlight_quarter_white', { +homedecor.register("glowlight_quarter_white", { description = S("White Glowlight (thin)"), - drawtype = "nodebox", tiles = { 'homedecor_glowlight_white_top.png', 'homedecor_glowlight_white_bottom.png', @@ -156,10 +140,6 @@ minetest.register_node('homedecor:glowlight_quarter_white', { }, selection_box = glowlight_nodebox.quarter, node_box = glowlight_nodebox.quarter, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), @@ -168,9 +148,8 @@ minetest.register_node('homedecor:glowlight_quarter_white', { -- Glowlight "cubes" -minetest.register_node('homedecor:glowlight_small_cube_yellow', { +homedecor.register("glowlight_small_cube_yellow", { description = S("Yellow Glowlight (small cube)"), - drawtype = "nodebox", tiles = { 'homedecor_glowlight_cube_yellow_tb.png', 'homedecor_glowlight_cube_yellow_tb.png', @@ -181,19 +160,14 @@ minetest.register_node('homedecor:glowlight_small_cube_yellow', { }, selection_box = glowlight_nodebox.small_cube, node_box = glowlight_nodebox.small_cube, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) -minetest.register_node('homedecor:glowlight_small_cube_white', { +homedecor.register("glowlight_small_cube_white", { description = S("White Glowlight (small cube)"), - drawtype = "nodebox", tiles = { 'homedecor_glowlight_cube_white_tb.png', 'homedecor_glowlight_cube_white_tb.png', @@ -204,17 +178,13 @@ minetest.register_node('homedecor:glowlight_small_cube_white', { }, selection_box = glowlight_nodebox.small_cube, node_box = glowlight_nodebox.small_cube, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) -minetest.register_node("homedecor:plasma_lamp", { +homedecor.register("plasma_lamp", { description = "Plasma Lamp", drawtype = "glasslike_framed", tiles = {"homedecor_gold_block.png","homedecor_glass_face_clean.png"}, @@ -225,7 +195,6 @@ minetest.register_node("homedecor:plasma_lamp", { } }, -- use_texture_alpha = true, - paramtype = "light", light_source = LIGHT_MAX - 1, sunlight_propagates = true, groups = {cracky=3,oddly_breakable_by_hand=3}, @@ -235,9 +204,8 @@ minetest.register_node("homedecor:plasma_lamp", { end }) -minetest.register_node('homedecor:candle', { +homedecor.register("candle", { description = S("Thick Candle"), - drawtype = "nodebox", tiles = { 'homedecor_candle_top.png', 'homedecor_candle_top.png', @@ -258,15 +226,12 @@ minetest.register_node('homedecor:candle', { } }, sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX-4, sounds = default.node_sound_wood_defaults(), }) -minetest.register_node('homedecor:candle_thin', { +homedecor.register("candle_thin", { description = S("Little Candle"), inventory_image = 'homedecor_candle_inv.png', drawtype = "plantlike", @@ -280,22 +245,17 @@ minetest.register_node('homedecor:candle_thin', { } }, sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", walkable = false, groups = { snappy = 3 }, light_source = LIGHT_MAX-4, }) -minetest.register_node('homedecor:oil_lamp', { +homedecor.register("oil_lamp", { description = S("Oil lamp"), drawtype = "plantlike", tiles = { 'homedecor_oil_lamp.png' }, inventory_image = 'homedecor_oil_lamp.png', sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, selection_box = { type = "fixed", fixed = { @@ -307,15 +267,12 @@ minetest.register_node('homedecor:oil_lamp', { sounds = default.node_sound_wood_defaults(), }) -minetest.register_node('homedecor:wall_lantern', { +homedecor.register("wall_lantern", { description = S("Wall lantern"), drawtype = "plantlike", tiles = { 'homedecor_wall_lantern.png' }, inventory_image = 'homedecor_wall_lantern.png', sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, selection_box = { type = "fixed", fixed = { @@ -327,20 +284,16 @@ minetest.register_node('homedecor:wall_lantern', { sounds = default.node_sound_wood_defaults(), }) -minetest.register_node('homedecor:lattice_lantern_large', { +homedecor.register("lattice_lantern_large", { description = S("Lattice lantern (large)"), tiles = { 'homedecor_lattice_lantern_large.png' }, - sunlight_propagates = false, - paramtype = "light", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX, sounds = default.node_sound_wood_defaults(), }) -minetest.register_node('homedecor:lattice_lantern_small', { +homedecor.register("lattice_lantern_small", { description = S("Lattice lantern (small)"), - drawtype = "nodebox", tiles = { 'homedecor_lattice_lantern_small_tb.png', 'homedecor_lattice_lantern_small_tb.png', @@ -354,10 +307,6 @@ minetest.register_node('homedecor:lattice_lantern_small', { type = "fixed", fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } }, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3 }, light_source = LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), @@ -385,12 +334,10 @@ local function reg_lamp(suffix, nxt, tilesuffix, light, color) colordesc = " (white)" end - minetest.register_node("homedecor:table_lamp"..lampcolor.."_"..suffix, { + homedecor.register("table_lamp"..lampcolor.."_"..suffix, { description = S("Table Lamp "..colordesc), - drawtype = "mesh", mesh = "homedecor_table_lamp.obj", tiles = { "homedecor_table_standing_lamp"..lampcolor.."_"..suffix..".png" }, - paramtype = "light", walkable = false, light_source = light, selection_box = tlamp_cbox, @@ -408,13 +355,11 @@ local function reg_lamp(suffix, nxt, tilesuffix, light, color) -- standing lamps - minetest.register_node("homedecor:standing_lamp"..lampcolor.."_"..suffix, { + homedecor.register("standing_lamp"..lampcolor.."_"..suffix, { description = S("Standing Lamp"..colordesc), - drawtype = "mesh", mesh = "homedecor_standing_lamp.obj", tiles = { "homedecor_table_standing_lamp"..lampcolor.."_"..suffix..".png" }, inventory_image = "homedecor_standing_lamp"..lampcolor.."_inv.png", - paramtype = "light", walkable = false, light_source = light, groups = {cracky=2,oddly_breakable_by_hand=1, diff --git a/homedecor/misc-electrical.lua b/homedecor/misc-electrical.lua index d96f9d0e..a3a0187c 100644 --- a/homedecor/misc-electrical.lua +++ b/homedecor/misc-electrical.lua @@ -1,7 +1,4 @@ -minetest.register_node("homedecor:power_outlet", { - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", +homedecor.register("power_outlet", { description = "Power Outlet", tiles = { "homedecor_outlet_edges.png", @@ -28,10 +25,7 @@ minetest.register_node("homedecor:power_outlet", { sounds = default.node_sound_stone_defaults() }) -minetest.register_node("homedecor:light_switch", { - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", +homedecor.register("light_switch", { description = "Light switch", tiles = { "homedecor_light_switch_edges.png", @@ -61,13 +55,10 @@ minetest.register_node("homedecor:light_switch", { }) -minetest.register_node("homedecor:doorbell", { +homedecor.register("doorbell", { tiles = { "homedecor_doorbell.png" }, inventory_image = "homedecor_doorbell_inv.png", description = "Doorbell", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index 2e8f0283..a114ef04 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.lua @@ -2,14 +2,13 @@ local S = homedecor.gettext -minetest.register_node('homedecor:ceiling_paint', { +homedecor.register("ceiling_paint", { description = S("Textured Ceiling Paint"), drawtype = 'signlike', tiles = { 'homedecor_ceiling_paint.png' }, inventory_image = 'homedecor_ceiling_paint_roller.png', wield_image = 'homedecor_ceiling_paint_roller.png', sunlight_propagates = true, - paramtype = 'light', walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -21,14 +20,13 @@ minetest.register_node('homedecor:ceiling_paint', { }, }) -minetest.register_node('homedecor:ceiling_tile', { +homedecor.register("ceiling_tile", { description = S("Drop-Ceiling Tile"), drawtype = 'signlike', tiles = { 'homedecor_ceiling_tile.png' }, wield_image = 'homedecor_ceiling_tile.png', inventory_image = 'homedecor_ceiling_tile.png', sunlight_propagates = true, - paramtype = 'light', walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -40,16 +38,14 @@ minetest.register_node('homedecor:ceiling_tile', { }, }) -minetest.register_node('homedecor:rug_small', { +homedecor.register("rug_small", { description = S("Small Throw Rug"), drawtype = 'signlike', tiles = { 'homedecor_rug_small.png' }, wield_image = 'homedecor_rug_small.png', inventory_image = 'homedecor_rug_small.png', sunlight_propagates = true, - paramtype = 'light', paramtype2 = "wallmounted", - is_ground_content = true, walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -61,16 +57,14 @@ minetest.register_node('homedecor:rug_small', { }, }) -minetest.register_node('homedecor:rug_large', { +homedecor.register("rug_large", { description = S("Large Area Rug"), drawtype = 'signlike', tiles = { 'homedecor_rug_large.png' }, wield_image = 'homedecor_rug_large.png', inventory_image = 'homedecor_rug_large.png', sunlight_propagates = true, - paramtype = 'light', paramtype2 = "wallmounted", - is_ground_content = true, walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -82,55 +76,36 @@ minetest.register_node('homedecor:rug_large', { }, }) -minetest.register_node('homedecor:flower_pot_terracotta', { +homedecor.register("flower_pot_terracotta", { description = S("Terracotta Flower Pot"), - drawtype = "mesh", mesh = "homedecor_flowerpot.obj", tiles = { "homedecor_flower_pot_terracotta.png" }, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3, potting_soil=1}, sounds = default.node_sound_leaves_defaults(), }) -minetest.register_node('homedecor:flower_pot_black', { +homedecor.register("flower_pot_black", { description = S("Black Plastic Flower Pot"), - drawtype = "mesh", mesh = "homedecor_flowerpot.obj", tiles = { "homedecor_flower_pot_black.png" }, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3, potting_soil=1 }, sounds = default.node_sound_leaves_defaults(), }) -minetest.register_node('homedecor:flower_pot_green', { +homedecor.register("flower_pot_green", { description = S("Green Plastic Flower Pot"), - drawtype = "mesh", mesh = "homedecor_flowerpot.obj", tiles = { "homedecor_flower_pot_green.png" }, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, groups = { snappy = 3, potting_soil=1 }, sounds = default.node_sound_leaves_defaults(), }) -minetest.register_node("homedecor:pole_brass", { +homedecor.register("pole_brass", { description = S("Brass Pole"), - drawtype = "mesh", mesh = "homedecor_round_pole.obj", tiles = {"homedecor_tile_brass2.png"}, inventory_image = "homedecor_pole_brass_inv.png", wield_image = "homedecor_pole_brass_inv.png", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = true, selection_box = { type = "fixed", fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, @@ -141,18 +116,13 @@ minetest.register_node("homedecor:pole_brass", { }, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, }) -minetest.register_node("homedecor:pole_wrought_iron", { +homedecor.register("pole_wrought_iron", { description = S("Wrought Iron Pole"), - drawtype = "nodebox", tiles = {"homedecor_tile_wrought_iron2.png"}, inventory_image = "homedecor_pole_wrought_iron_inv.png", wield_image = "homedecor_pole_wrought_iron_inv.png", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = true, selection_box = { type = "fixed", fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625} @@ -163,17 +133,13 @@ minetest.register_node("homedecor:pole_wrought_iron", { }, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - walkable = true, }) local welcome_mat_colors = { "green", "brown", "grey" } for _, color in ipairs(welcome_mat_colors) do - minetest.register_node("homedecor:welcome_mat_"..color, { + homedecor.register("welcome_mat_"..color, { description = "Welcome Mat ("..color..")", - paramtype = "light", - paramtype2 = "facedir", - drawtype = "nodebox", tiles = { "homedecor_welcome_mat_"..color..".png", "homedecor_welcome_mat_bottom.png", @@ -190,9 +156,7 @@ for _, color in ipairs(welcome_mat_colors) do }) end -minetest.register_node("homedecor:chimney", { - drawtype = "nodebox", - paramtype = "light", +homedecor.register("chimney", { description = "Chimney", tiles = { "homedecor_chimney_top.png", @@ -213,8 +177,7 @@ minetest.register_node("homedecor:chimney", { sounds = default.node_sound_stone_defaults() }) -minetest.register_node("homedecor:fishtank", { - drawtype = "nodebox", +homedecor.register("fishtank", { description = "Fishtank", tiles = { "homedecor_fishtank_top.png", @@ -224,8 +187,6 @@ minetest.register_node("homedecor:fishtank", { "homedecor_fishtank_back.png", "homedecor_fishtank_front.png" }, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -251,8 +212,7 @@ minetest.register_node("homedecor:fishtank", { end }) -minetest.register_node("homedecor:fishtank_lighted", { - drawtype = "nodebox", +homedecor.register("fishtank_lighted", { description = "Fishtank", tiles = { "homedecor_fishtank_top.png", @@ -262,9 +222,7 @@ minetest.register_node("homedecor:fishtank_lighted", { "homedecor_fishtank_back_lighted.png", "homedecor_fishtank_front_lighted.png" }, - paramtype = "light", light_source = LIGHT_MAX-4, - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -291,14 +249,12 @@ minetest.register_node("homedecor:fishtank_lighted", { }) homedecor.register("cardboard_box_big", { - drawtype = "normal", description = S("Cardboard box (big)"), tiles = { 'homedecor_cardbox_big_tb.png', 'homedecor_cardbox_big_tb.png', 'homedecor_cardbox_big_sides.png', }, - sunlight_propagates = false, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), infotext=S("Cardboard box"), @@ -308,7 +264,6 @@ homedecor.register("cardboard_box_big", { }) homedecor.register("cardboard_box", { - drawtype = "nodebox", description = S("Cardboard box"), tiles = { 'homedecor_cardbox_tb.png', @@ -321,7 +276,6 @@ homedecor.register("cardboard_box", { {-0.3125, -0.5, -0.3125, 0.3125, 0, 0.3125}, } }, - sunlight_propagates = false, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), infotext=S("Cardboard box"), @@ -330,11 +284,8 @@ homedecor.register("cardboard_box", { }, }) -minetest.register_node("homedecor:dvd_cd_cabinet", { +homedecor.register("dvd_cd_cabinet", { description = "DVD/CD cabinet", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", tiles = { "homedecor_dvdcd_cabinet_top.png", "homedecor_dvdcd_cabinet_top.png", @@ -371,8 +322,6 @@ homedecor.register("filing_cabinet", { 'forniture_wood.png', 'homedecor_filing_cabinet_front.png' }, - sunlight_propagates = false, - walkable = true, selection_box = { type = "regular" }, node_box = { type = "fixed", @@ -549,7 +498,7 @@ homedecor.register("pool_table_2", { selection_box = homedecor.nodebox.null, }) -minetest.register_node("homedecor:trash_can", { +homedecor.register("trash_can", { tiles = { "homedecor_trashcan_tb.png", "homedecor_trashcan_tb.png", @@ -560,9 +509,6 @@ minetest.register_node("homedecor:trash_can", { }, inventory_image = "homedecor_trashcan_inv.png", description = "Trash Can", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", @@ -679,13 +625,10 @@ homedecor.register("well_top", { selection_box = homedecor.nodebox.null, }) -minetest.register_node("homedecor:coatrack_wallmount", { +homedecor.register("coatrack_wallmount", { tiles = { "forniture_wood.png" }, inventory_image = "homedecor_coatrack_wallmount_inv.png", description = "Coatrack (wallmounted)", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", @@ -703,13 +646,10 @@ minetest.register_node("homedecor:coatrack_wallmount", { }, }) -minetest.register_node("homedecor:coat_tree", { +homedecor.register("coat_tree", { tiles = { "forniture_wood.png" }, inventory_image = "homedecor_coatrack_inv.png", description = "Coat tree", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", @@ -727,7 +667,7 @@ minetest.register_node("homedecor:coat_tree", { }, }) -minetest.register_node("homedecor:cutlery_set", { +homedecor.register("cutlery_set", { tiles = { "homedecor_cutlery_set_top.png", "homedecor_cutlery_set_sides.png", @@ -735,9 +675,6 @@ minetest.register_node("homedecor:cutlery_set", { }, inventory_image = "homedecor_cutlery_set_inv.png", description = "Cutlery set", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = {snappy=3}, node_box = { type = "fixed", @@ -780,28 +717,22 @@ local bottle_cbox = { } } -minetest.register_node("homedecor:bottle_brown", { +homedecor.register("bottle_brown", { tiles = { "homedecor_bottle_brown.png" }, inventory_image = "homedecor_bottle_brown_inv.png", description = "Brown bottle", - drawtype = "mesh", mesh = "homedecor_bottle.obj", - paramtype = "light", - paramtype2 = "facedir", sunlight_propagates = true, groups = {snappy=3}, collision_box = bottle_cbox, selection_box = bottle_cbox }) -minetest.register_node("homedecor:bottle_green", { +homedecor.register("bottle_green", { tiles = { "homedecor_bottle_green.png" }, inventory_image = "homedecor_bottle_green_inv.png", description = "Green bottle", - drawtype = "mesh", mesh = "homedecor_bottle.obj", - paramtype = "light", - paramtype2 = "facedir", sunlight_propagates = true, groups = {snappy=3}, collision_box = bottle_cbox, @@ -817,56 +748,45 @@ local fbottle_cbox = { } } -minetest.register_node("homedecor:4_bottles_brown", { +homedecor.register("4_bottles_brown", { tiles = { "homedecor_bottle_brown.png" }, inventory_image = "homedecor_4_bottles_brown_inv.png", description = "Four brown bottles", - drawtype = "mesh", mesh = "homedecor_4_bottles.obj", - paramtype = "light", - paramtype2 = "facedir", sunlight_propagates = true, groups = {snappy=3}, collision_box = fbottle_cbox, selection_box = fbottle_cbox }) -minetest.register_node("homedecor:4_bottles_green", { +homedecor.register("4_bottles_green", { tiles = { "homedecor_bottle_green.png" }, inventory_image = "homedecor_4_bottles_green_inv.png", description = "Four green bottles", - drawtype = "mesh", mesh = "homedecor_4_bottles.obj", - paramtype = "light", - paramtype2 = "facedir", sunlight_propagates = true, groups = {snappy=3}, collision_box = fbottle_cbox, selection_box = fbottle_cbox }) -minetest.register_node("homedecor:4_bottles_multi", { +homedecor.register("4_bottles_multi", { tiles = { "homedecor_4_bottles_multi.png" }, inventory_image = "homedecor_4_bottles_multi_inv.png", description = "Four misc brown/green bottles", - drawtype = "mesh", mesh = "homedecor_4_bottles_multi.obj", - paramtype = "light", - paramtype2 = "facedir", sunlight_propagates = true, groups = {snappy=3}, collision_box = fbottle_cbox, selection_box = fbottle_cbox }) -minetest.register_node("homedecor:dartboard", { +homedecor.register("dartboard", { description = "Dartboard", - drawtype = "mesh", mesh = "homedecor_dartboard.obj", tiles = { "homedecor_dartboard.png" }, inventory_image = "homedecor_dartboard_inv.png", wield_image = "homedecor_dartboard_inv.png", - paramtype = "light", paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, @@ -950,15 +870,12 @@ minetest.register_abm({ end }) -minetest.register_node("homedecor:trophy", { +homedecor.register("trophy", { description = "Trophy", tiles = { "default_gold_block.png" }, inventory_image = "homedecor_trophy_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3 }, node_box = { type = "fixed", @@ -986,7 +903,7 @@ minetest.register_node("homedecor:trophy", { } }) -minetest.register_node("homedecor:sportbench", { +homedecor.register("sportbench", { description = "Sport bench", tiles = { "homedecor_sportbench_top.png", @@ -996,9 +913,6 @@ minetest.register_node("homedecor:sportbench", { "homedecor_sportbench_bottom.png", "homedecor_sportbench_front.png" }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3 }, node_box = { type = "fixed", @@ -1022,7 +936,7 @@ minetest.register_node("homedecor:sportbench", { } }) -minetest.register_node("homedecor:skateboard", { +homedecor.register("skateboard", { description = "Skateboard", tiles = { "homedecor_skateboard_top.png", @@ -1030,9 +944,6 @@ minetest.register_node("homedecor:skateboard", { "homedecor_skateboard_sides.png" }, inventory_image = "homedecor_skateboard_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3 }, node_box = { type = "fixed", @@ -1053,15 +964,12 @@ minetest.register_node("homedecor:skateboard", { on_place = minetest.rotate_node }) -minetest.register_node("homedecor:stonepath", { +homedecor.register("stonepath", { description = "Garden stone path", tiles = { "default_stone.png" }, inventory_image = "homedecor_stonepath_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3 }, node_box = { type = "fixed", @@ -1134,7 +1042,7 @@ homedecor.register("barbecue_meat", { selection_box = homedecor.nodebox.null }) -minetest.register_node("homedecor:beer_tap", { +homedecor.register("beer_tap", { description = "Beer tap", tiles = { "homedecor_beertap_front.png", @@ -1145,9 +1053,6 @@ minetest.register_node("homedecor:beer_tap", { "homedecor_beertap_front.png" }, inventory_image = "homedecor_beertap_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3 }, node_box = { type = "fixed", @@ -1185,7 +1090,7 @@ minetest.register_node("homedecor:beer_tap", { end }) -minetest.register_node("homedecor:beer_mug", { +homedecor.register("beer_mug", { description = "Beer mug", tiles = { "homedecor_beer_top.png", @@ -1197,9 +1102,6 @@ minetest.register_node("homedecor:beer_mug", { }, inventory_image = "homedecor_beer_inv.png", use_texture_alpha = true, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3, oddly_breakable_by_hand=3 }, sounds = default.node_sound_glass_defaults(), node_box = { @@ -1276,7 +1178,7 @@ homedecor.register("tool_cabinet_top", { selection_box = homedecor.nodebox.null }) -minetest.register_node("homedecor:swing", { +homedecor.register("swing", { description = "Tree's swing", tiles = { "homedecor_swing_top.png", @@ -1284,9 +1186,6 @@ minetest.register_node("homedecor:swing", { "homedecor_swing_top.png" }, inventory_image = "homedecor_swing_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3, oddly_breakable_by_hand=3 }, node_box = { type = "fixed", @@ -1351,13 +1250,10 @@ minetest.register_node("homedecor:swing", { end }) -minetest.register_node("homedecor:swing_rope", { +homedecor.register("swing_rope", { tiles = { "homedecor_swingrope_sides.png" }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { not_in_creative_inventory=1 }, node_box = { type = "fixed", @@ -1398,7 +1294,7 @@ for c in ipairs(bookcolors) do minetest.remove_node(pos) end -minetest.register_node("homedecor:book_"..color, { +homedecor.register("book_"..color, { description = S("Book (%s)"):format(color_d), tiles = { "homedecor_book_"..color.."_top.png", @@ -1410,9 +1306,6 @@ minetest.register_node("homedecor:book_"..color, { }, inventory_image = "homedecor_book_"..color.."_inv.png", wield_image = "homedecor_book_"..color.."_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3, oddly_breakable_by_hand=3, book=1 }, stack_max = 1, node_box = { @@ -1481,7 +1374,7 @@ minetest.register_node("homedecor:book_"..color, { end, }) -minetest.register_node("homedecor:book_open_"..color, { +homedecor.register("book_open_"..color, { tiles = { "homedecor_book_open_top.png", "homedecor_book_open_"..color.."_bottom.png", @@ -1490,9 +1383,6 @@ minetest.register_node("homedecor:book_open_"..color, { "homedecor_book_open_sides.png", "homedecor_book_open_sides.png" }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy=3, oddly_breakable_by_hand=3, not_in_creative_inventory=1 }, node_box = { type = "fixed", @@ -1525,13 +1415,12 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields) player:set_wielded_item(stack) end) -minetest.register_node("homedecor:calendar", { +homedecor.register("calendar", { description = "Calendar", drawtype = "signlike", tiles = {"homedecor_calendar.png"}, inventory_image = "homedecor_calendar.png", wield_image = "homedecor_calendar.png", - paramtype = "light", paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, @@ -1548,14 +1437,11 @@ local globe_cbox = { fixed = { -0.4, -0.5, -0.3, 0.3, 0.3, 0.3 } } -minetest.register_node("homedecor:desk_globe", { +homedecor.register("desk_globe", { description = "Desk globe", - drawtype = "mesh", mesh = "homedecor_desk_globe.obj", tiles = {"homedecor_desk_globe.png"}, inventory_image = "homedecor_desk_globe_inv.png", - paramtype = "light", - paramtype2 = "facedir", selection_box = globe_cbox, collision_box = globe_cbox, groups = {choppy=2}, @@ -1563,14 +1449,11 @@ minetest.register_node("homedecor:desk_globe", { }) local wine_cbox = homedecor.nodebox.slab_z(0.25) -minetest.register_node("homedecor:wine_rack", { +homedecor.register("wine_rack", { description = "Wine Rack", - drawtype = "mesh", mesh = "homedecor_wine_rack.obj", tiles = {"homedecor_wine_rack.png"}, inventory_image = "homedecor_wine_rack_inv.png", - paramtype = "light", - paramtype2 = "facedir", groups = {choppy=2}, selection_box = wine_cbox, collision_box = wine_cbox, diff --git a/homedecor/nightstands.lua b/homedecor/nightstands.lua index e5a2acd6..b99e7706 100644 --- a/homedecor/nightstands.lua +++ b/homedecor/nightstands.lua @@ -10,8 +10,6 @@ homedecor.register("nightstand_oak_one_drawer", { 'homedecor_nightstand_oak_left.png', 'homedecor_nightstand_oak_back.png', 'homedecor_nightstand_oak_1_drawer_front.png'}, - sunlight_propagates = false, - walkable = true, selection_box = { type = "regular" }, node_box = { type = "fixed", @@ -33,7 +31,6 @@ homedecor.register("nightstand_oak_one_drawer", { }) homedecor.register("nightstand_oak_two_drawers", { - drawtype = "nodebox", description = S("Oak Nightstand with Two Drawers"), tiles = { 'homedecor_nightstand_oak_top.png', 'homedecor_nightstand_oak_bottom.png', @@ -41,10 +38,6 @@ homedecor.register("nightstand_oak_two_drawers", { 'homedecor_nightstand_oak_left.png', 'homedecor_nightstand_oak_back.png', 'homedecor_nightstand_oak_2_drawer_front.png'}, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, selection_box = { type = "regular" }, node_box = { type = "fixed", @@ -71,8 +64,6 @@ homedecor.register("nightstand_mahogany_one_drawer", { 'homedecor_nightstand_mahogany_left.png', 'homedecor_nightstand_mahogany_back.png', 'homedecor_nightstand_mahogany_1_drawer_front.png'}, - sunlight_propagates = false, - walkable = true, selection_box = { type = "regular" }, node_box = { type = "fixed", @@ -101,8 +92,6 @@ homedecor.register("nightstand_mahogany_two_drawers", { 'homedecor_nightstand_mahogany_left.png', 'homedecor_nightstand_mahogany_back.png', 'homedecor_nightstand_mahogany_2_drawer_front.png'}, - sunlight_propagates = false, - walkable = true, selection_box = { type = "regular" }, node_box = { type = "fixed", diff --git a/homedecor/paintings.lua b/homedecor/paintings.lua index 7e345282..68952a82 100644 --- a/homedecor/paintings.lua +++ b/homedecor/paintings.lua @@ -1,9 +1,8 @@ --Various kinds of paintings for i = 1,20 do - minetest.register_node("homedecor:painting_"..i, { + homedecor.register("painting_"..i, { description = "Decorative painting #"..i, - drawtype = "nodebox", tiles = { "homedecor_painting_edges.png", "homedecor_painting_edges.png", @@ -12,8 +11,6 @@ for i = 1,20 do "homedecor_painting_back.png", "homedecor_painting"..i..".png" }, - paramtype = "light", - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { diff --git a/homedecor/shingles.lua b/homedecor/shingles.lua index dce279f9..ac5f3209 100644 --- a/homedecor/shingles.lua +++ b/homedecor/shingles.lua @@ -10,7 +10,6 @@ minetest.register_node("homedecor:skylight", { inventory_image = "homedecor_skylight_inv.png", paramtype = "light", sunlight_propagates = true, - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), selection_box = homedecor.nodebox.slab_y(0.1), @@ -25,7 +24,6 @@ minetest.register_node("homedecor:skylight_frosted", { paramtype = "light", sunlight_propagates = true, use_texture_alpha = true, - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), selection_box = homedecor.nodebox.slab_y(0.1), @@ -38,7 +36,6 @@ minetest.register_node("homedecor:shingles_wood", { wield_image = "homedecor_shingles_wood.png", inventory_image = "homedecor_shingles_wood_inv.png", paramtype = "light", - sunlight_propagates = false, walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -52,7 +49,6 @@ minetest.register_node("homedecor:shingles_asphalt", { wield_image = "homedecor_shingles_asphalt.png", inventory_image = "homedecor_shingles_asphalt_inv.png", paramtype = "light", - sunlight_propagates = false, walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -66,7 +62,6 @@ minetest.register_node("homedecor:shingles_terracotta", { wield_image = "homedecor_shingles_terracotta.png", inventory_image = "homedecor_shingles_terracotta_inv.png", paramtype = "light", - sunlight_propagates = false, walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), diff --git a/homedecor/shutters.lua b/homedecor/shutters.lua index d5741b8f..b7f592f8 100644 --- a/homedecor/shutters.lua +++ b/homedecor/shutters.lua @@ -20,8 +20,7 @@ for i in ipairs(shutters) do local name = shutters[i][1] local desc = shutters[i][2] -minetest.register_node("homedecor:shutter_"..name, { - drawtype = "mesh", +homedecor.register("shutter_"..name, { mesh = "homedecor_window_shutter.obj", tiles = { "homedecor_window_shutter_"..name..".png" }, description = S("Wooden Shutter ("..desc..")"), diff --git a/homedecor/tables.lua b/homedecor/tables.lua index b17944a3..eee9fde4 100644 --- a/homedecor/tables.lua +++ b/homedecor/tables.lua @@ -25,19 +25,15 @@ for i in ipairs(materials) do -- small square tables - minetest.register_node("homedecor:"..m.."_table_small_square", { + homedecor.register(m.."_table_small_square", { description = S(d.." Table (Small, Square)"), - drawtype = 'mesh', mesh = "homedecor_table_small_square.obj", tiles = { 'homedecor_'..m..'_table_small_square.png' }, wield_image = 'homedecor_'..m..'_table_small_square_inv.png', inventory_image = 'homedecor_'..m..'_table_small_square_inv.png', sunlight_propagates = true, - paramtype = 'light', - walkable = true, groups = { snappy = 3 }, sounds = s, - paramtype2 = "facedir", selection_box = tables_cbox, collision_box = tables_cbox, on_place = minetest.rotate_node @@ -45,19 +41,15 @@ for i in ipairs(materials) do -- small round tables - minetest.register_node('homedecor:'..m..'_table_small_round', { + homedecor.register(m..'_table_small_round', { description = S(d.." Table (Small, Round)"), - drawtype = "mesh", mesh = "homedecor_table_small_round.obj", tiles = { "homedecor_"..m.."_table_small_round.png" }, wield_image = 'homedecor_'..m..'_table_small_round_inv.png', inventory_image = 'homedecor_'..m..'_table_small_round_inv.png', sunlight_propagates = true, - paramtype = 'light', - walkable = true, groups = { snappy = 3 }, sounds = s, - paramtype2 = "facedir", selection_box = tables_cbox, collision_box = tables_cbox, on_place = minetest.rotate_node @@ -65,9 +57,8 @@ for i in ipairs(materials) do -- Large square table pieces - minetest.register_node('homedecor:'..m..'_table_large', { + homedecor.register(m..'_table_large', { description = S(d.." Table Piece (large)"), - drawtype = 'nodebox', tiles = { 'homedecor_'..m..'_table_large_tb.png', 'homedecor_'..m..'_table_large_tb.png', @@ -79,11 +70,8 @@ for i in ipairs(materials) do wield_image = 'homedecor_'..m..'_table_large_inv.png', inventory_image = 'homedecor_'..m..'_table_large_inv.png', sunlight_propagates = true, - paramtype = 'light', - walkable = true, groups = { snappy = 3 }, sounds = s, - paramtype2 = "facedir", node_box = { type = "fixed", fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 }, @@ -138,7 +126,7 @@ minetest.register_abm({ -- other tables -minetest.register_node('homedecor:utility_table_top', { +homedecor.register("utility_table_top", { description = S("Utility Table"), tiles = { 'homedecor_utility_table_tb.png', @@ -150,10 +138,6 @@ minetest.register_node('homedecor:utility_table_top', { }, wield_image = 'homedecor_utility_table_tb.png', inventory_image = 'homedecor_utility_table_tb.png', - drawtype = "nodebox", - sunlight_propagates = false, - paramtype = "light", - walkable = true, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), paramtype2 = "wallmounted", @@ -173,48 +157,43 @@ minetest.register_node('homedecor:utility_table_top', { -- Various kinds of table legs -minetest.register_node("homedecor:table_legs_brass", { +homedecor.register("table_legs_brass", { description = S("Brass Table Legs"), drawtype = "plantlike", tiles = {"homedecor_table_legs_brass.png"}, inventory_image = "homedecor_table_legs_brass.png", wield_image = "homedecor_table_legs_brass.png", - paramtype = "light", walkable = false, groups = {snappy=3}, sounds = default.node_sound_leaves_defaults(), - walkable = true, selection_box = { type = "fixed", fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 } }, }) -minetest.register_node("homedecor:table_legs_wrought_iron", { +homedecor.register("table_legs_wrought_iron", { description = S("Wrought Iron Table Legs"), drawtype = "plantlike", tiles = {"homedecor_table_legs_wrought_iron.png"}, inventory_image = "homedecor_table_legs_wrought_iron.png", wield_image = "homedecor_table_legs_wrought_iron.png", - paramtype = "light", walkable = false, groups = {snappy=3}, sounds = default.node_sound_leaves_defaults(), - walkable = true, selection_box = { type = "fixed", fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 } }, }) -minetest.register_node('homedecor:utility_table_legs', { +homedecor.register("utility_table_legs", { description = S("Legs for Utility Table"), drawtype = "plantlike", tiles = { 'homedecor_utility_table_legs.png' }, inventory_image = 'homedecor_utility_table_legs_inv.png', wield_image = 'homedecor_utility_table_legs.png', sunlight_propagates = true, - paramtype = "light", walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), diff --git a/homedecor/window_treatments.lua b/homedecor/window_treatments.lua index 4c16f7fd..55187444 100644 --- a/homedecor/window_treatments.lua +++ b/homedecor/window_treatments.lua @@ -1,7 +1,7 @@ local S = homedecor.gettext -minetest.register_node("homedecor:window_quartered", { +homedecor.register("window_quartered", { description = "Window (quartered)", tiles = { "homedecor_window_sides.png", @@ -11,12 +11,9 @@ minetest.register_node("homedecor:window_quartered", { "homedecor_window_quartered.png", "homedecor_window_quartered.png" }, - paramtype = "light", - paramtype2 = "facedir", use_texture_alpha = true, groups = {snappy=3}, sounds = default.node_sound_glass_defaults(), - drawtype = "nodebox", node_box = { type = "fixed", fixed = { @@ -37,7 +34,7 @@ minetest.register_node("homedecor:window_quartered", { }, }) -minetest.register_node("homedecor:window_plain", { +homedecor.register("window_plain", { description = "Window (plain)", tiles = { "homedecor_window_sides.png", @@ -47,12 +44,9 @@ minetest.register_node("homedecor:window_plain", { "homedecor_window_frame.png", "homedecor_window_frame.png" }, - paramtype = "light", - paramtype2 = "facedir", use_texture_alpha = true, groups = {snappy=3}, sounds = default.node_sound_glass_defaults(), - drawtype = "nodebox", node_box = { type = "fixed", fixed = { @@ -71,15 +65,12 @@ minetest.register_node("homedecor:window_plain", { }, }) -minetest.register_node("homedecor:blinds_thick", { +homedecor.register("blinds_thick", { description = "Window Blinds (thick)", tiles = { "homedecor_windowblinds.png" }, - paramtype = "light", - paramtype2 = "facedir", walkable = false, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - drawtype = "nodebox", node_box = { type = "fixed", fixed = { @@ -111,15 +102,12 @@ minetest.register_node("homedecor:blinds_thick", { }, }) -minetest.register_node("homedecor:blinds_thin", { +homedecor.register("blinds_thin", { description = "Window Blinds (thin)", tiles = { "homedecor_windowblinds.png" }, - paramtype = "light", - paramtype2 = "facedir", walkable = false, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - drawtype = "nodebox", node_box = { type = "fixed", fixed = { @@ -164,7 +152,7 @@ for c in ipairs(curtaincolors) do local color = curtaincolors[c] local color_d = S(curtaincolors[c]) - minetest.register_node("homedecor:curtain_"..color, { + homedecor.register("curtain_"..color, { description = S("Curtains (%s)"):format(color_d), tiles = { "homedecor_curtain_"..color..".png" }, inventory_image = "homedecor_curtain_"..color..".png", @@ -172,8 +160,6 @@ for c in ipairs(curtaincolors) do drawtype = 'signlike', sunlight_propagates = true, use_texture_alpha = true, - paramtype = "light", - paramtype2 = "facedir", walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -191,7 +177,7 @@ for c in ipairs(curtaincolors) do end }) - minetest.register_node("homedecor:curtain_open_"..color, { + homedecor.register("curtain_open_"..color, { description = S("Curtains (%s)"):format(color_d), tiles = { "homedecor_curtain_open_"..color..".png" }, inventory_image = "homedecor_curtain_open_"..color..".png", @@ -199,8 +185,6 @@ for c in ipairs(curtaincolors) do drawtype = 'signlike', sunlight_propagates = true, use_texture_alpha = true, - paramtype = "light", - paramtype2 = "facedir", walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_leaves_defaults(), @@ -230,13 +214,10 @@ for i in ipairs(mats) do local material = mats[i][1] local mat_name = mats[i][2] local texture = mats[i][3] - minetest.register_node("homedecor:curtainrod_"..material, { + homedecor.register("curtainrod_"..material, { tiles = { texture }, inventory_image = "homedecor_curtainrod_"..material.."_inv.png", description = "Curtain Rod ("..mat_name..")", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", sunlight_propagates = true, groups = { snappy = 3 }, node_box = { @@ -250,7 +231,7 @@ for i in ipairs(mats) do }) end -minetest.register_node("homedecor:window_flowerbox", { +homedecor.register("window_flowerbox", { description = "Window flowerbow", tiles = { "homedecor_flowerbox_top.png", @@ -258,9 +239,6 @@ minetest.register_node("homedecor:window_flowerbox", { "homedecor_flowerbox_sides.png" }, inventory_image = "homedecor_flowerbox_inv.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", groups = { snappy = 3 }, node_box = { type = "fixed",