From 818eabb92fe8646db505fe985d16e65c9df1b761 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 12 Sep 2018 20:35:41 -0400 Subject: update blox, coloredwood, farming, homedecor, unified bricks, unified dyes, and Jordach's skin --- homedecor/crafts.lua | 13 ++++++++ homedecor/handlers/expansion.lua | 4 ++- homedecor/misc-nodes.lua | 33 ++++++++++++++++----- .../homedecor_banister_wood_colored_inv.png | Bin 0 -> 2491 bytes 4 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 homedecor/textures/homedecor_banister_wood_colored_inv.png (limited to 'homedecor') diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index a139063..f9edb53 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -3273,6 +3273,19 @@ for i in ipairs(homedecor.banister_materials) do }) end +unifieddyes.register_color_craft({ + output = "", + palette = "split", + neutral_node = "homedecor:banister_wood_horizontal", + type = "shapeless", + output_prefix = "homedecor:banister_wood_horizontal_", + output_suffix = "", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE", + } +}) + if (minetest.get_modpath("technic") and minetest.get_modpath("dye") and minetest.get_modpath("bees")) then technic.register_separating_recipe({ input = {"bees:wax 1"}, output = {"homedecor:oil_extract 2","dye:yellow 1"} }) end diff --git a/homedecor/handlers/expansion.lua b/homedecor/handlers/expansion.lua index 779e077..bd87e90 100644 --- a/homedecor/handlers/expansion.lua +++ b/homedecor/handlers/expansion.lua @@ -257,6 +257,8 @@ function homedecor.place_banister(itemstack, placer, pointed_thing) if not pos then return itemstack end local fdir = minetest.dir_to_facedir(placer:get_look_dir()) + local meta = itemstack:get_meta() + local pindex = meta:get_int("palette_index") local abovepos = { x=pos.x, y=pos.y+1, z=pos.z } local abovenode = minetest.get_node(abovepos) @@ -371,7 +373,7 @@ function homedecor.place_banister(itemstack, placer, pointed_thing) end end - minetest.set_node(pos, {name = new_place_name, param2 = fdir}) + minetest.set_node(pos, {name = new_place_name, param2 = fdir+pindex}) itemstack:take_item() return itemstack end diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index 72830d5..4d52e56 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.lua @@ -483,23 +483,19 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do local name, matdesc, tile1, tile2 = unpack(mat) local nodename = "banister_"..name.."_"..side - local groups = { snappy = 3, not_in_creative_inventory = 1 } local cbox = { type = "fixed", fixed = { -9/16, -3/16, 5/16, 9/16, 24/16, 8/16 } } if side == "horizontal" then - groups = { snappy = 3 } cbox = { type = "fixed", fixed = { -8/16, -8/16, 5/16, 8/16, 8/16, 8/16 } } - else - minetest.register_alias(string.gsub("homedecor:"..nodename, "diagonal_", ""), "homedecor:"..nodename) end - homedecor.register(nodename, { + local def = { description = S("Banister for Stairs (@1, @2)", matdesc, sidedesc), mesh = "homedecor_banister_"..side..".obj", tiles = { @@ -507,12 +503,35 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do tile2, }, inventory_image = "homedecor_banister_"..name.."_inv.png", - groups = groups, selection_box = cbox, collision_box = cbox, + groups = { snappy = 3}, on_place = homedecor.place_banister, drop = "homedecor:banister_"..name.."_horizontal", - }) + } + + if side ~= "horizontal" then + def.groups.not_in_creative_inventory = 1 + end + + if name == "wood" then + def.airbrush_replacement_node = "homedecor:banister_wood_"..side.."_grey" + def.groups.ud_param2_colorable = 1 + def.paramtype2 = "colorfacedir" + end + homedecor.register(nodename, def) + + if name == "wood" then + local nn = "homedecor:"..nodename + local def2 = table.copy(minetest.registered_items[nn]) + def2.tiles = { + homedecor.white_wood, + homedecor.white_wood + } + def2.inventory_image = "homedecor_banister_wood_colored_inv.png" + + unifieddyes.generate_split_palette_nodes(nn, def2, "homedecor:banister_"..name.."_horizontal") + end end end diff --git a/homedecor/textures/homedecor_banister_wood_colored_inv.png b/homedecor/textures/homedecor_banister_wood_colored_inv.png new file mode 100644 index 0000000..5c1a7ee Binary files /dev/null and b/homedecor/textures/homedecor_banister_wood_colored_inv.png differ -- cgit v1.2.3