From f3d9fd1e8114a9508961478c61aa1f5dcc02cdf2 Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Mon, 11 Apr 2022 00:12:01 -0400 Subject: [PATCH] add hd laundry --- homedecor_laundry/.luacheckrc | 19 ------ homedecor_laundry/init.lua | 107 ++++++++++++++++------------------ homedecor_laundry/mod.conf | 2 +- 3 files changed, 51 insertions(+), 77 deletions(-) delete mode 100644 homedecor_laundry/.luacheckrc diff --git a/homedecor_laundry/.luacheckrc b/homedecor_laundry/.luacheckrc deleted file mode 100644 index 744a1127..00000000 --- a/homedecor_laundry/.luacheckrc +++ /dev/null @@ -1,19 +0,0 @@ -unused_args = false -allow_defined_top = true -max_comment_line_length = 999 - -read_globals = { - "DIR_DELIM", - "minetest", "core", - "unpack", - "dump", - table = { fields = { "copy", "getn" } }, - "vector", "nodeupdate", - "VoxelManip", "VoxelArea", - "PseudoRandom", "ItemStack", - "homedecor", -} - -globals = { -} - diff --git a/homedecor_laundry/init.lua b/homedecor_laundry/init.lua index 516331f7..084bce11 100644 --- a/homedecor_laundry/init.lua +++ b/homedecor_laundry/init.lua @@ -19,7 +19,23 @@ homedecor.register("washing_machine", { } }, selection_box = { type = "regular" }, - groups = { snappy = 3 }, + groups = { snappy = 3, dig_stone=3 }, + crafts = { + { + recipe = { + { "steel_ingot", "steel_ingot", "basic_materials:ic" }, + { "steel_ingot", "water_bucket", "steel_ingot" }, + { "steel_ingot", "basic_materials:motor", "steel_ingot" } + }, + }, + { + recipe = { + { "steel_ingot", "steel_ingot", "basic_materials:ic" }, + { "steel_ingot", "water_bucket", "steel_ingot" }, + { "steel_ingot", "basic_materials:motor", "steel_ingot" } + }, + } + } }) homedecor.register("dryer", { @@ -40,7 +56,23 @@ homedecor.register("dryer", { } }, selection_box = { type = "regular" }, - groups = { snappy = 3 }, + groups = { snappy = 3, dig_stone=3 }, + crafts = { + { + recipe = { + { "steel_ingot", "steel_ingot", "basic_materials:ic" }, + { "steel_ingot", "empty_bucket", "basic_materials:motor" }, + { "steel_ingot", "basic_materials:heating_element", "steel_ingot" } + }, + }, + { + recipe = { + { "steel_ingot", "steel_ingot", "basic_materials:ic" }, + { "steel_ingot", "empty_bucket", "basic_materials:motor" }, + { "steel_ingot", "basic_materials:heating_element", "steel_ingot" } + }, + } + } }) local ib_cbox = { @@ -48,66 +80,27 @@ local ib_cbox = { fixed = { -6/16, -8/16, -4/16, 17/16, 4/16, 4/16 } } +local wool_tex = "wool_grey.png" +if not minetest.get_modpath("wool") then wool_tex = "[combine:16x16^[noalpha^[colorize:#3A3B3C" end + homedecor.register("ironing_board", { description = S("Ironing board"), mesh = "homedecor_ironing_board.obj", tiles = { - "wool_grey.png", + wool_tex, { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }, }, expand = {right = "placeholder"}, - groups = { snappy = 3 }, + groups = { snappy = 3, dig_stone=3 }, selection_box = ib_cbox, - collision_box = ib_cbox -}) - --- crafting - - --- laundry stuff - -minetest.register_craft( { - output = "homedecor:washing_machine", - recipe = { - { "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" }, - { "default:steel_ingot", "bucket:bucket_water", "default:steel_ingot" }, - { "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" } - }, -}) - -minetest.register_craft( { - output = "homedecor:washing_machine", - recipe = { - { "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" }, - { "default:steel_ingot", "bucket:bucket_water", "default:steel_ingot" }, - { "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" } - }, -}) - -minetest.register_craft( { - output = "homedecor:dryer", - recipe = { - { "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" }, - { "default:steel_ingot", "bucket:bucket_empty", "basic_materials:motor" }, - { "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" } - }, -}) - -minetest.register_craft( { - output = "homedecor:dryer", - recipe = { - { "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" }, - { "default:steel_ingot", "bucket:bucket_empty", "basic_materials:motor" }, - { "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" } - }, -}) - -minetest.register_craft( { - output = "homedecor:ironing_board", - recipe = { - { "wool:grey", "wool:grey", "wool:grey"}, - { "", "default:steel_ingot", "" }, - { "default:steel_ingot", "", "default:steel_ingot" } - }, -}) - + collision_box = ib_cbox, + crafts = { + { + recipe = { + { "wool_grey", "wool_grey", "wool_grey"}, + { "", "steel_ingot", "" }, + { "steel_ingot", "", "steel_ingot" } + }, + } + } +}) \ No newline at end of file diff --git a/homedecor_laundry/mod.conf b/homedecor_laundry/mod.conf index b35c5e1f..fc58b248 100644 --- a/homedecor_laundry/mod.conf +++ b/homedecor_laundry/mod.conf @@ -1,4 +1,4 @@ name = homedecor_laundry description = Homedecor mod: laundry -depends = homedecor_common, default, basic_materials +depends = homedecor_common optional_depends = bucket