diff --git a/.luacheckrc b/.luacheckrc index e598014c..5dd6e28b 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -38,4 +38,5 @@ read_globals = { "stairsplus", "creative", "doors", + "i3", } \ No newline at end of file diff --git a/homedecor_common/materials.lua b/homedecor_common/materials.lua index 60a728d0..8809fc68 100644 --- a/homedecor_common/materials.lua +++ b/homedecor_common/materials.lua @@ -20,6 +20,11 @@ homedecor.materials = { dye_yellow = "dye:yellow", dye_brown = "dye:brown", dye_blue = "dye:blue", + dye_violet = "dye:violet", + dye_grey = "dye:grey", + dye_dark_green = "dye:dark_green", + dye_orange = "dye:orange", + dye_pink = "dye:pink", silicon = "mesecons_materials:silicon", string = "farming:string", paper = "default:paper", @@ -30,6 +35,7 @@ homedecor.materials = { wool_dark_green = "wool:dark_green", wool_brown = "wool:brown", wool_black = "wool:black", + wool_white = "wool:white", slab_stone = "stairs:slab_stone", slab_wood = "stairs:slab_wood", glass_block = "default_glass", @@ -81,6 +87,11 @@ elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then dye_yellow = "fl_dyes:yellow_dye", dye_brown = "fl_dyes:brown_dye", dye_blue = "fl_dyes:blue_dye", + dye_violet = "fl_dyes:violet_dye", + dye_grey = "fl_dyes:grey_dye", + dye_dark_green = "fl_dyes:dark_green_dye", + dye_orange = "fl_dyes:orange_dye", + dye_pink = "fl_dyes:pink_dye", copper_ingot = "fl_ores:copper_ingot", tin_ingot = "fl_ores:tin_ingot", silver_ingot = "fl_ores:iron_ingot", @@ -88,6 +99,12 @@ elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then string = "fl_plantlife:oxeye_daisy", paper = "basic_materials:plastic_sheet", iron_lump = "fl_ores:iron_ore", + wool_grey = "", + wool_green = "", + wool_dark_green = "", + wool_brown = "", + wool_black = "", + wool_white = "", slab_stone = "fl_stone:stone_slab", slab_wood = "fl_trees:apple_plank_slab", glass_block = "fl_glass:framed_glass", diff --git a/homedecor_common/mod.conf b/homedecor_common/mod.conf index 0a0f5fdc..330fee77 100644 --- a/homedecor_common/mod.conf +++ b/homedecor_common/mod.conf @@ -1,4 +1,4 @@ name = homedecor_common description = Homedecor mod: common depends = basic_materials -optional_depends = screwdriver, hopper, default, creative, sound_api, fl_stone, fl_mapgen +optional_depends = screwdriver, hopper, default, creative, sound_api, fl_stone, fl_mapgen, i3 diff --git a/homedecor_pictures_and_paintings/.luacheckrc b/homedecor_pictures_and_paintings/.luacheckrc deleted file mode 100644 index 4f0848c8..00000000 --- a/homedecor_pictures_and_paintings/.luacheckrc +++ /dev/null @@ -1,20 +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", - "default", - "homedecor", -} - -globals = { -} - diff --git a/homedecor_pictures_and_paintings/init.lua b/homedecor_pictures_and_paintings/init.lua index 695bf566..ed03a7ca 100644 --- a/homedecor_pictures_and_paintings/init.lua +++ b/homedecor_pictures_and_paintings/init.lua @@ -1,5 +1,12 @@ local S = minetest.get_translator("homedecor_pictures_and_paintings") +local wood_tex +if minetest.get_modpath("default") then + wood_tex = "default_wood.png" +else + wood_tex = "[combine:16x16^[noalpha^[colorize:#563d2d" +end + local pframe_cbox = { type = "fixed", fixed = { -0.18, -0.5, -0.08, 0.18, -0.08, 0.18 } @@ -17,10 +24,12 @@ for _, i in ipairs(n) do }, inventory_image = "homedecor_picture_frame"..i.."_inv.png", wield_image = "homedecor_picture_frame"..i.."_inv.png", - groups = {snappy = 3}, + groups = {snappy = 3, dig_tree = 3}, selection_box = pframe_cbox, walkable = false, - sounds = default.node_sound_glass_defaults() + _sound_def = { + key = "node_sound_glass_defaults", + }, }) end @@ -36,14 +45,16 @@ for i = 1,20 do description = S("Decorative painting #@1", i), mesh = "homedecor_painting.obj", tiles = { - "default_wood.png", + wood_tex, "homedecor_blank_canvas.png", "homedecor_painting"..i..".png" }, selection_box = p_cbox, walkable = false, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + groups = {snappy=3, dig_tree = 3}, + _sound_def = { + key = "node_sound_wood_defaults", + }, }) end @@ -60,7 +71,7 @@ minetest.register_craft({ output = "homedecor:blank_canvas", recipe = { { "", "group:stick", "" }, - { "group:stick", "wool:white", "group:stick" }, + { "group:stick", homedecor.materials["wool_white"], "group:stick" }, { "", "group:stick", "" }, } }) @@ -129,12 +140,12 @@ local painting_patterns = { for i,recipe in pairs(painting_patterns) do - local item1 = "dye:"..recipe[1][1] - local item2 = "dye:"..recipe[1][2] - local item3 = "dye:"..recipe[1][3] - local item4 = "dye:"..recipe[2][1] - local item5 = "dye:"..recipe[2][2] - local item6 = "dye:"..recipe[2][3] + local item1 = homedecor.materials["dye_"..recipe[1][1]] + local item2 = homedecor.materials["dye_"..recipe[1][2]] + local item3 = homedecor.materials["dye_"..recipe[1][3]] + local item4 = homedecor.materials["dye_"..recipe[2][1]] + local item5 = homedecor.materials["dye_"..recipe[2][2]] + local item6 = homedecor.materials["dye_"..recipe[2][3]] minetest.register_craft({ output = "homedecor:painting_"..i, @@ -147,16 +158,28 @@ for i,recipe in pairs(painting_patterns) do end local picture_dyes = { - {"dye:brown", "dye:green"}, -- the figure sitting by the tree, wielding a pick - {"dye:green", "dye:blue"} -- the "family photo" + {"dye_brown", "dye_green"}, -- the figure sitting by the tree, wielding a pick + {"dye_green", "dye_blue"} -- the "family photo" } for i in ipairs(picture_dyes) do minetest.register_craft({ output = "homedecor:picture_frame"..i, recipe = { - { picture_dyes[i][1], picture_dyes[i][2] }, + { homedecor.materials[picture_dyes[i][1]], homedecor.materials[picture_dyes[i][2]] }, { "homedecor:blank_canvas", "group:stick" }, }, }) end + +local numbers = {} +for i = 2,20 do + table.insert(numbers, i) +end + +if minetest.get_modpath("i3") then + i3.compress("homedecor:painting_1", { + replace = "1", + by = numbers + }) +end diff --git a/homedecor_pictures_and_paintings/mod.conf b/homedecor_pictures_and_paintings/mod.conf index 2041ba83..6f6a7644 100644 --- a/homedecor_pictures_and_paintings/mod.conf +++ b/homedecor_pictures_and_paintings/mod.conf @@ -1,3 +1,3 @@ name = homedecor_pictures_and_paintings description = Homedecor mod: pictures and paintings -depends = homedecor_common, default, dye +depends = homedecor_common