diff --git a/patches/mods-WIP-nonworking/homedecor_ua/LICENSE b/patches/mods-WIP-nonworking/homedecor_ua/LICENSE
new file mode 100644
index 0000000..62eb1a4
--- /dev/null
+++ b/patches/mods-WIP-nonworking/homedecor_ua/LICENSE
@@ -0,0 +1,189 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
+===============================================================================
+
+This work is licensed under the Creative Commons Attribution-ShareAlike
+4.0 International License. To view a copy of this license, visit
+http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
+Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+
+===============================================================================
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
diff --git a/patches/mods-WIP-nonworking/homedecor_ua/README.txt b/patches/mods-WIP-nonworking/homedecor_ua/README.txt
index 25697f6..cfa4a42 100644
--- a/patches/mods-WIP-nonworking/homedecor_ua/README.txt
+++ b/patches/mods-WIP-nonworking/homedecor_ua/README.txt
@@ -1,3 +1,8 @@
Minetest Game mod: homedecor_ua
===============================
-This mod provides a patch from adult beverages to non-adult beverages for multiplayer servers such as those with underage players.
\ No newline at end of file
+This mod provides a patch from adult beverages to non-adult beverages for multiplayer servers such as those with underage players.
+
+Uses modified code and modified textures from VenessaE's homedecor from homedecor_modpack
+Licenses:
+* For the lua code, LGPL.
+* Images: see https://github.com/minetest-mods/homedecor_modpack/blob/master/homedecor/copyright.txt
\ No newline at end of file
diff --git a/patches/mods-WIP-nonworking/homedecor_ua/handlers/init.lua b/patches/mods-WIP-nonworking/homedecor_ua/handlers/init.lua
new file mode 100644
index 0000000..03961e3
--- /dev/null
+++ b/patches/mods-WIP-nonworking/homedecor_ua/handlers/init.lua
@@ -0,0 +1,25 @@
+-- local handlerpath = homedecor_ua.modpath .. "/handlers/"
+
+-- nodebox arithmetics and helpers
+-- (please keep non-generic nodeboxes with their node definition)
+-- dofile(handlerpath.."nodeboxes.lua")
+
+-- expand and unexpand decor
+-- dofile(handlerpath.."expansion.lua")
+
+-- register nodes that cook stuff
+-- dofile(handlerpath.."furnaces.lua")
+
+-- inventory related functionality, like initialization, ownership and spawning locked versions
+-- dofile(handlerpath.."inventory.lua")
+
+-- glue it all together into a registration function
+-- dofile(handlerpath.."registration.lua")
+dofile(minetest.get_modpath("homedecor_ua").."/handlers/registration.lua")
+
+-- some nodes have particle spawners
+-- dofile(handlerpath.."water_particles.lua")
+
+
+-- dofile(handlerpath.."mt_game_beds_functions.lua")
+-- dofile(handlerpath.."sit.lua")
diff --git a/patches/mods-WIP-nonworking/homedecor_ua/handlers/registration.lua b/patches/mods-WIP-nonworking/homedecor_ua/handlers/registration.lua
new file mode 100644
index 0000000..ac66d1f
--- /dev/null
+++ b/patches/mods-WIP-nonworking/homedecor_ua/handlers/registration.lua
@@ -0,0 +1,95 @@
+homedecor = homedecor or {}
+homedecor_ua = homedecor_ua or {}
+local placeholder_node = "homedecor:expansion_placeholder"
+
+--wrapper around minetest.register_node that sets sane defaults and interprets some specialized settings
+function homedecor_ua.register(name, original_def)
+ local def = table.copy(original_def)
+
+ def.drawtype = def.drawtype
+ or (def.mesh and "mesh")
+ or (def.node_box and "nodebox")
+
+ def.paramtype = def.paramtype or "light"
+
+ -- avoid facedir for some drawtypes as they might be used internally for something else
+ -- even if undocumented
+ if not (def.drawtype == "glasslike_framed"
+ or def.drawtype == "raillike"
+ or def.drawtype == "plantlike"
+ or def.drawtype == "firelike") then
+
+ def.paramtype2 = def.paramtype2 or "facedir"
+ end
+
+ homedecor.handle_inventory(name, def, original_def)
+
+ local infotext = def.infotext
+ --def.infotext = nil -- currently used to set locked refrigerator infotexts
+
+ if infotext then
+ local on_construct = def.on_construct
+ def.on_construct = function(pos)
+ local meta = minetest.get_meta(pos)
+ meta:set_string("infotext", infotext)
+ if on_construct then on_construct(pos) end
+ end
+ end
+
+ local expand = def.expand
+ def.expand = nil
+ local after_unexpand = def.after_unexpand
+ def.after_unexpand = nil
+
+ if expand then
+ -- dissallow rotating only half the expanded node by default
+ -- unless we know better
+ def.on_rotate = def.on_rotate
+ or (def.mesh and expand.top and screwdriver.rotate_simple)
+ or screwdriver.disallow
+
+ def.on_place = def.on_place or function(itemstack, placer, pointed_thing)
+ if expand.top then
+ return homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), expand.top)
+ elseif expand.right then
+ return homedecor.stack_sideways(itemstack, placer, pointed_thing, itemstack:get_name(), expand.right, true)
+ elseif expand.forward then
+ return homedecor.stack_sideways(itemstack, placer, pointed_thing, itemstack:get_name(), expand.forward, false)
+ end
+ end
+ def.after_dig_node = def.after_dig_node or function(pos, oldnode, oldmetadata, digger)
+ if expand.top and expand.forward ~= "air" then
+ local top_pos = { x=pos.x, y=pos.y+1, z=pos.z }
+ local node = minetest.get_node(top_pos).name
+ if node == expand.top or node == placeholder_node then
+ minetest.remove_node(top_pos)
+ end
+ end
+
+ local fdir = oldnode.param2
+ if not fdir or fdir > 3 then return end
+
+ if expand.right and expand.forward ~= "air" then
+ local right_pos = { x=pos.x+homedecor.fdir_to_right[fdir+1][1], y=pos.y, z=pos.z+homedecor.fdir_to_right[fdir+1][2] }
+ local node = minetest.get_node(right_pos).name
+ if node == expand.right or node == placeholder_node then
+ minetest.remove_node(right_pos)
+ end
+ end
+ if expand.forward and expand.forward ~= "air" then
+ local forward_pos = { x=pos.x+homedecor.fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+homedecor.fdir_to_fwd[fdir+1][2] }
+ local node = minetest.get_node(forward_pos).name
+ if node == expand.forward or node == placeholder_node then
+ minetest.remove_node(forward_pos)
+ end
+ end
+
+ if after_unexpand then
+ after_unexpand(pos)
+ end
+ end
+ end
+
+ -- register the actual minetest node
+ minetest.register_node("homedecor_ua:" .. name, def)
+end
diff --git a/patches/mods-WIP-nonworking/homedecor_ua/init.lua b/patches/mods-WIP-nonworking/homedecor_ua/init.lua
index 09ef4de..3f90d9e 100644
--- a/patches/mods-WIP-nonworking/homedecor_ua/init.lua
+++ b/patches/mods-WIP-nonworking/homedecor_ua/init.lua
@@ -1,3 +1,9 @@
+local modpath = minetest.get_modpath("homedecor_ua")
+homedecor_ua = {}
+dofile(modpath.."/handlers/init.lua")
+
+local S = homedecor_i18n.gettext
+local wine_cbox = homedecor.nodebox.slab_z(-0.75)
minetest.clear_craft({
output = "homedecor:wine_rack",
})
@@ -5,12 +11,96 @@ minetest.clear_craft({
output = "homedecor:beer_tap",
})
-minetest.register_alias("homedecor:beer_tap", "homedecor:coffee_maker")
-minetest.register_alias("homedecor:wine_rack", "homedecor:coffee_maker")
--- NOTE: tap transforms vessels:drinking_glass into item below:
-minetest.register_alias("homedecor:beer_mug", "vessels:drinking_glass")
---[[
-minetest.register_craft({
+
+-- minetest.register_alias("homedecor:beer_tap", "homedecor:coffee_maker")
+-- minetest.register_alias("homedecor:wine_rack", "homedecor:coffee_maker")
+-- NOTE: tap transforms vessels:drinking_glass into item below (on right-click):
+-- minetest.register_alias("homedecor:beer_mug", "vessels:drinking_glass")
+homedecor_ua.register("drink_rack", {
+ description = S("Drink rack"),
+ mesh = "homedecor_wine_rack.obj",
+ tiles = {
+ "homedecor_generic_wood_red.png",
+ "homedecor_bottle_brown.png",
+ "homedecor_bottle_brown2.png",
+ "homedecor_bottle_brown3.png",
+ "homedecor_bottle_brown4.png"
+ },
+ inventory_image = "homedecor_wine_rack_inv.png",
+ groups = {choppy=2},
+ selection_box = wine_cbox,
+ collision_box = wine_cbox,
+ sounds = default.node_sound_defaults(),
+})
+minetest.register_alias("homedecor:wine_rack", "homedecor_ua:drink_rack")
+
+homedecor_ua.register("drink_tap", {
+ description = S("drink tap"),
+ mesh = "homedecor_beer_taps.obj",
+ tiles = {
+ "homedecor_generic_metal_bright.png",
+ { name = "homedecor_generic_metal.png", color = homedecor.color_black }
+ },
+ inventory_image = "homedecor_beertap_inv.png",
+ groups = { snappy=3 },
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.4375, 0.25, 0.235, 0 }
+ },
+ on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
+ local inv = clicker:get_inventory()
+
+ local wieldname = itemstack:get_name()
+ if wieldname == "vessels:drinking_glass" then
+ if inv:room_for_item("main", "homedecor:drink_mug 1") then
+ itemstack:take_item()
+ clicker:set_wielded_item(itemstack)
+ inv:add_item("main", "homedecor:drink_mug 1")
+ minetest.chat_send_player(clicker:get_player_name(),
+ S("Ahh, a nice cold drink - look in your inventory for it!"))
+ else
+ minetest.chat_send_player(clicker:get_player_name(),
+ S("No room in your inventory to add a drink mug!"))
+ end
+ end
+ end
+})
+minetest.register_alias("homedecor:beer_tap", "homedecor_ua:drink_tap")
+
+
+homedecor_ua.register("drink_mug", {
+ description = S("Drink mug"),
+ drawtype = "mesh",
+ mesh = "homedecor_beer_mug.obj",
+ tiles = { "homedecor_ua_drink_mug.png" },
+ inventory_image = "homedecor_ua_drink_mug_inv.png",
+ groups = { snappy=3, oddly_breakable_by_hand=3 },
+ walkable = false,
+ sounds = default.node_sound_glass_defaults(),
+ selection_box = beer_cbox,
+ on_use = function(itemstack, user, pointed_thing)
+ local inv = user:get_inventory()
+ if not creative.is_enabled_for(user:get_player_name()) then
+ if inv:room_for_item("main", "vessels:drinking_glass 1") then
+ inv:add_item("main", "vessels:drinking_glass 1")
+ else
+ local pos = user:get_pos()
+ local dir = user:get_look_dir()
+ local fdir = minetest.dir_to_facedir(dir)
+ local pos_fwd = { x = pos.x + homedecor.fdir_to_fwd[fdir+1][1],
+ y = pos.y + 1,
+ z = pos.z + homedecor.fdir_to_fwd[fdir+1][2] }
+ minetest.add_item(pos_fwd, "vessels:drinking_glass 1")
+ end
+ minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
+ return itemstack
+ end
+ end
+})
+minetest.register_alias("homedecor:beer_mug", "homedecor_ua:drink_mug")
+
+--[[minetest.register_craft({
output = "homedecor:drink_rack",
recipe = {
{ "homedecor:4_bottles_brown", "group:wood", "homedecor:4_bottles_brown" },
diff --git a/patches/mods-WIP-nonworking/homedecor_ua/textures/homedecor_ua_drink_mug.png b/patches/mods-WIP-nonworking/homedecor_ua/textures/homedecor_ua_drink_mug.png
new file mode 100644
index 0000000..0b4b20a
Binary files /dev/null and b/patches/mods-WIP-nonworking/homedecor_ua/textures/homedecor_ua_drink_mug.png differ
diff --git a/patches/mods-WIP-nonworking/homedecor_ua/textures/homedecor_ua_drink_mug_inv.png b/patches/mods-WIP-nonworking/homedecor_ua/textures/homedecor_ua_drink_mug_inv.png
new file mode 100644
index 0000000..5acdb1f
Binary files /dev/null and b/patches/mods-WIP-nonworking/homedecor_ua/textures/homedecor_ua_drink_mug_inv.png differ