initial commit
subgame + mods
165
mods/homedecor_modpack/homedecor/LICENSE
Normal file
@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
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.
|
229
mods/homedecor_modpack/homedecor/changelog.txt
Normal file
@ -0,0 +1,229 @@
|
||||
Changelog
|
||||
---------
|
||||
|
||||
2013-03-16: Kaeza pushed fixes for signs on wrought iron/brass fences not
|
||||
showing the text. This also fixed a potential undesired replacement bug. He
|
||||
also fixed many of the sounds in the mod so that they aren't based on leaves.
|
||||
:-)
|
||||
|
||||
2013-03-11: Kaeza merged in code from my fork of thexyz/PilzAdam's
|
||||
3d/visible-text signs mods and fixed some bugs in my signs-on-fenceposts code
|
||||
in homedecor. If you have any of those three versions of the signs mod,
|
||||
uninstall it. Homedecor will cover its functionality. Thanks to kaeza for the
|
||||
contribution! Also, now signs-on-fences work slightly differently than before
|
||||
when digging - dig to get the sign back from the post, then dig the remaining
|
||||
post to get that back as well.
|
||||
|
||||
2013-02-13: changed glowlight recipes to avoid conflicts with moreblocks (now
|
||||
uses moreblocks glowglass *and* super glowglass together), made IC rely on
|
||||
moreores copper ingot, added recipes to craft glow cubes back into glowlight
|
||||
slabs. See crafting guide for details.
|
||||
|
||||
2012-02-09: Add ability to place a sign directly onto a brass/wrought iron
|
||||
fencepost, rather than crafting a sign-on-fencepost from one of each. Place a
|
||||
brass or wrought iron fencepost, then attempt to place a sign against it.
|
||||
Instead of the sign floating in air, the fencepost will be replaced with one
|
||||
bearing the sign in the same node. Dig to get the two pieces back as separate
|
||||
items, right click the resultant sign to edit the text thereon.
|
||||
|
||||
2012-02-08: Added ability to add signs to brass/wrought iron fenceposts.
|
||||
|
||||
2013-01-23: Completely rewrote all doors code to condense them into two files -
|
||||
one with the nodebox models, and one with the actual node definitions. In the
|
||||
process, cleaned up the code that handles node_ownership and protection mods.
|
||||
Also made the mod automatically enable either left-click or right-click to
|
||||
open/close a door, depending on whether the game supports it (actually it
|
||||
checks for the existance of an unrelated function that happened to be added the
|
||||
same time as the new right-click function). Renamed some textures, duplicated
|
||||
all of the _lr.png textures to make it easier to register the textures in a
|
||||
loop and to allow for more flexible texturing.
|
||||
|
||||
2012-10-11 (late night): Minor update - fixed a recipe conflict with throwing
|
||||
mod. Unprocessed plastic, when made from jungle grass or dry shrubs, now
|
||||
requires three jungle grass (yields 6) or three dry shrubs (yields 3). Still
|
||||
works with 6 leaves also. Extended the above owned-node support to work with
|
||||
glomie's "protector" mod since it has a similar bug as node_ownership has.
|
||||
|
||||
All server Admins: If you have Home Decor and you use either node_ownership
|
||||
or protector (or both), please update your copy of Home Decor as soon as
|
||||
practical.
|
||||
|
||||
2012-10-09: Added code to all doors to check for the presence of node_ownership
|
||||
and adapt accordingly. If that mod is present, you can only place doors in
|
||||
land you own, or land you have been given permission by the owner to build in,
|
||||
or land that is not owned at all. Singleplayer mode still works the same as
|
||||
before. Works around a bug in node_ownership where it doesn't completely
|
||||
handle the on_place= construct in register_node(), causing it to only delete
|
||||
half of an illegally-placed door.
|
||||
|
||||
2012-10-05: Added titanium dioxide and white paint from Unified Dyes as
|
||||
alternates if that mod isn't present. Both are compatible/interchangeable with
|
||||
the ones from that mod. Uses the same crafting recipes as UD uses, plus a
|
||||
couple of alternates in case of materials shortages. Added white and mahogany
|
||||
variants of the aforementioned grid-style glass-and-wood door.
|
||||
|
||||
2012-10-04: Added a couple new types of doors, converted the others to
|
||||
nodeboxes. All door code has been rewritten mostly from scratch. These new
|
||||
doors should convert over just fine, or at least you won't lose anything. You
|
||||
may have to dig and re-place a few if their orientation is wrong. Also note
|
||||
that these always return the left-opening version when you dig one.
|
||||
|
||||
2012-10-03: Refrigerators are now two nodes tall and have a 10x5 inventory
|
||||
space. If you have two stacked up already before this update, you'll need to
|
||||
empty them, dig them, and then re-place one or both, and put their contents
|
||||
back in. Sorry about the inconvenience, the one-node-tall ones were only
|
||||
supposed to be temporary anyway. Besides, now one stores more than twice as
|
||||
much as before. :-) The associated crafting recipe yields only one now, in
|
||||
keeping with this change.
|
||||
|
||||
2012-10-01: Added white glowlights, changed nodenames for yellow glowlights to
|
||||
indicate that they're supposed to be yellow (you'll need to destroy and
|
||||
re-craft them, sorry).
|
||||
|
||||
2012-09-30: Added a few different kinds of fences - bare/unpainted wooden and
|
||||
classic white picket fences, chainlink, barbed wire, and wooden privacy fence
|
||||
(e.g to put around a backyard pool).
|
||||
|
||||
Also added gates that open/close on a click, for the picket fences, chainlink
|
||||
fence, and barbed wire fence. For the privacy fence, use a regular door if you
|
||||
need a gate.
|
||||
|
||||
2012-09-30: Big set of updates today to make the mod a little easier to use in
|
||||
places and to add some more nodes. Recipe changes: Brass and wrought iron
|
||||
poles, table legs, and fences/railings were too expensive in practice.
|
||||
Increased recipe outputs. Small square glass table now comes from one small
|
||||
round table (instead of three-to-two). Large square glass table comes from one
|
||||
small square now instead of two. Small round, small square, and large wooden
|
||||
tables follow the same pattern.
|
||||
|
||||
Recycling: All glass tables can be recycled back into glass blocks via the
|
||||
Vessels mod's recipes. All are 3:1 with glass fragments (and thus, 3:1 with
|
||||
glass blocks), so there's no glass wasted. All wooden tables can be crafted
|
||||
into sticks by putting three of a given item onto the crafting grid. Any
|
||||
such craft yields 4 sticks, so there's no waste. Glass skylights recycle
|
||||
3:1 also, which does result in a little waste.
|
||||
|
||||
New nodes:
|
||||
|
||||
Added working oven (really just a furnace with new textures/recipe)
|
||||
Added mini-fridge that stores 24 slots
|
||||
Added kitchen cabinet that stores 24 slots
|
||||
Added half-size kitchen cabinet that stores 12 slots (6x2)
|
||||
Added kitchen sink with under-sink cabinet that stores 16 slots
|
||||
Added slab-sized, half-slab-sized, and microblock-sized glowlights (e.g.
|
||||
ceiling fixtures and yard/sidewalk lighting)
|
||||
Added curtains in 6 colors: red, green, blue, purple, pink, white
|
||||
|
||||
Misc. changes: 3d-ified nightstands (e.g. nodeboxes), improved their
|
||||
textures somewhat. Got rid of the dressers - they were never brought to a
|
||||
working state, but they're obsolete now (stacked two-drawer nightstands look
|
||||
the same anyway).
|
||||
|
||||
Notes about this update: This mod now requires Moreblocks for some recipes -
|
||||
namely fridge and oven, and uses the Vessels mod's recycle crafts.
|
||||
|
||||
2012-09-27: Changed most uses of dyes so that they can come from the game's
|
||||
in-built groups-based dye system, where appropriate. Unified Dyes can still
|
||||
supply the colors, this just makes it possible to use any other dye system that
|
||||
might come about as long as it uses the groups method. Improved recipe outputs
|
||||
for all shutters and mahogany folding door (better ratios of objects to
|
||||
colorants).
|
||||
|
||||
Added intermediate "unprocessed plastic" step to get from materials to
|
||||
plastic sheeting (now craft some materials to get unprocessed plastic, then
|
||||
smelt that to get the sheeting), added alternate recipes to produce it,
|
||||
improved ratio of materials to plastic. Minor code cleanups.
|
||||
|
||||
Later in the day: Nightstands now offer small inventories - one-drawer units
|
||||
get 8 slots, while two-drawer nightstands get 16 slots (8x2). They're
|
||||
smaller than chests because they're cheaper to make. Note that if you have
|
||||
nightstands already placed, dig them up and place them again to enable their
|
||||
new inventory capabilities.
|
||||
|
||||
2012-09-25: Added alternate recipes for most items that use dyes. Removed
|
||||
Mesecons dependency from TV and stereo (uses in-built silicon lumps if Mesecons
|
||||
isn't present). Replaced speakers' Mesecons Noteblocks with copper ingots from
|
||||
Moreores.
|
||||
|
||||
2012-08-01: Added optional recipes for items that use wool to also use cotton
|
||||
instead. Choose one or the other in any given recipe (you can't mix the two).
|
||||
No, it isn't a Kosher thing. ;-)
|
||||
|
||||
2012-07-28: Noticed I technically had left/right textures swapped on a few
|
||||
blocks. The textures were drawn to counteract this, without my realizing I was
|
||||
doing just that. :-) Fixed. Also replaced all "tile_images" references with
|
||||
"tiles", since the former is deprecated in favor of the latter.
|
||||
|
||||
2012-07-26: Updated to use the Vessels mod to give back empty dye bottles.
|
||||
|
||||
2012-07-24: Made all objects that use a dye require a more appropriate color,
|
||||
made all objects that use a dye give back empty bottles on craft, made grey
|
||||
shutters use the various grey paints directly. Moved this changelog out of the
|
||||
forum post and into this separate file.
|
||||
|
||||
2012-07-12: Moved project to github.
|
||||
|
||||
2012-07-02: Deleted a few redundant files from the unified dyes mod.
|
||||
|
||||
2012-06-30: Added a fancy wood-and-glass door. Textures used here were
|
||||
formerly used for (and have been replaced by new textures for) the default wood
|
||||
door in my realistic texture packs.
|
||||
|
||||
2012-06-27: Relaxed dependency on UnifiedDyes to prevent depending on Flowers.
|
||||
The mod will still use them if available; if not, you just can't craft the
|
||||
various colored objects.
|
||||
|
||||
2012-06-26: Separated dyes into their own mod ("unifieddyes"). Added a copy of
|
||||
flowers and made this mod depend on it and unified dyes. Updated all crafting
|
||||
recipes to fit, got rid of the conditional code for flowers (since it is a
|
||||
dependency now), removed a bunch of redundant register_craftitem code, fixed
|
||||
some copy&paste errors on the window shutters. As a consequence of these
|
||||
changes, white paint, titanium dioxide, and all colors of dyes will have to be
|
||||
removed and replaced (but the things that depend on them are fine).
|
||||
|
||||
2012-06-25: Removed all of the old legacy_wallmounted references - I didn't
|
||||
realize they were deprecated (and they were causing out-of-nodes issues also).
|
||||
|
||||
2012-06-23: Added small speaker, round brass pole, square wrought iron pole
|
||||
(without connecting rungs). Fairly recent version of Minetest required for
|
||||
these to work (uses nodeboxes). Note that if you've placed brass or wrought
|
||||
iron poles in your world already, they will be drawn using these newer styles;
|
||||
if you need the square poles and/or connecting rungs, you'll need to remove
|
||||
them and craft brass/wrought iron fences instead.
|
||||
|
||||
2012-06-16: Tweaked terracotta roof tiles/shingles to give the 4 pieces back on
|
||||
digging a 'shingle'.
|
||||
|
||||
2012-06-15 (a bit later): Did the same for the stereo and television and
|
||||
improved them in the process.
|
||||
|
||||
2012-06-15: Tweaked the speaker textures, added separate images for all 6
|
||||
sides.
|
||||
|
||||
2012-06-14: Added right-opening versions of oak and mahogany "folding" doors -
|
||||
allows one to create double doors. Split the two colors into separate files.
|
||||
Inspired by Calinou's update to the default doors mod - works the same way too.
|
||||
:-)
|
||||
|
||||
2012-06-13 (a lot later): Changed the crafting recipe slightly for nightstands
|
||||
- they're designated as 'oak' now. Added crafting recipe for mahogany
|
||||
variants. If you've already placed nightstands into your world, you should
|
||||
remove them before updating - sorry, you'll have to rebuild them due my having
|
||||
had to change the node names. Added initial crafting recipes for oak and
|
||||
mahogany drawers and complete dressers (dresser components are not yet useful,
|
||||
work in progress. See crafts.lua for more details).
|
||||
|
||||
2012-06-13: Changed buckets of white paint so that the empty bucket is returned
|
||||
when the bucket of paint is crafted into something else (rather than when the
|
||||
bucket of paint is first created). * Fixed copy&paste error from the previous
|
||||
bucket change. * Moved smelting and crafting of white paint from crafts.lua
|
||||
over to dyes.lua.
|
||||
|
||||
2012-06-12: Multiple post-release updates over the course of the day. * Fixed
|
||||
recipe collision with glass panes. * Implemented a full set of dyes derived
|
||||
from flowers, updated all related crafting recipes and screenshots to match. *
|
||||
Collected all dyes into one file. Changed recipes for blue and purple dyes to
|
||||
something that makes a bit more sense. :-) * Tweaked oak shutters to give two
|
||||
pieces on crafting. * Added alternate recipes for orange and green dyes.
|
||||
|
||||
2012-06-12: Initial release.
|
226
mods/homedecor_modpack/homedecor/climate-control.lua
Normal file
@ -0,0 +1,226 @@
|
||||
-- Nodes that would affect the local temperature e.g. fans, heater, A/C
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node('homedecor:air_conditioner', {
|
||||
drawtype = "nodebox",
|
||||
description = S("Air Conditioner"),
|
||||
tiles = { 'homedecor_ac_tb.png',
|
||||
'homedecor_ac_tb.png',
|
||||
'homedecor_ac_sides.png',
|
||||
'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 = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.124, 0.5 }, -- off by just a tad to force the adjoining faces to be drawn.
|
||||
{-0.5, 0.125, -0.5, 0.5, 0.5, 0.5 },
|
||||
}
|
||||
},
|
||||
selection_box = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
})
|
||||
|
||||
-- fans
|
||||
|
||||
minetest.register_entity("homedecor:mesh_desk_fan", {
|
||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||
visual = "mesh",
|
||||
mesh = "homedecor_desk_fan.b3d",
|
||||
textures = {"homedecor_desk_fan_uv.png"},
|
||||
visual_size = {x=10, y=10},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor: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",
|
||||
fixed = {
|
||||
{-0.1875, -0.5, -0.1875, 0.1875, -0.375, 0.1875}, -- NodeBox1
|
||||
}
|
||||
},
|
||||
tiles = {"homedecor_desk_fan_body.png"},
|
||||
inventory_image = "homedecor_desk_fan_inv.png",
|
||||
wield_image = "homedecor_desk_fan_inv.png",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local entity_remove = minetest.get_objects_inside_radius(pos, 0.1)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("active", "no")
|
||||
print (meta:get_string("active"))
|
||||
if entity_remove[1] == nil then
|
||||
minetest.add_entity({x=pos.x, y=pos.y, z=pos.z}, "homedecor:mesh_desk_fan") --+(0.0625*10)
|
||||
entity_remove = minetest.get_objects_inside_radius(pos, 0.1)
|
||||
if minetest.get_node(pos).param2 == 0 then --list of rad to 90 degree: 3.142/2 = 90; 3.142 = 180; 3*3.142 = 270
|
||||
entity_remove[1]:setyaw(3.142)
|
||||
elseif minetest.get_node(pos).param2 == 1 then
|
||||
entity_remove[1]:setyaw(3.142/2)
|
||||
elseif minetest.get_node(pos).param2 == 3 then
|
||||
entity_remove[1]:setyaw((-3.142/2))
|
||||
else
|
||||
entity_remove[1]:setyaw(0)
|
||||
end
|
||||
end
|
||||
end,
|
||||
on_punch = function(pos)
|
||||
local entity_anim = minetest.get_objects_inside_radius(pos, 0.1)
|
||||
local speedy_meta = minetest.get_meta(pos)
|
||||
if speedy_meta:get_string("active") == "no" then
|
||||
speedy_meta:set_string("active", "yes")
|
||||
print (speedy_meta:get_string("active"))
|
||||
elseif speedy_meta:get_string("active") == "yes" then
|
||||
speedy_meta:set_string("active", "no")
|
||||
print (speedy_meta:get_string("active"))
|
||||
end
|
||||
|
||||
if entity_anim[1] == nil then
|
||||
minetest.add_entity({x=pos.x, y=pos.y, z=pos.z}, "homedecor:mesh_desk_fan") --+(0.0625*10)
|
||||
local entity_remove = minetest.get_objects_inside_radius(pos, 0.1)
|
||||
if minetest.get_node(pos).param2 == 0 then --list of rad to 90 degree: 3.142/2 = 90; 3.142 = 180; 3*3.142 = 270
|
||||
entity_remove[1]:setyaw(3.142)
|
||||
elseif minetest.get_node(pos).param2 == 1 then
|
||||
entity_remove[1]:setyaw(3.142/2)
|
||||
elseif minetest.get_node(pos).param2 == 3 then
|
||||
entity_remove[1]:setyaw((-3.142/2))
|
||||
else
|
||||
entity_remove[1]:setyaw(0)
|
||||
end
|
||||
end
|
||||
local entity_anim = minetest.get_objects_inside_radius(pos, 0.1)
|
||||
if minetest.get_meta(pos):get_string("active") == "no" then
|
||||
entity_anim[1]:set_animation({x=0,y=0}, 1, 0)
|
||||
elseif minetest.get_meta(pos):get_string("active") == "yes" then
|
||||
entity_anim[1]:set_animation({x=0,y=96}, 24, 0)
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos)
|
||||
local entity_remove = minetest.get_objects_inside_radius(pos, 0.1)
|
||||
entity_remove[1]:remove()
|
||||
end,
|
||||
})
|
||||
|
||||
-- ceiling fan
|
||||
|
||||
minetest.register_node('homedecor: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} },
|
||||
{ name="homedecor_ceiling_fan_bottom.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5} },
|
||||
'homedecor_ceiling_fan_sides.png',
|
||||
},
|
||||
inventory_image = "homedecor_ceiling_fan_inv.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.5, 0.495, -0.5, 0.5, 0.495, 0.5 },
|
||||
{ -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(),
|
||||
})
|
||||
|
||||
-- heating devices
|
||||
|
||||
minetest.register_node('homedecor:space_heater', {
|
||||
drawtype = "nodebox",
|
||||
description = S("Space heater"),
|
||||
tiles = { 'homedecor_heater_tb.png',
|
||||
'homedecor_heater_tb.png',
|
||||
'homedecor_heater_sides.png',
|
||||
'homedecor_heater_sides.png',
|
||||
'homedecor_heater_back.png',
|
||||
'homedecor_heater_front.png'
|
||||
},
|
||||
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 = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1875, -0.5, 0.0625, 0.1875, 0, 0.3125},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.1875, -0.5, 0.0625, 0.1875, 0, 0.3125}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor: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",
|
||||
fixed = {
|
||||
{-0.4375, 0.3125, 0.3125, 0.5, 0.4375, 0.4375}, -- NodeBox1
|
||||
{0.375, 0.25, 0.25, 0.4375, 0.5, 0.5}, -- NodeBox2
|
||||
{0.25, 0.25, 0.25, 0.3125, 0.5, 0.5}, -- NodeBox3
|
||||
{0.125, 0.25, 0.25, 0.1875, 0.5, 0.5}, -- NodeBox4
|
||||
{0, 0.25, 0.25, 0.0625, 0.5, 0.5}, -- NodeBox5
|
||||
{-0.125, 0.25, 0.25, -0.0625, 0.5, 0.5}, -- NodeBox6
|
||||
{-0.25, 0.25, 0.25, -0.1875, 0.5, 0.5}, -- NodeBox7
|
||||
{-0.375, 0.25, 0.25, -0.3125, 0.5, 0.5}, -- NodeBox8
|
||||
{0.375, -0.375, 0.4375, 0.4375, 0.5, 0.5}, -- NodeBox9
|
||||
{0.375, -0.375, 0.25, 0.4375, 0.5, 0.3125}, -- NodeBox10
|
||||
{0.25, -0.375, 0.4375, 0.3125, 0.5, 0.5}, -- NodeBox11
|
||||
{0.25, -0.375, 0.25, 0.3125, 0.5, 0.3125}, -- NodeBox12
|
||||
{0.125, -0.375, 0.4375, 0.1875, 0.5, 0.5}, -- NodeBox13
|
||||
{0.125, -0.375, 0.25, 0.1875, 0.5, 0.3125}, -- NodeBox14
|
||||
{0, -0.375, 0.4375, 0.0625, 0.5, 0.5}, -- NodeBox15
|
||||
{0, -0.375, 0.25, 0.0625, 0.5, 0.3125}, -- NodeBox16
|
||||
{-0.125, -0.375, 0.4375, -0.0625, 0.5, 0.5}, -- NodeBox17
|
||||
{-0.125, -0.375, 0.25, -0.0625, 0.5, 0.3125}, -- NodeBox18
|
||||
{-0.25, -0.375, 0.4375, -0.1875, 0.5, 0.5}, -- NodeBox19
|
||||
{-0.25, -0.375, 0.25, -0.1875, 0.5, 0.3125}, -- NodeBox20
|
||||
{-0.375, -0.375, 0.4375, -0.3125, 0.5, 0.5}, -- NodeBox21
|
||||
{-0.375, -0.375, 0.25, -0.3125, 0.5, 0.3125}, -- NodeBox22
|
||||
{-0.4375, -0.3125, 0.3125, 0.5, -0.1875, 0.4375}, -- NodeBox23
|
||||
{0.375, -0.375, 0.3125, 0.4375, -0.125, 0.4375}, -- NodeBox24
|
||||
{0.25, -0.375, 0.3125, 0.3125, -0.125, 0.4375}, -- NodeBox25
|
||||
{0.125, -0.375, 0.3125, 0.1875, -0.125, 0.4375}, -- NodeBox26
|
||||
{0, -0.375, 0.3125, 0.0625, -0.125, 0.4375}, -- NodeBox27
|
||||
{-0.125, -0.375, 0.3125, -0.0625, -0.125, 0.4375}, -- NodeBox28
|
||||
{-0.25, -0.375, 0.3125, -0.1875, -0.125, 0.4375}, -- NodeBox29
|
||||
{-0.375, -0.375, 0.3125, -0.3125, -0.125, 0.4375}, -- NodeBox30
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.4375, -0.375, 0.25, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
})
|
||||
|
107
mods/homedecor_modpack/homedecor/clocks.lua
Normal file
@ -0,0 +1,107 @@
|
||||
minetest.register_node("homedecor:analog_clock_plastic", {
|
||||
description = "Analog clock (plastic)",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_analog_clock_plastic_edges.png",
|
||||
"homedecor_analog_clock_plastic_edges.png",
|
||||
"homedecor_analog_clock_plastic_edges.png",
|
||||
"homedecor_analog_clock_plastic_edges.png",
|
||||
"homedecor_analog_clock_plastic_back.png",
|
||||
"homedecor_analog_clock_plastic_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_analog_clock_plastic_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/32, -3/32, 15/32, 8/32, 3/32, 16/32 },
|
||||
{ -7/32, -5/32, 15/32, 7/32, 5/32, 16/32 },
|
||||
{ -6/32, -6/32, 15/32, 6/32, 6/32, 16/32 },
|
||||
{ -5/32, -7/32, 15/32, 5/32, 7/32, 16/32 },
|
||||
{ -3/32, -8/32, 15/32, 3/32, 8/32, 16/32 }
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -8/32, -8/32, 15/32, 8/32, 8/32, 16/32 }
|
||||
},
|
||||
groups = {snappy=3},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:analog_clock_wood", {
|
||||
description = "Analog clock (wood)",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_analog_clock_wood_edges.png",
|
||||
"homedecor_analog_clock_wood_edges.png",
|
||||
"homedecor_analog_clock_wood_edges.png",
|
||||
"homedecor_analog_clock_wood_edges.png",
|
||||
"homedecor_analog_clock_wood_back.png",
|
||||
"homedecor_analog_clock_wood_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_analog_clock_wood_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/32, -3/32, 15/32, 8/32, 3/32, 16/32 },
|
||||
{ -7/32, -5/32, 15/32, 7/32, 5/32, 16/32 },
|
||||
{ -6/32, -6/32, 15/32, 6/32, 6/32, 16/32 },
|
||||
{ -5/32, -7/32, 15/32, 5/32, 7/32, 16/32 },
|
||||
{ -3/32, -8/32, 15/32, 3/32, 8/32, 16/32 }
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -8/32, -8/32, 15/32, 8/32, 8/32, 16/32 }
|
||||
},
|
||||
groups = {snappy=3},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:digital_clock", {
|
||||
description = "Digital clock",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_digital_clock_edges.png",
|
||||
"homedecor_digital_clock_edges.png",
|
||||
"homedecor_digital_clock_edges.png",
|
||||
"homedecor_digital_clock_edges.png",
|
||||
"homedecor_digital_clock_back.png",
|
||||
"homedecor_digital_clock_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_digital_clock_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.28125, -0.25, 0.4375, 0.3125, 0.25, 0.5},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:alarm_clock", {
|
||||
description = "Alarm clock",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_alarm_clock_top.png",
|
||||
"homedecor_alarm_clock_bottom.png",
|
||||
"homedecor_alarm_clock_sides.png",
|
||||
"homedecor_alarm_clock_sides.png^[transformFX",
|
||||
"homedecor_alarm_clock_back.png",
|
||||
"homedecor_alarm_clock_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_alarm_clock_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -9/32, -16/32, 7/32, 10/32, -5/32, 16/32 },
|
||||
}
|
||||
},
|
||||
groups = {snappy=3},
|
||||
})
|
149
mods/homedecor_modpack/homedecor/cobweb.lua
Normal file
@ -0,0 +1,149 @@
|
||||
minetest.register_node("homedecor:cobweb_corner", {
|
||||
description = "Cobweb",
|
||||
drawtype = "torchlike",
|
||||
tiles = { "homedecor_cobweb_torchlike.png" },
|
||||
inventory_image = "homedecor_cobweb_inv.png",
|
||||
wield_image = "homedecor_cobweb_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
},
|
||||
visual_scale = 1.4,
|
||||
groups = { snappy = 3 },
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
homedecor.rotate_cobweb(pos)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:cobweb_centered", {
|
||||
description = "Cobweb",
|
||||
drawtype = "nodebox",
|
||||
tiles = { "homedecor_cobweb.png" },
|
||||
inventory_image = "homedecor_cobweb_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.1, 0.5, 0.5, 0.1 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0 }
|
||||
},
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
drop = "homedecor:cobweb_corner"
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:cobweb_flat", {
|
||||
description = "Cobweb",
|
||||
drawtype = "nodebox",
|
||||
tiles = { "homedecor_cobweb.png" },
|
||||
inventory_image = "homedecor_cobweb_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.495, 0.5, 0.5, 0.495 }
|
||||
},
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
drop = "homedecor:cobweb_corner"
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:cobweb_plantlike", {
|
||||
description = "Cobweb",
|
||||
drawtype = "plantlike",
|
||||
tiles = { "homedecor_cobweb_plantlike.png" },
|
||||
inventory_image = "homedecor_cobweb_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
},
|
||||
visual_scale = 1.189,
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
drop = "homedecor:cobweb_corner"
|
||||
})
|
||||
|
||||
-- helper function to rotate the cobweb after it's placed
|
||||
|
||||
function homedecor.rotate_cobweb(pos)
|
||||
local wall_xm = minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z }).name
|
||||
local wall_xp = minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z }).name
|
||||
local wall_zm = minetest.get_node({ x=pos.x, y=pos.y, z=pos.z-1}).name
|
||||
local wall_zp = minetest.get_node({ x=pos.x, y=pos.y, z=pos.z+1}).name
|
||||
|
||||
local iswall_xm = (wall_xm ~= "air" and not string.find(wall_xm, "homedecor:cobweb"))
|
||||
local iswall_xp = (wall_xp ~= "air" and not string.find(wall_xp, "homedecor:cobweb"))
|
||||
local iswall_zm = (wall_zm ~= "air" and not string.find(wall_zm, "homedecor:cobweb"))
|
||||
local iswall_zp = (wall_zp ~= "air" and not string.find(wall_zp, "homedecor:cobweb"))
|
||||
|
||||
-- only xm+zp, or only xp+zm means on-floor torchlike
|
||||
|
||||
if (iswall_xm and iswall_zp and not iswall_xp and not iswall_zm)
|
||||
or (iswall_xp and iswall_zm and not iswall_xm and not iswall_zp) then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_corner", param2 = 1})
|
||||
|
||||
-- only xm+zm, or only xp+zp means on-ceiling torchlike
|
||||
|
||||
elseif (iswall_xm and iswall_zm and not iswall_xp and not iswall_zp)
|
||||
or (iswall_xp and iswall_zp and not iswall_xm and not iswall_zm) then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_corner", param2 = 0})
|
||||
|
||||
-- only xm+xp means nodebox (not rotated, 0 degrees)
|
||||
|
||||
elseif iswall_xm and iswall_xp and not iswall_zm and not iswall_zp then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_centered", param2 = 0})
|
||||
|
||||
-- only zm+zp means nodebox rotated to 90 degrees
|
||||
|
||||
elseif iswall_zm and iswall_zp and not iswall_xm and not iswall_xp then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_centered", param2 = 1})
|
||||
|
||||
-- ok, there aren't any simple two-wall corners or opposing walls.
|
||||
-- Are there any standalone walls?
|
||||
|
||||
elseif iswall_xm and not iswall_xp and not iswall_zm and not iswall_zp then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_flat", param2 = 3})
|
||||
|
||||
elseif iswall_xp and not iswall_xm and not iswall_zm and not iswall_zp then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_flat", param2 = 1})
|
||||
|
||||
elseif iswall_zm and not iswall_xm and not iswall_xp and not iswall_zp then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_flat", param2 = 2})
|
||||
|
||||
elseif iswall_zp and not iswall_xm and not iswall_xp and not iswall_zm then
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_flat", param2 = 0})
|
||||
|
||||
-- if all else fails, place the plantlike version as a fallback.
|
||||
|
||||
else
|
||||
minetest.set_node(pos, {name = "homedecor:cobweb_plantlike", param2 = 0})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- convert existing cobwebs
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:cobweb" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
homedecor.rotate_cobweb(pos)
|
||||
end
|
||||
})
|
14
mods/homedecor_modpack/homedecor/copyright.txt
Normal file
@ -0,0 +1,14 @@
|
||||
Most code and all textures by Vanessa Ezekowitz.
|
||||
|
||||
Some code copied and modified from the game's default mods (especially
|
||||
doors) and ironzorg's flowers mod.
|
||||
|
||||
Licenses:
|
||||
* For the lua code, LGPL.
|
||||
* For the door open/close sound, CC-By-SA 3.0 by Slanesh on freesound.org
|
||||
http://freesound.org/people/Slanesh/sounds/31768/
|
||||
* For the gate open/close sound, CC0, by j1987 on freesound.org
|
||||
http://freesound.org/people/j1987/sounds/106116/
|
||||
* For the doorbell sound, CC0 by guitarguy1985 on freesound.org
|
||||
http://freesound.org/people/guitarguy1985/sounds/69384/
|
||||
* For all images and everything else, WTFPL.
|
2870
mods/homedecor_modpack/homedecor/crafts.lua
Normal file
5
mods/homedecor_modpack/homedecor/depends.txt
Normal file
@ -0,0 +1,5 @@
|
||||
default
|
||||
signs_lib
|
||||
building_blocks
|
||||
moreblocks?
|
||||
|
365
mods/homedecor_modpack/homedecor/door_models.lua
Normal file
@ -0,0 +1,365 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
homedecor.door_models = {
|
||||
{
|
||||
"closet_mahogany",
|
||||
S("Mahogany Closet Door"),
|
||||
|
||||
{{ -8/16, 5/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0/32, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -12/32, 13/32, 8/16, -11/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -13/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -11/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, 5/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0/32, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -12/32, 13/32, 8/16, -11/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -13/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -11/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"closet_oak",
|
||||
S("Oak Closet Door"),
|
||||
|
||||
{{ -8/16, 5/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0/32, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -12/32, 13/32, 8/16, -11/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -13/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -11/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, 5/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0/32, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -12/32, 13/32, 8/16, -11/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -13/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||
{ -8/16, 4/32, 13/32, 8/16, 5/32, 15/32 },
|
||||
{ -8/16, 2/32, 13/32, 8/16, 3/32, 15/32 },
|
||||
{ -8/16, 0, 13/32, 8/16, 1/32, 15/32 },
|
||||
{ -8/16, -2/32, 13/32, 8/16, -1/32, 15/32 },
|
||||
{ -8/16, -4/32, 13/32, 8/16, -3/32, 15/32 },
|
||||
{ -8/16, -6/32, 13/32, 8/16, -5/32, 15/32 },
|
||||
{ -8/16, -8/32, 13/32, 8/16, -7/32, 15/32 },
|
||||
{ -8/16, -10/32, 13/32, 8/16, -9/32, 15/32 },
|
||||
{ -8/16, -16/32, 6/16, 8/16, -11/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"exterior_fancy",
|
||||
S("Fancy Wood/Glass Door"),
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"glass",
|
||||
S("Glass Office Door"),
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"wood_glass",
|
||||
S("Glass and Wood, Oak-colored"),
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"wood_glass_mahogany",
|
||||
S("Glass and Wood, Mahogany-colored"),
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"wood_glass_white",
|
||||
S("Glass and Wood, White"),
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }},
|
||||
|
||||
{{ -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 },
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||
{ -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 },
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"wood_plain",
|
||||
S("Plain Wooden Door"),
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"bedroom",
|
||||
S("White Bedroom Door"),
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}
|
||||
},
|
||||
|
||||
----------
|
||||
|
||||
{
|
||||
"wrought_iron",
|
||||
S("Wrought Iron Gate/Door"),
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}
|
||||
},
|
||||
|
||||
---------
|
||||
|
||||
{
|
||||
"woodglass",
|
||||
S("Woodglass door"),
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, 8/16, 8/16, 8/16 }}
|
||||
},
|
||||
|
||||
}
|
||||
|
800
mods/homedecor_modpack/homedecor/doors_and_gates.lua
Normal file
@ -0,0 +1,800 @@
|
||||
-- Node definitions for Homedecor doors
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
-- doors
|
||||
|
||||
local function isSolid(pos,adj)
|
||||
local adj = {x=adj[1],y=adj[2],z=adj[3]}
|
||||
local node = minetest.get_node(vector.add(pos,adj))
|
||||
if node then
|
||||
local idef = minetest.registered_nodes[minetest.get_node(vector.add(pos,adj)).name]
|
||||
if idef then
|
||||
return idef.walkable
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function countSolids(pos,node,level)
|
||||
local solids = 0
|
||||
for x = -1, 1 do
|
||||
for z = -1, 1 do
|
||||
local y = 0
|
||||
if node.param2 == 5 then
|
||||
y = -level
|
||||
else
|
||||
y = level
|
||||
end
|
||||
-- special cases when x == z == 0
|
||||
if x == 0 and z == 0 then
|
||||
if level == 1 then
|
||||
-- when looking past the trap door, cannot be solid in center
|
||||
if isSolid(pos,{x,y,z}) then
|
||||
return false
|
||||
end
|
||||
-- no else. it doesn't matter if x == y == z is solid, that's us.
|
||||
end
|
||||
elseif isSolid(pos,{x,y,z}) then
|
||||
solids = solids + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return solids
|
||||
end
|
||||
|
||||
local function calculateClosed(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
-- the door is considered closed if it is closing off something.
|
||||
|
||||
local solids = 0
|
||||
local direction = node.param2 % 6
|
||||
local isTrap = direction == 0 or direction == 5
|
||||
if isTrap then
|
||||
-- the trap door is considered closed when all nodes on its sides are solid
|
||||
-- or all nodes in the 3x3 above/below it are solid except the center
|
||||
for level = 0, 1 do
|
||||
local fail = false
|
||||
local solids = countSolids(pos,node,level)
|
||||
if solids == 8 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
else
|
||||
-- the door is considered closed when the nodes on its sides are solid
|
||||
-- or the 3 nodes in its facing direction are solid nonsolid solid
|
||||
-- if the door has two levels (i.e. not a gate) then this must
|
||||
-- be true for the top node as well.
|
||||
|
||||
-- sorry I dunno the math to figure whether to x or z
|
||||
if direction == 1 or direction == 2 then
|
||||
if isSolid(pos,{0,0,-1}) and isSolid(pos,{0,0,1}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
local x
|
||||
if direction == 1 then
|
||||
x = 1
|
||||
else
|
||||
x = -1
|
||||
end
|
||||
if isSolid(pos,{x,0,-1}) and not isSolid(pos,{x,0,0}) and isSolid(pos,{x,0,1}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
else
|
||||
-- direction == 3 or 4
|
||||
if isSolid(pos,{-1,0,0}) and isSolid(pos,{1,0,0}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
local z
|
||||
if direction == 3 then
|
||||
z = 1
|
||||
else
|
||||
z = -1
|
||||
end
|
||||
if isSolid(pos,{-1,0,z}) and not isSolid(pos,{0,0,z}) and isSolid(pos,{1,0,z}) then
|
||||
if string.find(node.name,'_bottom_') then
|
||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
error("What direction is this???",direction)
|
||||
end
|
||||
end
|
||||
|
||||
-- isClosed flag, is 0 or 1 0 = open, 1 = closed
|
||||
local function getClosed(pos)
|
||||
local isClosed = minetest.get_meta(pos):get_string('closed')
|
||||
if isClosed=='' then
|
||||
if calculateClosed(pos) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
isClosed = tonumber(isClosed)
|
||||
-- may be closed or open (1 or 0)
|
||||
return isClosed == 1
|
||||
end
|
||||
end
|
||||
|
||||
local function addDoorNode(pos,def,isClosed)
|
||||
if isClosed then
|
||||
isClosed = 1
|
||||
else
|
||||
isClosed = 0
|
||||
end
|
||||
minetest.add_node(pos, def)
|
||||
minetest.get_meta(pos):set_int('closed',isClosed)
|
||||
end
|
||||
|
||||
local sides = {"left", "right"}
|
||||
local rsides = {"right", "left"}
|
||||
|
||||
for i in ipairs(sides) do
|
||||
local side = sides[i]
|
||||
local rside = rsides[i]
|
||||
|
||||
for j in ipairs(homedecor.door_models) do
|
||||
local doorname = homedecor.door_models[j][1]
|
||||
local doordesc = homedecor.door_models[j][2]
|
||||
local nodeboxes_top = homedecor.door_models[j][5]
|
||||
local nodeboxes_bottom = homedecor.door_models[j][6]
|
||||
local texalpha = false
|
||||
if doorname == "exterior_fancy" then
|
||||
texalpha = true
|
||||
end
|
||||
|
||||
if side == "left" then
|
||||
nodeboxes_top = homedecor.door_models[j][3]
|
||||
nodeboxes_bottom = homedecor.door_models[j][4]
|
||||
end
|
||||
|
||||
local lower_top_side = "homedecor_door_"..doorname.."_tb.png"
|
||||
local upper_bottom_side = "homedecor_door_"..doorname.."_tb.png"
|
||||
|
||||
if doorname == "glass" or doorname == "wrought_iron" then
|
||||
lower_top_side = "homedecor_blanktile.png"
|
||||
upper_bottom_side = "homedecor_blanktile.png"
|
||||
end
|
||||
|
||||
local tiles_upper = {
|
||||
"homedecor_door_"..doorname.."_tb.png",
|
||||
upper_bottom_side,
|
||||
"homedecor_door_"..doorname.."_lrt.png",
|
||||
"homedecor_door_"..doorname.."_lrt.png",
|
||||
"homedecor_door_"..doorname.."_"..rside.."_top.png",
|
||||
"homedecor_door_"..doorname.."_"..side.."_top.png",
|
||||
}
|
||||
|
||||
local tiles_lower = {
|
||||
lower_top_side,
|
||||
"homedecor_door_"..doorname.."_tb.png",
|
||||
"homedecor_door_"..doorname.."_lrb.png",
|
||||
"homedecor_door_"..doorname.."_lrb.png",
|
||||
"homedecor_door_"..doorname.."_"..rside.."_bottom.png",
|
||||
"homedecor_door_"..doorname.."_"..side.."_bottom.png",
|
||||
}
|
||||
|
||||
local selectboxes_top = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -1.5, 6/16, 0.5, 0.5, 8/16}
|
||||
}
|
||||
|
||||
local selectboxes_bottom = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 6/16, 0.5, 1.5, 8/16}
|
||||
}
|
||||
|
||||
minetest.register_node("homedecor:door_"..doorname.."_top_"..side, {
|
||||
description = doordesc.." "..S("(Top Half, %s-opening)"):format(side),
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles_upper,
|
||||
paramtype = "light",
|
||||
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 = {
|
||||
type = "fixed",
|
||||
fixed = nodeboxes_top
|
||||
},
|
||||
drop = "homedecor:door_"..doorname.."_bottom_"..side,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "homedecor:door_"..doorname.."_bottom_"..side then
|
||||
minetest.remove_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
end
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
homedecor.flip_door({x=pos.x, y=pos.y-1, z=pos.z}, node, clicker, doorname, side)
|
||||
end
|
||||
})
|
||||
|
||||
local dgroups = {snappy=3, not_in_creative_inventory=1}
|
||||
if side == "left" then
|
||||
dgroups = {snappy=3}
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:door_"..doorname.."_bottom_"..side, {
|
||||
description = doordesc.." "..S("(%s-opening)"):format(side),
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles_lower,
|
||||
inventory_image = "homedecor_door_"..doorname.."_"..side.."_inv.png",
|
||||
wield_image = "homedecor_door_"..doorname.."_"..side.."_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = dgroups,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
walkable = true,
|
||||
use_texture_alpha = texalpha,
|
||||
selection_box = selectboxes_bottom,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = nodeboxes_bottom
|
||||
},
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "homedecor:door_"..doorname.."_top_"..side then
|
||||
minetest.remove_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
end
|
||||
end,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local keys=placer:get_player_control()
|
||||
homedecor.place_door(itemstack, placer, pointed_thing, doorname, keys["sneak"])
|
||||
return itemstack
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
homedecor.flip_door(pos, node, clicker, doorname, side)
|
||||
end,
|
||||
-- both left and right doors may be used for open or closed doors
|
||||
-- so they have to have both action_on and action_off and just
|
||||
-- check when that action is invoked if to continue
|
||||
|
||||
on_punch = function(pos, node, puncher)
|
||||
minetest.get_meta(pos):set_string('closed',nil)
|
||||
end,
|
||||
drop = "homedecor:door_"..doorname.."_bottom_left",
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_on = function(pos,node)
|
||||
local isClosed = getClosed(pos)
|
||||
if isClosed then
|
||||
homedecor.flip_door(pos,node,nil,doorname,side,isClosed)
|
||||
end
|
||||
end,
|
||||
action_off = function(pos,node)
|
||||
local isClosed = getClosed(pos)
|
||||
if not isClosed then
|
||||
homedecor.flip_door(pos,node,nil,doorname,side,isClosed)
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- Gates
|
||||
|
||||
local gates_list = { "picket", "picket_white", "barbed_wire", "chainlink" }
|
||||
local gate_names = { "Unpainted Picket", "White Picket", "Barbed Wire", "Chainlink" }
|
||||
|
||||
local gate_models_closed = {
|
||||
{{ -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 }},
|
||||
|
||||
{{ -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 }},
|
||||
|
||||
{{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece
|
||||
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece
|
||||
{ -6/16, -8/16, 7/16, 6/16, 8/16, 7/16 }}, -- the wire
|
||||
|
||||
{{ -8/16, -8/16, 6/16, -7/16, 8/16, 8/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece
|
||||
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }, -- the chainlink itself
|
||||
{ -8/16, -3/16, 6/16, -6/16, 3/16, 8/16 }} -- the lump representing the lock
|
||||
}
|
||||
|
||||
local gate_models_open = {
|
||||
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
||||
|
||||
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
||||
|
||||
{{ 6/16, -8/16, -8/16, 8/16, 8/16, -6/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ 13/32, 7/16, -8/16, 15/32, 8/16, 8/16 }, -- top piece
|
||||
{ 13/32, -8/16, -8/16, 15/32, -7/16, 8/16 }, -- bottom piece
|
||||
{ 7/16, -8/16, -6/16, 7/16, 8/16, 6/16 }}, -- the wire
|
||||
|
||||
{{ 6/16, -8/16, -8/16, 8/16, 8/16, -7/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ 13/32, 7/16, -8/16, 15/32, 8/16, 8/16 }, -- top piece
|
||||
{ 13/32, -8/16, -8/16, 15/32, -7/16, 8/16 }, -- bottom piece
|
||||
{ 7/16, -8/16, -8/16, 7/16, 8/16, 8/16 }, -- the chainlink itself
|
||||
{ 6/16, -3/16, -8/16, 8/16, 3/16, -6/16 }} -- the lump representing the lock
|
||||
}
|
||||
|
||||
for i in ipairs(gates_list) do
|
||||
|
||||
local gate=gates_list[i]
|
||||
|
||||
local def = {
|
||||
drawtype = "nodebox",
|
||||
description = S(gate_names[i].." Fence Gate"),
|
||||
tiles = {
|
||||
"homedecor_gate_"..gate.."_top.png",
|
||||
"homedecor_gate_"..gate.."_bottom.png",
|
||||
"homedecor_gate_"..gate.."_left.png",
|
||||
"homedecor_gate_"..gate.."_right.png",
|
||||
"homedecor_gate_"..gate.."_back.png",
|
||||
"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",
|
||||
fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = gate_models_closed[i]
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
homedecor.flip_gate(pos, node, clicker, gate, "closed")
|
||||
end,
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_on = function(pos,node) homedecor.flip_gate(pos,node,player,gate, "closed") end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- gates when placed default to closed, closed.
|
||||
|
||||
minetest.register_node("homedecor:gate_"..gate.."_closed", def)
|
||||
|
||||
-- this is either a terrible idea or a great one
|
||||
def = homedecor.table_copy(def)
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
def.selection_box.fixed = { 0.4, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
def.tiles = {
|
||||
"homedecor_gate_"..gate.."_top.png",
|
||||
"homedecor_gate_"..gate.."_bottom.png",
|
||||
"homedecor_gate_"..gate.."_front.png",
|
||||
"homedecor_gate_"..gate.."_back.png",
|
||||
"homedecor_gate_"..gate.."_left.png",
|
||||
"homedecor_gate_"..gate.."_right.png"
|
||||
}
|
||||
def.node_box.fixed = gate_models_open[i]
|
||||
def.drop = "homedecor:gate_"..gate.."_closed"
|
||||
def.on_rightclick = function(pos, node, clicker)
|
||||
homedecor.flip_gate(pos, node, clicker, gate, "open")
|
||||
end
|
||||
def.mesecons.effector = {
|
||||
action_off = function(pos,node) homedecor.flip_gate(pos,node,player,gate, "open") end
|
||||
}
|
||||
|
||||
minetest.register_node("homedecor:gate_"..gate.."_open", def)
|
||||
end
|
||||
|
||||
minetest.register_alias("homedecor:fence_barbed_wire_gate_open", "homedecor:gate_barbed_wire_open")
|
||||
minetest.register_alias("homedecor:fence_barbed_wire_gate_closed", "homedecor:gate_barbed_wire_closed")
|
||||
minetest.register_alias("homedecor:fence_chainlink_gate_open", "homedecor:gate_chainlink_open")
|
||||
minetest.register_alias("homedecor:fence_chainlink_gate_closed", "homedecor:gate_chainlink_closed")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_open", "homedecor:gate_picket_open")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_closed", "homedecor:gate_picket_closed")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_white_open", "homedecor:gate_picket_white_open")
|
||||
minetest.register_alias("homedecor:fence_picket_gate_white_closed", "homedecor:gate_picket_white_closed")
|
||||
|
||||
----- helper functions
|
||||
|
||||
function homedecor.place_door(itemstack, placer, pointed_thing, name, forceright)
|
||||
|
||||
local pointed = pointed_thing.under
|
||||
local pnode = minetest.get_node(pointed)
|
||||
local pname = pnode.name
|
||||
local rnodedef = minetest.registered_nodes[pname]
|
||||
|
||||
if rnodedef then
|
||||
|
||||
if rnodedef.on_rightclick then
|
||||
rnodedef.on_rightclick(pointed_thing.under, pnode, placer, itemstack)
|
||||
return
|
||||
end
|
||||
|
||||
local pos1 = nil
|
||||
local pos2 = nil
|
||||
|
||||
if rnodedef["buildable_to"] then
|
||||
pos1 = pointed
|
||||
pos2 = {x=pointed.x, y=pointed.y+1, z=pointed.z}
|
||||
else
|
||||
pos1 = pointed_thing.above
|
||||
pos2 = {x=pointed_thing.above.x, y=pointed_thing.above.y+1, z=pointed_thing.above.z}
|
||||
end
|
||||
|
||||
local node_bottom = minetest.get_node(pos1)
|
||||
local node_top = minetest.get_node(pos2)
|
||||
|
||||
if minetest.is_protected(pos1, placer:get_player_name()) then
|
||||
minetest.record_protection_violation(pos1,
|
||||
placer:get_player_name())
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.is_protected(pos2, placer:get_player_name()) then
|
||||
minetest.record_protection_violation(pos2,
|
||||
placer:get_player_name())
|
||||
return
|
||||
end
|
||||
|
||||
if not homedecor.get_nodedef_field(node_bottom.name, "buildable_to")
|
||||
or not homedecor.get_nodedef_field(node_top.name, "buildable_to") then
|
||||
minetest.chat_send_player( placer:get_player_name(), S('Not enough space above that spot to place a door!') )
|
||||
else
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local p_tests = {
|
||||
{x=pos1.x-1, y=pos1.y, z=pos1.z},
|
||||
{x=pos1.x, y=pos1.y, z=pos1.z+1},
|
||||
{x=pos1.x+1, y=pos1.y, z=pos1.z},
|
||||
{x=pos1.x, y=pos1.y, z=pos1.z-1},
|
||||
}
|
||||
print("fdir="..fdir)
|
||||
local testnode = minetest.get_node(p_tests[fdir+1])
|
||||
local side = "left"
|
||||
|
||||
if string.find(testnode.name, "homedecor:door_"..name.."_bottom_left") or forceright then
|
||||
side = "right"
|
||||
end
|
||||
|
||||
local def = { name = "homedecor:door_"..name.."_bottom_"..side, param2=fdir}
|
||||
addDoorNode(pos1, def, true)
|
||||
minetest.add_node(pos2, { name = "homedecor:door_"..name.."_top_"..side, param2=fdir})
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- to open a door, you switch left for right and subtract from param2, or vice versa right for left
|
||||
-- that is to say open "right" doors become left door nodes, and open left doors right door nodes.
|
||||
-- also adjusting param2 so the node is at 90 degrees.
|
||||
|
||||
function homedecor.flip_door(pos, node, player, name, side, isClosed)
|
||||
if isClosed == nil then
|
||||
isClosed = getClosed(pos)
|
||||
end
|
||||
-- this is where we swap the isClosed status!
|
||||
-- i.e. if isClosed, we're adding an open door
|
||||
-- and if not isClosed, a closed door
|
||||
isClosed = not isClosed
|
||||
|
||||
local rside = nil
|
||||
local nfdir = nil
|
||||
local ofdir = node.param2 or 0
|
||||
if side == "left" then
|
||||
rside = "right"
|
||||
nfdir=ofdir - 1
|
||||
if nfdir < 0 then nfdir = 3 end
|
||||
else
|
||||
rside = "left"
|
||||
nfdir=ofdir + 1
|
||||
if nfdir > 3 then nfdir = 0 end
|
||||
end
|
||||
local sound;
|
||||
if isClosed then
|
||||
sound = 'close'
|
||||
else
|
||||
sound = 'open'
|
||||
end
|
||||
minetest.sound_play("homedecor_door_"..sound, {
|
||||
pos=pos,
|
||||
max_hear_distance = 5,
|
||||
gain = 2,
|
||||
})
|
||||
-- XXX: does the top half have to remember open/closed too?
|
||||
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_"..name.."_top_"..rside, param2=nfdir})
|
||||
|
||||
addDoorNode(pos,{ name = "homedecor:door_"..name.."_bottom_"..rside, param2=nfdir },isClosed)
|
||||
end
|
||||
|
||||
function homedecor.flip_gate(pos, node, player, gate, oc)
|
||||
local isClosed = getClosed(pos);
|
||||
minetest.sound_play("homedecor_gate_open_close", {
|
||||
pos=pos,
|
||||
max_hear_distance = 5,
|
||||
gain = 2,
|
||||
})
|
||||
|
||||
local fdir = node.param2 or 0
|
||||
|
||||
-- since right facing gates use "open" nodes for closed, we need an
|
||||
-- isClosed flag to tell if it's "really" closed.
|
||||
|
||||
local gateresult = nil
|
||||
if oc == "closed" then
|
||||
gateresult = "homedecor:gate_"..gate.."_open"
|
||||
else
|
||||
gateresult = "homedecor:gate_"..gate.."_closed"
|
||||
end
|
||||
|
||||
local def = {name=gateresult, param2=fdir}
|
||||
|
||||
addDoorNode(pos, def, isClosed)
|
||||
|
||||
-- the following opens and closes gates below and above in sync with this one
|
||||
-- (without three gate open/close sounds)
|
||||
|
||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local below = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||
local nodeabove = minetest.get_node(above)
|
||||
local nodebelow = minetest.get_node(below)
|
||||
|
||||
if string.find(nodeabove.name, "homedecor:gate_"..gate) then
|
||||
addDoorNode(above, def, isClosed)
|
||||
end
|
||||
|
||||
if string.find(nodebelow.name, "homedecor:gate_"..gate) then
|
||||
addDoorNode(below, def, isClosed)
|
||||
end
|
||||
end
|
||||
|
||||
-- "paper" door/wall
|
||||
|
||||
minetest.register_node("homedecor:japanese_wall_top", {
|
||||
tiles = {
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_top.png",
|
||||
"homedecor_japanese_wall_top.png"
|
||||
},
|
||||
description = "Japanese wall (top)",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true,
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:japanese_wall_middle", {
|
||||
tiles = {
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_middle.png",
|
||||
"homedecor_japanese_wall_middle.png"
|
||||
},
|
||||
description = "Japanese wall",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true,
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:japanese_wall_bottom", {
|
||||
tiles = {
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_bottom.png",
|
||||
"homedecor_japanese_wall_bottom.png"
|
||||
},
|
||||
description = "Japanese wall (bottom)",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true,
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:tatami_mat", {
|
||||
tiles = {
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png",
|
||||
"homedecor_tatami.png"
|
||||
},
|
||||
description = "Japanese tatami",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:jpn_door_bottom", {
|
||||
description = "Japanese-style door",
|
||||
inventory_image = "homedecor_jpn_door_inv.png",
|
||||
tiles = {
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_door_bottom.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 1.5, 0.0625},
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
||||
local pointed = pointed_thing.under
|
||||
local pnode = minetest.get_node(pointed)
|
||||
local pname = pnode.name
|
||||
local rnodedef = minetest.registered_nodes[pname]
|
||||
|
||||
if rnodedef.on_rightclick then
|
||||
rnodedef.on_rightclick(pointed, pnode, placer)
|
||||
return
|
||||
end
|
||||
|
||||
return homedecor.stack_vertically(itemstack, placer, pointed_thing,
|
||||
"homedecor:jpn_door_bottom", "homedecor:jpn_door_top")
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(pos2).name == "homedecor:jpn_door_top" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
fdir = minetest.get_node(pos).param2
|
||||
minetest.set_node(pos, {name = "homedecor:jpn_door_bottom_open", param2 = fdir})
|
||||
minetest.set_node({x = pos.x, y=pos.y + 1, z = pos.z}, {name = "homedecor:jpn_door_top_open", param2 = fdir})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:jpn_door_top", {
|
||||
tiles = {
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_door_top.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:jpn_door_bottom_open", {
|
||||
tiles = {
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_door_bottom.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1.5, -0.5, -0.0625, -0.5, 0.5, 0}, -- NodeBox1
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1.5, -0.5, -0.0625, 0.5, 1.5, 0},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
fdir = minetest.get_node(pos).param2
|
||||
minetest.set_node(pos, {name = "homedecor:jpn_door_bottom", param2 = fdir})
|
||||
minetest.set_node({x = pos.x, y=pos.y + 1, z = pos.z}, {name = "homedecor:jpn_door_top", param2 = fdir})
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(pos2).name == "homedecor:jpn_door_top_open" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end,
|
||||
drop = "homedecor:jpn_door_bottom",
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:jpn_door_top_open", {
|
||||
tiles = {
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_wall_edges.png",
|
||||
"homedecor_japanese_door_top.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1.5, -0.5, -0.0625, -0.5, 0.5, 0}, -- NodeBox1
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 },
|
||||
},
|
||||
})
|
||||
|
||||
|
173
mods/homedecor_modpack/homedecor/electronics.lua
Normal file
@ -0,0 +1,173 @@
|
||||
-- Various home electronics
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node('homedecor:speaker', {
|
||||
description = S("Large Stereo Speaker"),
|
||||
tiles = { 'homedecor_speaker_top.png',
|
||||
'homedecor_speaker_bottom.png',
|
||||
'homedecor_speaker_right.png',
|
||||
'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', {
|
||||
description = S("Small Surround Speaker"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
'homedecor_speaker_top.png',
|
||||
'homedecor_speaker_bottom.png',
|
||||
'homedecor_speaker_right.png',
|
||||
'homedecor_speaker_left.png',
|
||||
'homedecor_speaker_back.png',
|
||||
'homedecor_speaker_front.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 }
|
||||
},
|
||||
node_box = {
|
||||
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', {
|
||||
description = S("Stereo Receiver"),
|
||||
tiles = { 'homedecor_stereo_top.png',
|
||||
'homedecor_stereo_bottom.png',
|
||||
'homedecor_stereo_right.png',
|
||||
'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', {
|
||||
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(),
|
||||
paramtype2 = 'wallmounted',
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_side = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:television', {
|
||||
description = S("Small CRT Television"),
|
||||
tiles = { 'homedecor_television_top.png',
|
||||
'homedecor_television_bottom.png',
|
||||
'homedecor_television_right.png',
|
||||
'homedecor_television_left.png',
|
||||
'homedecor_television_back.png',
|
||||
{ name="homedecor_television_front_animated.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=80.0
|
||||
}
|
||||
}
|
||||
},
|
||||
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", {
|
||||
description = S("DVD and VCR"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_dvdvcr_top.png",
|
||||
"homedecor_dvdvcr_bottom.png",
|
||||
"homedecor_dvdvcr_sides.png",
|
||||
"homedecor_dvdvcr_sides.png^[transformFX",
|
||||
"homedecor_dvdvcr_back.png",
|
||||
"homedecor_dvdvcr_front.png",
|
||||
},
|
||||
inventory_image = "homedecor_dvdvcr_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, -0.25, 0.3125, -0.375, 0.1875},
|
||||
{-0.25, -0.5, -0.25, 0.25, -0.1875, 0.125},
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:telephone", {
|
||||
tiles = {
|
||||
"homedecor_telephone_top.png",
|
||||
"homedecor_telephone_bottom.png",
|
||||
"homedecor_telephone_sides.png",
|
||||
"homedecor_telephone_sides.png",
|
||||
"homedecor_telephone_sides.png",
|
||||
"homedecor_telephone_sides.png"
|
||||
},
|
||||
inventory_image = "homedecor_telephone_inv.png",
|
||||
description = "Telephone",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1875, -0.5, -0.1875, 0.1875, -0.4375, 0.15}, -- NodeBox1
|
||||
{-0.125, -0.5, -0.130, 0.125, -0.3675, 0.15}, -- NodeBox2
|
||||
{-0.175, -0.4375, -0.175, 0.175, -0.42, 0.15}, -- NodeBox3
|
||||
{-0.16, -0.42, -0.16, 0.16, -0.4025, 0.15}, -- NodeBox4
|
||||
{-0.145, -0.4025, -0.145, 0.145, -0.385, 0.15}, -- NodeBox5
|
||||
{-0.11, -0.385, -0.115, 0.11, -0.35, 0.15}, -- NodeBox6
|
||||
{-0.095, -0.5, -0.1, 0.095, -0.3325, 0.15}, -- NodeBox7
|
||||
{-0.075, -0.345, 0.15, 0.075, -0.32, -0.075}, -- NodeBox8
|
||||
{0.04, -0.375, 0.0125, 0.0625, -0.23, 0.11}, -- NodeBox9
|
||||
{-0.0625, -0.375, 0.0125, -0.04, -0.23, 0.11}, -- NodeBox10
|
||||
{-0.2075, -0.25, 0.0375, 0.2075, -0.21, 0.0875}, -- NodeBox11
|
||||
{0.125, -0.3, 0, 0.25, -0.25, 0.125}, -- NodeBox12
|
||||
{-0.25, -0.3, 0, -0.125, -0.25, 0.125}, -- NodeBox13
|
||||
{0.125, -0.275, 0.017, 0.23, -0.225, 0.11}, -- NodeBox14
|
||||
{-0.23, -0.275, 0.017, -0.125, -0.225, 0.11}, -- NodeBox15
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.1875, 0.25, -0.21, 0.15 }
|
||||
}
|
||||
})
|
||||
|
498
mods/homedecor_modpack/homedecor/fences.lua
Normal file
@ -0,0 +1,498 @@
|
||||
-- This file adds fences of various types
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node("homedecor:fence_brass", {
|
||||
description = S("Brass Fence/railing"),
|
||||
drawtype = "fencelike",
|
||||
tiles = {"homedecor_tile_brass.png"},
|
||||
inventory_image = "homedecor_fence_brass.png",
|
||||
wield_image = "homedecor_pole_brass.png",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||
},
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
walkable = true,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_wrought_iron", {
|
||||
description = S("Wrought Iron Fence/railing"),
|
||||
drawtype = "fencelike",
|
||||
tiles = {"homedecor_tile_wrought_iron.png"},
|
||||
inventory_image = "homedecor_fence_wrought_iron.png",
|
||||
wield_image = "homedecor_pole_wrought_iron.png",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 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", {
|
||||
description = S("Brass Fence/railing with sign"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_sign_brass_post_top.png",
|
||||
"homedecor_sign_brass_post_bottom.png",
|
||||
"homedecor_sign_brass_post_side.png",
|
||||
"homedecor_sign_brass_post_side.png",
|
||||
"homedecor_sign_brass_post_back.png",
|
||||
"homedecor_sign_brass_post_front.png",
|
||||
},
|
||||
wield_image = "homedecor_sign_brass_post.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = signs_lib.sign_post_model.nodebox,
|
||||
groups = {snappy=3,not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
walkable = true,
|
||||
sunlight_propagates = true,
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{ items = { "default:sign_wall" }},
|
||||
{ items = { "homedecor:fence_brass" }},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor: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",
|
||||
"homedecor_sign_wrought_iron_post_side.png",
|
||||
"homedecor_sign_wrought_iron_post_side.png",
|
||||
"homedecor_sign_wrought_iron_post_back.png",
|
||||
"homedecor_sign_wrought_iron_post_front.png",
|
||||
},
|
||||
wield_image = "homedecor_sign_wrought_iron_post.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = signs_lib.sign_post_model.nodebox,
|
||||
groups = {snappy=3,not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
walkable = true,
|
||||
sunlight_propagates = true,
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{ items = { "default:sign_wall" }},
|
||||
{ items = { "homedecor:fence_wrought_iron" }},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- other types of fences
|
||||
|
||||
minetest.register_node("homedecor:fence_picket", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Unpainted Picket Fence"),
|
||||
tiles = {
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_fence_picket.png",
|
||||
"homedecor_fence_picket.png",
|
||||
"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 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_picket_corner", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Unpainted Picket Fence Corner"),
|
||||
tiles = {
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_fence_picket.png",
|
||||
"homedecor_fence_picket_backside.png",
|
||||
"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 },
|
||||
{ -0.5, -0.5, -0.5, -0.4, 0.5, 0.4 }
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.5, -0.5, 0.498, 0.5, 0.5, 0.5 },
|
||||
{ -0.5, -0.5, -0.5, -0.498, 0.5, 0.5 }
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_picket_white", {
|
||||
drawtype = "nodebox",
|
||||
description = S("White Picket Fence"),
|
||||
tiles = {
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_fence_picket_white.png",
|
||||
"homedecor_fence_picket_white.png",
|
||||
"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 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_picket_corner_white", {
|
||||
drawtype = "nodebox",
|
||||
description = S("White Picket Fence Corner"),
|
||||
tiles = {
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_blanktile.png",
|
||||
"homedecor_fence_picket_white.png",
|
||||
"homedecor_fence_picket_white_backside.png",
|
||||
"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 },
|
||||
{ -0.5, -0.5, -0.5, -0.4, 0.5, 0.4 }
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.5, -0.5, 0.498, 0.5, 0.5, 0.5 },
|
||||
{ -0.5, -0.5, -0.5, -0.498, 0.5, 0.5 }
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_privacy", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Wooden Privacy Fence"),
|
||||
tiles = {
|
||||
"homedecor_fence_privacy_tb.png",
|
||||
"homedecor_fence_privacy_tb.png",
|
||||
"homedecor_fence_privacy_sides.png",
|
||||
"homedecor_fence_privacy_sides.png",
|
||||
"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 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, 5/16, -5/16, 8/16, 7/16 }, -- left part
|
||||
{ -4/16, -8/16, 5/16, 3/16, 8/16, 7/16 }, -- middle part
|
||||
{ 4/16, -8/16, 5/16, 8/16, 8/16, 7/16 }, -- right part
|
||||
{ -8/16, -2/16, 7/16, 8/16, 2/16, 8/16 }, -- connecting rung
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_privacy_corner", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Wooden Privacy Fence Corner"),
|
||||
tiles = {
|
||||
"homedecor_fence_privacy_corner_top.png",
|
||||
"homedecor_fence_privacy_corner_bottom.png",
|
||||
"homedecor_fence_privacy_corner_right.png",
|
||||
"homedecor_fence_privacy_backside2.png",
|
||||
"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 = {
|
||||
{ -0.5, -0.5, 5/16, 0.5, 0.5, 0.5 },
|
||||
{ -0.5, -0.5, -0.5, -5/16, 0.5, 5/16 },
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -7/16, -8/16, 5/16, -5/16, 8/16, 7/16 }, -- left part
|
||||
{ -4/16, -8/16, 5/16, 3/16, 8/16, 7/16 }, -- middle part
|
||||
{ 4/16, -8/16, 5/16, 8/16, 8/16, 7/16 }, -- right part
|
||||
{ -8/16, -2/16, 7/16, 8/16, 2/16, 8/16 }, -- back-side connecting rung
|
||||
|
||||
{ -7/16, -8/16, 4/16, -5/16, 8/16, 7/16 }, -- back-most part
|
||||
{ -7/16, -8/16, -4/16, -5/16, 8/16, 3/16 }, -- middle part
|
||||
{ -7/16, -8/16, -8/16, -5/16, 8/16, -5/16 }, -- front-most part
|
||||
{ -8/16, -2/16, -8/16, -7/16, 2/16, 7/16 }, -- left-side connecting rung
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_barbed_wire", {
|
||||
drawtype = "nodebox",
|
||||
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 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ -6/16, -8/16, 7/16, 6/16, 8/16, 7/16 } -- the wire
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_barbed_wire_corner", {
|
||||
drawtype = "nodebox",
|
||||
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 = {
|
||||
{ -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 },
|
||||
{ -0.5, -0.5, -0.5, -0.375, 0.5, 0.375 }
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post
|
||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ -6/16, -8/16, 7/16, 6/16, 8/16, 7/16 }, -- the wire
|
||||
|
||||
{ -8/16, -8/16, -8/16, -6/16, 8/16, -6/16 }, -- front post
|
||||
{ -7/16, -8/16, -6/16, -7/16, 8/16, 6/16 } -- more wire
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_chainlink", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Chainlink Fence"),
|
||||
tiles = {
|
||||
"homedecor_fence_chainlink_tb.png",
|
||||
"homedecor_fence_chainlink_tb.png",
|
||||
"homedecor_fence_chainlink_sides.png",
|
||||
"homedecor_fence_chainlink_sides.png",
|
||||
"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 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, 6/16, -7/16, 8/16, 8/16 }, -- left post
|
||||
{ 7/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece
|
||||
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } -- the chainlink itself
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_chainlink_corner", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Chainlink Fence Corner"),
|
||||
tiles = {
|
||||
"homedecor_fence_chainlink_corner_top.png",
|
||||
"homedecor_fence_chainlink_corner_bottom.png",
|
||||
"homedecor_fence_chainlink_corner_left.png",
|
||||
"homedecor_fence_chainlink_corner_right.png",
|
||||
"homedecor_fence_chainlink_corner_front.png",
|
||||
"homedecor_fence_chainlink_corner_back.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 },
|
||||
{ -0.5, -0.5, -0.5, -0.375, 0.5, 0.375 }
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post, rear
|
||||
{ -8/16, -8/16, -8/16, -6/16, 8/16, -7/16 }, -- left post, front
|
||||
{ 7/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post, rear
|
||||
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece, rear
|
||||
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece, rear
|
||||
{ -15/32, 7/16, -8/16, -13/32, 8/16, 8/16 }, -- top piece, side
|
||||
{ -15/32, -8/16, -8/16, -13/32, -7/16, 8/16 }, -- bottom piece, side
|
||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 }, -- the chainlink itself, rear
|
||||
{ -7/16, -8/16, -8/16, -7/16, 8/16, 8/16 } -- the chainlink itself, side
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_wrought_iron_2", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Wrought Iron fence (type 2)"),
|
||||
tiles = {
|
||||
"homedecor_fence_wrought_iron_2_tb.png",
|
||||
"homedecor_fence_wrought_iron_2_tb.png",
|
||||
"homedecor_fence_wrought_iron_2_sides.png",
|
||||
"homedecor_fence_wrought_iron_2_sides.png",
|
||||
"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 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, 14/32, -7.75/16, 8/16, 16/32 }, -- left post
|
||||
{ 7.75/16, -8/16, 14/32, 8/16, 8/16, 16/32 }, -- right post
|
||||
{ -8/16, 7.75/16, 14/32, 8/16, 8/16, 16/32 }, -- top piece
|
||||
{ -8/16, -0.015625, 14.75/32, 8/16, 0.015625, 15.25/32 }, -- cross piece
|
||||
{ -0.015625, -8/16, 14.75/32, 0.015625, 8/16, 15.25/32 }, -- cross piece
|
||||
{ -8/16, -8/16, 14/32, 8/16, -7.75/16, 16/32 }, -- bottom piece
|
||||
{ -8/16, -8/16, 15/32, 8/16, 8/16, 15/32 } -- the grid itself
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:fence_wrought_iron_2_corner", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Wrought Iron fence (type 2) Corner"),
|
||||
tiles = {
|
||||
"homedecor_fence_corner_wrought_iron_2_tb.png",
|
||||
"homedecor_fence_corner_wrought_iron_2_tb.png",
|
||||
"homedecor_fence_corner_wrought_iron_2_lr.png",
|
||||
"homedecor_fence_corner_wrought_iron_2_lr.png^[transformFX",
|
||||
"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 = {
|
||||
{ -0.5, -0.5, 0.42, 0.5, 0.5, 0.5 },
|
||||
{ -0.5, -0.5, -0.5, -0.42, 0.5, 0.5 }
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.5, -0.5, 0.453125, -0.453125, 0.5, 0.5 }, -- corner edge
|
||||
{ -7.5/16, 7.75/16, 14/32, 8/16, 8/16, 16/32 }, -- top piece
|
||||
{ -7.5/16, -8/16, 14/32, 8/16, -7.75/16, 16/32 }, -- bottom piece
|
||||
{ -16/32, 7.75/16, -8/16, -14/32, 8/16, 8/16 }, -- top piece, side
|
||||
{ -16/32, -8/16, -8/16, -14/32, -7.75/16, 8/16 }, -- bottom piece, side
|
||||
{ -7.5/16, -8/16, 7.5/16, 8/16, 8/16, 7.5/16 }, -- the grid itself
|
||||
{ -7.5/16, -8/16, -8/16, -7.5/16, 8/16, 7.5/16 }, -- the grid itself, side
|
||||
{ -15.5/32, -0.5, -0.5, -14.5/32, 0.5, -0.484375 }, -- left post side
|
||||
{ 7.75/16, -8/16, 14.5/32, 8/16, 8/16, 15.5/32 }, -- right post
|
||||
{ -8/16, -0.015625, 14.75/32, 8/16, 0.015625, 15.25/32 }, -- cross piece
|
||||
{ -0.015625, -8/16, 14.75/32, 0.015625, 8/16, 15.25/32 }, -- cross piece
|
||||
{ -15.25/32, -0.5, -0.015625, -14.75/32, 0.5, 0.015625 }, -- cross piece side
|
||||
{ -15.25/32, -0.015625, -0.5, -14.75/32, 0.015625, 0.5 } -- cross piece side
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
signs_lib.register_fence_with_sign("homedecor:fence_brass", "homedecor:fence_brass_with_sign")
|
||||
signs_lib.register_fence_with_sign("homedecor:fence_wrought_iron", "homedecor:fence_wrought_iron_with_sign")
|
389
mods/homedecor_modpack/homedecor/furnaces.lua
Normal file
@ -0,0 +1,389 @@
|
||||
-- This code supplies an oven/stove. Basically it's just a copy of the default furnace with different textures.
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
local function hacky_swap_node(pos,name)
|
||||
local node = minetest.get_node(pos)
|
||||
if node.name == name then
|
||||
return
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local meta0 = meta:to_table()
|
||||
node.name = name
|
||||
local meta0 = meta:to_table()
|
||||
minetest.set_node(pos,node)
|
||||
meta = minetest.get_meta(pos)
|
||||
meta:from_table(meta0)
|
||||
end
|
||||
|
||||
local function make_formspec(furnacedef, percent)
|
||||
|
||||
local fire
|
||||
|
||||
if percent and (percent > 0) then
|
||||
fire = ("%s^[lowpart:%d:%s"):format(
|
||||
furnacedef.fire_bg,
|
||||
(100-percent),
|
||||
furnacedef.fire_fg
|
||||
)
|
||||
else
|
||||
fire = "default_furnace_fire_bg.png"
|
||||
end
|
||||
|
||||
local w = furnacedef.output_width
|
||||
local h = math.ceil(furnacedef.output_slots / furnacedef.output_width)
|
||||
|
||||
return "size["..math.max(8, 6 + w)..",9]"..
|
||||
"image[2,2;1,1;"..fire.."]"..
|
||||
"list[current_name;fuel;2,3;1,1;]"..
|
||||
"list[current_name;src;2,1;1,1;]"..
|
||||
"list[current_name;dst;5,1;"..w..","..h..";]"..
|
||||
"list[current_player;main;0,5;8,4;]"
|
||||
end
|
||||
|
||||
--[[
|
||||
furnacedef = {
|
||||
description = "Oven",
|
||||
tiles = { ... },
|
||||
tiles_active = { ... },
|
||||
^ +Y -Y +X -X +Z -Z
|
||||
tile_format = "oven_%s%s.png",
|
||||
^ First '%s' replaced by one of "top", "bottom", "side", "front".
|
||||
^ Second '%s' replaced by "" for inactive, and "_active" for active "front"
|
||||
^ "side" is used for left, right and back.
|
||||
^ tiles_active for front is set
|
||||
output_slots = 4,
|
||||
output_width = 2,
|
||||
cook_speed = 1,
|
||||
^ Higher values cook stuff faster.
|
||||
extra_nodedef_fields = { ... },
|
||||
^ Stuff here is copied verbatim into both active and inactive nodedefs
|
||||
^ Useful for overriding drawtype, etc.
|
||||
}
|
||||
]]
|
||||
|
||||
local function make_tiles(tiles, fmt, active)
|
||||
if not fmt then return tiles end
|
||||
tiles = { }
|
||||
for i,side in ipairs{"top", "bottom", "side", "side", "side", "front"} do
|
||||
if active and (i == 6) then
|
||||
tiles[i] = fmt:format(side, "_active")
|
||||
else
|
||||
tiles[i] = fmt:format(side, "")
|
||||
end
|
||||
end
|
||||
return tiles
|
||||
end
|
||||
|
||||
function homedecor.register_furnace(name, furnacedef)
|
||||
|
||||
local furnacedef = furnacedef
|
||||
|
||||
local tiles = make_tiles(furnacedef.tiles, furnacedef.tile_format, false)
|
||||
local tiles_active = make_tiles(furnacedef.tiles_active, furnacedef.tile_format, true)
|
||||
|
||||
furnacedef.fire_fg = furnacedef.fire_bg or "default_furnace_fire_fg.png"
|
||||
furnacedef.fire_bg = furnacedef.fire_bg or "default_furnace_fire_bg.png"
|
||||
|
||||
furnacedef.output_slots = furnacedef.output_slots or 4
|
||||
furnacedef.output_width = furnacedef.output_width or 2
|
||||
|
||||
furnacedef.cook_speed = furnacedef.cook_speed or 1
|
||||
|
||||
local name_active = name.."_active"
|
||||
|
||||
local desc = furnacedef.description or "Furnace"
|
||||
|
||||
local def = {
|
||||
description = furnacedef.description,
|
||||
tiles = tiles,
|
||||
paramtype2 = furnacedef.paramtype2 or "facedir",
|
||||
groups = furnacedef.groups or {cracky=2},
|
||||
legacy_facedir_simple = true,
|
||||
sounds = furnacedef.sounds or default.node_sound_wood_defaults(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
meta:set_string("infotext", desc)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("fuel", 1)
|
||||
inv:set_size("src", 1)
|
||||
inv:set_size("dst", furnacedef.output_slots)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty("fuel") then
|
||||
return false
|
||||
elseif not inv:is_empty("dst") then
|
||||
return false
|
||||
elseif not inv:is_empty("src") then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if listname == "fuel" then
|
||||
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
||||
if inv:is_empty("src") then
|
||||
meta:set_string("infotext", S("%s is empty"):format(desc))
|
||||
end
|
||||
return stack:get_count()
|
||||
else
|
||||
return 0
|
||||
end
|
||||
elseif listname == "src" then
|
||||
return stack:get_count()
|
||||
elseif listname == "dst" then
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local stack = inv:get_stack(from_list, from_index)
|
||||
if to_list == "fuel" then
|
||||
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
||||
if inv:is_empty("src") then
|
||||
meta:set_string("infotext", S("%s is empty"):format(desc))
|
||||
end
|
||||
return count
|
||||
else
|
||||
return 0
|
||||
end
|
||||
elseif to_list == "src" then
|
||||
return count
|
||||
elseif to_list == "dst" then
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local def_active = {
|
||||
description = furnacedef.description.." (active)",
|
||||
tiles = tiles_active,
|
||||
paramtype = furnacedef.paramtype,
|
||||
paramtype2 = furnacedef.paramtype2 or "facedir",
|
||||
light_source = 8,
|
||||
drop = name,
|
||||
groups = furnacedef.groups or {cracky=2, not_in_creative_inventory=1},
|
||||
legacy_facedir_simple = true,
|
||||
sounds = furnacedef.sounds or default.node_sound_stone_defaults(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
meta:set_string("infotext", desc)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("fuel", 1)
|
||||
inv:set_size("src", 1)
|
||||
inv:set_size("dst", furnacedef.output_slots)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty("fuel") then
|
||||
return false
|
||||
elseif not inv:is_empty("dst") then
|
||||
return false
|
||||
elseif not inv:is_empty("src") then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if listname == "fuel" then
|
||||
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
||||
if inv:is_empty("src") then
|
||||
meta:set_string("infotext",S("%s is empty"):format(desc))
|
||||
end
|
||||
return stack:get_count()
|
||||
else
|
||||
return 0
|
||||
end
|
||||
elseif listname == "src" then
|
||||
return stack:get_count()
|
||||
elseif listname == "dst" then
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local stack = inv:get_stack(from_list, from_index)
|
||||
if to_list == "fuel" then
|
||||
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
|
||||
if inv:is_empty("src") then
|
||||
meta:set_string("infotext",S("%s is empty"):format(desc))
|
||||
end
|
||||
return count
|
||||
else
|
||||
return 0
|
||||
end
|
||||
elseif to_list == "src" then
|
||||
return count
|
||||
elseif to_list == "dst" then
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
if furnacedef.extra_nodedef_fields then
|
||||
for k, v in pairs(furnacedef.extra_nodedef_fields) do
|
||||
def[k] = v
|
||||
def_active[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node(name, def)
|
||||
minetest.register_node(name_active, def_active)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {name, name_active, name.."_locked", name_active.."_locked"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta(pos)
|
||||
for i, name in ipairs({
|
||||
"fuel_totaltime",
|
||||
"fuel_time",
|
||||
"src_totaltime",
|
||||
"src_time"
|
||||
}) do
|
||||
if meta:get_string(name) == "" then
|
||||
meta:set_float(name, 0.0)
|
||||
end
|
||||
end
|
||||
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
local srclist = inv:get_list("src")
|
||||
local cooked = nil
|
||||
local aftercooked
|
||||
|
||||
if srclist then
|
||||
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
end
|
||||
|
||||
local was_active = false
|
||||
|
||||
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
||||
was_active = true
|
||||
meta:set_float("fuel_time", meta:get_float("fuel_time") + 1)
|
||||
meta:set_float("src_time", meta:get_float("src_time") + furnacedef.cook_speed)
|
||||
if cooked and cooked.item and meta:get_float("src_time") >= cooked.time then
|
||||
-- check if there's room for output in "dst" list
|
||||
if inv:room_for_item("dst",cooked.item) then
|
||||
-- Put result in "dst" list
|
||||
inv:add_item("dst", cooked.item)
|
||||
-- take stuff from "src" list
|
||||
inv:set_stack("src", 1, aftercooked.items[1])
|
||||
else
|
||||
print(S("Could not insert '%s'"):format(cooked.item:to_string()))
|
||||
end
|
||||
meta:set_string("src_time", 0)
|
||||
end
|
||||
end
|
||||
|
||||
-- XXX: Quick patch, make it better in the future.
|
||||
local locked = node.name:find("_locked$") and "_locked" or ""
|
||||
local desc = minetest.registered_nodes[name..locked].description
|
||||
|
||||
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
||||
local percent = math.floor(meta:get_float("fuel_time") /
|
||||
meta:get_float("fuel_totaltime") * 100)
|
||||
meta:set_string("infotext",S("%s active: %d%%"):format(desc,percent))
|
||||
hacky_swap_node(pos,name_active..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, percent))
|
||||
return
|
||||
end
|
||||
|
||||
local fuel = nil
|
||||
local afterfuel
|
||||
local cooked = nil
|
||||
local fuellist = inv:get_list("fuel")
|
||||
local srclist = inv:get_list("src")
|
||||
|
||||
if srclist then
|
||||
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
end
|
||||
if fuellist then
|
||||
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
||||
end
|
||||
|
||||
if (not fuel) or (fuel.time <= 0) then
|
||||
meta:set_string("infotext",desc..S(": Out of fuel"))
|
||||
hacky_swap_node(pos,name..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
return
|
||||
end
|
||||
|
||||
if cooked.item:is_empty() then
|
||||
if was_active then
|
||||
meta:set_string("infotext",S("%s is empty"):format(desc))
|
||||
hacky_swap_node(pos,name..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if not inv:room_for_item("dst", cooked.item) then
|
||||
meta:set_string("infotext", desc..S(": output bins are full"))
|
||||
hacky_swap_node(pos, name..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
return
|
||||
end
|
||||
|
||||
meta:set_string("fuel_totaltime", fuel.time)
|
||||
meta:set_string("fuel_time", 0)
|
||||
|
||||
inv:set_stack("fuel", 1, afterfuel.items[1])
|
||||
end,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
homedecor.register_furnace("homedecor:oven", {
|
||||
description = S("Oven"),
|
||||
tile_format = "homedecor_oven_%s%s.png",
|
||||
output_slots = 4,
|
||||
output_width = 2,
|
||||
cook_speed = 1.25,
|
||||
})
|
||||
|
||||
homedecor.register_furnace("homedecor:oven_steel", {
|
||||
description = S("Oven (stainless steel)"),
|
||||
tile_format = "homedecor_oven_steel_%s%s.png",
|
||||
output_slots = 4,
|
||||
output_width = 2,
|
||||
cook_speed = 1.25,
|
||||
})
|
||||
|
||||
homedecor.register_furnace("homedecor:microwave_oven", {
|
||||
description = S("Microwave Oven"),
|
||||
tiles = {
|
||||
"homedecor_microwave_top.png", "homedecor_microwave_bottom.png",
|
||||
"homedecor_microwave_right.png", "homedecor_microwave_left.png",
|
||||
"homedecor_microwave_back.png", "homedecor_microwave_front.png"
|
||||
},
|
||||
tiles_active = {
|
||||
"homedecor_microwave_top.png", "homedecor_microwave_bottom.png",
|
||||
"homedecor_microwave_right.png", "homedecor_microwave_left.png",
|
||||
"homedecor_microwave_back.png", "homedecor_microwave_front_active.png"
|
||||
},
|
||||
output_slots = 2,
|
||||
output_width = 2,
|
||||
cook_speed = 1.5,
|
||||
extra_nodedef_fields = {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
--paramtype2 = "facedir", -- Not needed, set by register_furnace
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { { -0.5, -0.5, -0.125, 0.5, 0.125, 0.5 } },
|
||||
},
|
||||
},
|
||||
})
|
830
mods/homedecor_modpack/homedecor/furniture.lua
Normal file
@ -0,0 +1,830 @@
|
||||
local S = homedecor.gettext
|
||||
|
||||
-- 3dforniture tables ... well, they used to be :P
|
||||
|
||||
local table_colors = { "", "mahogany", "white" }
|
||||
|
||||
for _, i in ipairs(table_colors) do
|
||||
local color = "_"..i
|
||||
local desc = S("Table ("..i..")")
|
||||
|
||||
if i == "" then
|
||||
color = ""
|
||||
desc = S("Table")
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:table"..color, {
|
||||
description = desc,
|
||||
tiles = { "forniture_wood"..color..".png" },
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.4, -0.5, -0.4, -0.3, 0.4, -0.3 },
|
||||
{ 0.3, -0.5, -0.4, 0.4, 0.4, -0.3 },
|
||||
{ -0.4, -0.5, 0.3, -0.3, 0.4, 0.4 },
|
||||
{ 0.3, -0.5, 0.3, 0.4, 0.4, 0.4 },
|
||||
{ -0.5, 0.4, -0.5, 0.5, 0.5, 0.5 },
|
||||
{ -0.4, -0.2, -0.3, -0.3, -0.1, 0.3 },
|
||||
{ 0.3, -0.2, -0.4, 0.4, -0.1, 0.3 },
|
||||
{ -0.3, -0.2, -0.4, 0.4, -0.1, -0.3 },
|
||||
{ -0.3, -0.2, 0.3, 0.3, -0.1, 0.4 },
|
||||
},
|
||||
},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
})
|
||||
end
|
||||
|
||||
local chaircolors = {
|
||||
{ "", "plain" },
|
||||
{ "black", "Black" },
|
||||
{ "red", "Red" },
|
||||
{ "pink", "Pink" },
|
||||
{ "violet", "Violet" },
|
||||
{ "blue", "Blue" },
|
||||
{ "dark_green", "Dark Green" },
|
||||
}
|
||||
|
||||
for i in ipairs(chaircolors) do
|
||||
|
||||
local color = "_"..chaircolors[i][1]
|
||||
local color2 = chaircolors[i][1]
|
||||
local name = S(chaircolors[i][2])
|
||||
|
||||
if chaircolors[i][1] == "" then
|
||||
color = ""
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:chair"..color, {
|
||||
description = S("Kitchen chair (%s)"):format(name),
|
||||
tiles = {
|
||||
"forniture_kitchen_chair_top"..color..".png",
|
||||
"forniture_wood.png",
|
||||
"forniture_kitchen_chair_sides"..color..".png",
|
||||
"forniture_kitchen_chair_sides"..color..".png^[transformFX",
|
||||
"forniture_kitchen_chair_back"..color..".png",
|
||||
"forniture_kitchen_chair_front"..color..".png",
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, 0.1875, -0.1875, 0.5, 0.3125},
|
||||
{0.1875, -0.5, 0.1875, 0.3125, 0.5, 0.3125},
|
||||
{-0.3125, -0.5, -0.3125, -0.1875, 0, -0.1875},
|
||||
{0.1875, -0.5, -0.3125, 0.3125, 0, -0.1875},
|
||||
{-0.3125, -0.125, -0.3125, 0.3125, 0, 0.3125},
|
||||
{-0.25, 0.0625, 0.25, 0.25, 0.4375, 0.25},
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
||||
},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
})
|
||||
|
||||
if color ~= "" then
|
||||
minetest.register_node("homedecor: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 = {
|
||||
{ -0.50, -0.50, -0.45, -0.30, 0.05, 0.30 },
|
||||
{ -0.45, -0.50, -0.50, -0.35, 0.05, -0.45 },
|
||||
{ -0.45, 0.05, -0.45, -0.35, 0.10, 0.15 },
|
||||
{ 0.30, -0.50, -0.45, 0.50, 0.05, 0.30 },
|
||||
{ 0.35, -0.50, -0.50, 0.45, 0.05, -0.45 },
|
||||
{ 0.35, 0.05, -0.45, 0.45, 0.10, 0.15 },
|
||||
{ -0.50, -0.50, 0.30, 0.50, 0.45, 0.50 },
|
||||
{ -0.45, 0.45, 0.35, 0.45, 0.50, 0.45 },
|
||||
{ -0.30, -0.45, -0.35, 0.30, -0.10, 0.30 },
|
||||
{ -0.30, -0.45, -0.40, 0.30, -0.15, -0.35 },
|
||||
{ -0.50, 0.05, 0.15, -0.30, 0.45, 0.30 },
|
||||
{ -0.45, 0.10, 0.10, -0.35, 0.45, 0.15 },
|
||||
{ -0.45, 0.45, 0.15, -0.35, 0.50, 0.35 },
|
||||
{ 0.30, 0.05, 0.15, 0.50, 0.45, 0.30 },
|
||||
{ 0.35, 0.10, 0.10, 0.45, 0.45, 0.15 },
|
||||
{ 0.35, 0.45, 0.15, 0.45, 0.50, 0.35 },
|
||||
},
|
||||
},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:armchair"..color.." 2",
|
||||
recipe = {
|
||||
{ "wool:"..color2,""},
|
||||
{ "group:wood","group:wood" },
|
||||
{ "wool:"..color2,"wool:"..color2 },
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node(":homedecor:openframe_bookshelf", {
|
||||
description = "Bookshelf (open-frame)",
|
||||
drawtype = "nodebox",
|
||||
is_ground_content = false,
|
||||
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
tiles = {
|
||||
"3dbookshelf_openframe_top.png",
|
||||
"3dbookshelf_openframe_bottom.png",
|
||||
"3dbookshelf_openframe_right.png",
|
||||
"3dbookshelf_openframe_left.png",
|
||||
"3dbookshelf_openframe_back.png",
|
||||
"3dbookshelf_openframe_front.png"
|
||||
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4375, -0.5, 0, -0.375, 0.5, 0.5},
|
||||
{0.375, -0.5, 0, 0.4375, 0.5, 0.5},
|
||||
{-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.0625, 0.5},
|
||||
{-0.375, 0.0625, 0.176, -0.25, 0.5, 0.5},
|
||||
{-0.25, 0.0625, 0.253, -0.1875, 0.4375, 0.5},
|
||||
{-0.1875, 0.0625, 0.227, -0.125, 0.5, 0.5},
|
||||
{-0.125, 0.0625, 0.176, 0, 0.4375, 0.5},
|
||||
{0, 0.0625, 0.232, 0.0625, 0.375, 0.5},
|
||||
{0.0625, 0.0625, 0.130, 0.1875, 0.5, 0.5},
|
||||
{0.1875, 0.0625, 0.217, 0.25, 0.4375, 0.5},
|
||||
{0.25, 0.0625, 0.166, 0.3125, 0.5, 0.5},
|
||||
{0.3125, 0.0625, 0.242, 0.375, 0.4375, 0.5},
|
||||
{-0.375, -0.4375, 0.191, -0.3125, -0.0625, 0.5},
|
||||
{-0.3125, -0.4375, 0.191, -0.1875, -0.125, 0.5},
|
||||
{-0.1875, -0.4375, 0.227, -0.125, -0.0625, 0.5},
|
||||
{-0.125, -0.4375, 0.0737, 0, -0.0625, 0.5},
|
||||
{0, -0.4375, 0.145, 0.0625, -0.125, 0.5},
|
||||
{0.0625, -0.4375, 0.212, 0.125, -0.1875, 0.5},
|
||||
{0.125, -0.4375, 0.207, 0.1875, -0.125, 0.5},
|
||||
{0.1875, -0.4375, 0.176, 0.25, -0.125, 0.5},
|
||||
{0.25, -0.4375, 0.258, 0.3125, -0.1875, 0.5},
|
||||
{0.3125, -0.4375, 0.130, 0.375, -0.0625, 0.5}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
local bedcolors = {
|
||||
"red",
|
||||
"green",
|
||||
"blue",
|
||||
"violet",
|
||||
"brown",
|
||||
"darkgrey",
|
||||
"orange",
|
||||
"yellow",
|
||||
"pink",
|
||||
}
|
||||
|
||||
local function bed_extension(pos, color)
|
||||
|
||||
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
||||
local thisnode = minetest.get_node(pos)
|
||||
local bottomnode = minetest.get_node({x=pos.x, y=pos.y-1.0, z=pos.z})
|
||||
|
||||
local fdir = thisnode.param2
|
||||
|
||||
if string.find(topnode.name, "homedecor:bed_.*_foot$") then
|
||||
if fdir == topnode.param2 then
|
||||
local newnode = string.gsub(thisnode.name, "_foot", "_footext")
|
||||
minetest.set_node(pos, { name = newnode, param2 = fdir})
|
||||
end
|
||||
end
|
||||
|
||||
if string.find(bottomnode.name, "homedecor:bed_.*_foot$") then
|
||||
if fdir == bottomnode.param2 then
|
||||
local newnode = string.gsub(bottomnode.name, "_foot", "_footext")
|
||||
minetest.set_node({x=pos.x, y=pos.y-1.0, z=pos.z}, { name = newnode, param2 = fdir})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function unextend_bed(pos, color)
|
||||
local bottomnode = minetest.get_node({x=pos.x, y=pos.y-1.0, z=pos.z})
|
||||
local fdir = bottomnode.param2
|
||||
if string.find(bottomnode.name, "homedecor:bed_.*_footext$") then
|
||||
local newnode = string.gsub(bottomnode.name, "_footext", "_foot")
|
||||
minetest.set_node({x=pos.x, y=pos.y-1.0, z=pos.z}, { name = newnode, param2 = fdir})
|
||||
end
|
||||
end
|
||||
|
||||
for _, color in ipairs(bedcolors) do
|
||||
|
||||
minetest.register_node("homedecor:bed_"..color.."_head", {
|
||||
tiles = {
|
||||
"homedecor_bed_"..color.."_top1.png",
|
||||
"homedecor_bed_bottom1.png",
|
||||
"homedecor_bed_"..color.."_side1.png",
|
||||
"homedecor_bed_"..color.."_side1.png^[transformFX",
|
||||
"homedecor_bed_head1.png",
|
||||
"homedecor_bed_"..color.."_head2.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3, not_in_creative_inventory=1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0.4375, -0.375, 0.5, 0.5}, -- NodeBox1
|
||||
{0.375, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox2
|
||||
{-0.5, 0.25, 0.4375, 0.5, 0.4375, 0.5}, -- NodeBox3
|
||||
{-0.5, -0.0625, 0.4375, 0.5, 0.1875, 0.5}, -- NodeBox4
|
||||
{-0.5, -0.375, -0.5, 0.5, -0.125, 0.5}, -- NodeBox5
|
||||
{0.375, -0.375, -0.5, 0.4375, -0.125, 0.5}, -- NodeBox6
|
||||
{-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375}, -- NodeBox7
|
||||
{-0.3125, -0.125, 0.0625, 0.3125, 0.0625, 0.4375}, -- NodeBox8
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bed_"..color.."_foot", {
|
||||
tiles = {
|
||||
"homedecor_bed_"..color.."_top2.png",
|
||||
"homedecor_bed_bottom2.png",
|
||||
"homedecor_bed_"..color.."_side2.png",
|
||||
"homedecor_bed_"..color.."_side2.png^[transformFX",
|
||||
"homedecor_bed_foot2.png",
|
||||
"homedecor_bed_"..color.."_foot1.png"
|
||||
},
|
||||
inventory_image = "homedecor_bed_"..color.."_inv.png",
|
||||
description = S("Bed (%s)"):format(color),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, -0.375, 0.1875, -0.4375}, -- NodeBox1
|
||||
{0.375, -0.5, -0.5, 0.5, 0.1875, -0.4375}, -- NodeBox2
|
||||
{-0.5, 0, -0.5, 0.5, 0.125, -0.4375}, -- NodeBox3
|
||||
{-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375}, -- NodeBox4
|
||||
{-0.5, -0.375, -0.5, 0.5, -0.125, 0.5}, -- NodeBox5
|
||||
{0.375, -0.375, -0.5, 0.4375, -0.125, 0.5}, -- NodeBox6
|
||||
{-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, -- NodeBox7
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 1.5 }
|
||||
},
|
||||
on_construct = function(pos)
|
||||
bed_extension(pos, color)
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
|
||||
"homedecor:bed_"..color.."_foot", "homedecor:bed_"..color.."_head", false)
|
||||
end,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + homedecor.fdir_to_fwd[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_fwd[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:bed_"..color.."_head" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
unextend_bed(pos, color)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bed_"..color.."_footext", {
|
||||
tiles = {
|
||||
"homedecor_bed_"..color.."_top2.png",
|
||||
"homedecor_bed_bottom2.png",
|
||||
"homedecor_bed_"..color.."_side2ext.png",
|
||||
"homedecor_bed_"..color.."_side2ext.png^[transformFX",
|
||||
"homedecor_bed_foot2ext.png",
|
||||
"homedecor_bed_"..color.."_foot1ext.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3, not_in_creative_inventory=1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, -0.375, 0.5, -0.4375}, -- NodeBox1
|
||||
{0.375, -0.5, -0.5, 0.5, 0.5, -0.4375}, -- NodeBox2
|
||||
{-0.5, 0, -0.5, 0.5, 0.125, -0.4375}, -- NodeBox3
|
||||
{-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375}, -- NodeBox4
|
||||
{-0.5, -0.375, -0.5, 0.5, -0.125, 0.5}, -- NodeBox5
|
||||
{0.375, -0.375, -0.5, 0.4375, -0.125, 0.5}, -- NodeBox6
|
||||
{-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, -- NodeBox7
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 1.5 }
|
||||
},
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + homedecor.fdir_to_fwd[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_fwd[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:bed_"..color.."_head" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
unextend_bed(pos, color)
|
||||
end,
|
||||
drop = "homedecor:bed_"..color.."_foot"
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:wardrobe_top", {
|
||||
tiles = {
|
||||
"homedecor_wardrobe_top.png",
|
||||
"homedecor_wardrobe_bottom.png",
|
||||
"homedecor_wardrobe_sides1.png",
|
||||
"homedecor_wardrobe_sides1.png^[transformFX",
|
||||
"homedecor_wardrobe_back1.png",
|
||||
"homedecor_wardrobe_frontt.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3, not_in_creative_inventory=1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, -- NodeBox1
|
||||
{0.0625, -0.4375, -0.5, 0.4375, 0.4375, -0.4375}, -- NodeBox2
|
||||
{-0.4375, -0.4375, -0.5, -0.0625, 0.4375, -0.4375}, -- NodeBox3
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:wardrobe_bottom", {
|
||||
tiles = {
|
||||
"homedecor_wardrobe_top.png",
|
||||
"homedecor_wardrobe_bottom.png",
|
||||
"homedecor_wardrobe_sides2.png",
|
||||
"homedecor_wardrobe_sides2.png^[transformFX",
|
||||
"homedecor_wardrobe_back2.png",
|
||||
"homedecor_wardrobe_frontb.png"
|
||||
},
|
||||
inventory_image = "homedecor_wardrobe_inv.png",
|
||||
description = "Wardrobe",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, -- NodeBox1
|
||||
{-0.4375, -0.375, -0.5, 0.4375, -0.125, -0.4375}, -- NodeBox2
|
||||
{-0.4375, -0.0625, -0.5, 0.4375, 0.1875, -0.4375}, -- NodeBox3
|
||||
{-0.4375, 0.25, -0.5, 0.4375, 0.5, -0.4375}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_vertically(itemstack, placer, pointed_thing,
|
||||
"homedecor:wardrobe_bottom", "homedecor:wardrobe_top")
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(pos2).name == "homedecor:wardrobe_top" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,8]"..
|
||||
"list[current_name;main;0,0;8,3;]"..
|
||||
"list[current_player;main;0,4;8,4;]")
|
||||
meta:set_string("infotext", S("Wardrobe cabinet"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 24)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in wardrobe at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to wardrobe at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from wardrobe at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:simple_bench", {
|
||||
tiles = {
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_bench_large_2_left_back.png",
|
||||
"homedecor_bench_large_2_left_front.png"
|
||||
},
|
||||
description = "Simple Bench",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.15, 0, 0.5, -0.05, 0.4},
|
||||
{-0.4, -0.5, 0.1, -0.3, -0.15, 0.3},
|
||||
{ 0.3, -0.5, 0.1, 0.4, -0.15, 0.3},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("homedecor:bench_large_1_left", {
|
||||
description = "Garden Bench (style 1)",
|
||||
tiles = {
|
||||
"homedecor_bench_large_1_left_top.png",
|
||||
"homedecor_bench_large_1_left_bottom.png",
|
||||
"homedecor_bench_large_1_ends.png^[transformFX",
|
||||
"homedecor_bench_large_1_ends.png",
|
||||
"homedecor_bench_large_1_left_back.png",
|
||||
"homedecor_bench_large_1_left_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_bench_large_1_inv.png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.25, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox1
|
||||
{-0.5, 0, 0.375, 0.5, 0.1875, 0.4375}, -- NodeBox2
|
||||
{-0.5, -0.125, 0.115, 0.5, -0.0625, 0.35}, -- NodeBox3
|
||||
{-0.5, -0.125, -0.0872, 0.5, -0.0625, 0.079}, -- NodeBox4
|
||||
{-0.3125, -0.5, 0.4375, -0.25, 0.375, 0.5}, -- NodeBox5
|
||||
{-0.3125, -0.25, -0.0625, -0.25, -0.125, 0.4375}, -- NodeBox6
|
||||
{-0.3125, -0.5, -0.0625, -0.25, -0.25, 0}, -- NodeBox7
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.09375, 1.5, 0.5, 0.5 }
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
|
||||
"homedecor:bench_large_1_left", "homedecor:bench_large_1_right", true)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + homedecor.fdir_to_right[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_right[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:bench_large_1_right" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bench_large_1_right", {
|
||||
tiles = {
|
||||
"homedecor_bench_large_1_right_top.png",
|
||||
"homedecor_bench_large_1_right_bottom.png",
|
||||
"homedecor_bench_large_1_ends.png^[transformFX",
|
||||
"homedecor_bench_large_1_ends.png",
|
||||
"homedecor_bench_large_1_right_back.png",
|
||||
"homedecor_bench_large_1_right_front.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.25, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox1
|
||||
{-0.5, 0, 0.375, 0.5, 0.1875, 0.4375}, -- NodeBox2
|
||||
{-0.5, -0.125, 0.115, 0.5, -0.0625, 0.35}, -- NodeBox3
|
||||
{-0.5, -0.125, -0.0872, 0.5, -0.0625, 0.079}, -- NodeBox4
|
||||
{0.25, -0.5, 0.4375, 0.3125, 0.375, 0.5}, -- NodeBox5
|
||||
{0.25, -0.25, -0.0625, 0.3125, -0.125, 0.5}, -- NodeBox6
|
||||
{0.25, -0.5, -0.0625, 0.3125, -0.25, 0}, -- NodeBox7
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("homedecor:bench_large_2_left", {
|
||||
description = "Garden Bench (style 2)",
|
||||
tiles = {
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_bench_large_2_left_back.png",
|
||||
"homedecor_bench_large_2_left_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_bench_large_2_inv.png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, -- NodeBox1
|
||||
{-0.375, 0.3125, 0.4375, 0.5, 0.4375, 0.5}, -- NodeBox2
|
||||
{-0.375, -0.0625, 0.4375, 0.5, 0.0625, 0.5}, -- NodeBox3
|
||||
{-0.3125, 0.0625, 0.45, -0.25, 0.3125, 0.48}, -- NodeBox4
|
||||
{-0.1875, 0.0625, 0.45, -0.125, 0.3125, 0.48}, -- NodeBox5
|
||||
{-0.0625, 0.0625, 0.45, 0, 0.3125, 0.48}, -- NodeBox6
|
||||
{0.0625, 0.0625, 0.45, 0.125, 0.3125, 0.48}, -- NodeBox7
|
||||
{0.1875, 0.0625, 0.45, 0.25, 0.3125, 0.48}, -- NodeBox8
|
||||
{0.3125, 0.0625, 0.45, 0.375, 0.3125, 0.48}, -- NodeBox9
|
||||
{0.4375, 0.0625, 0.45, 0.5, 0.3125, 0.48}, -- NodeBox10
|
||||
{-0.5, 0.0625, -0.145362, -0.375, 0.125, 0.375}, -- NodeBox11
|
||||
{-0.5, -0.5, -0.0625, -0.375, 0.0625, 0.0625}, -- NodeBox12
|
||||
{-0.4375, -0.125, -0.0625, 0.5, -0.0911603, 0.4375}, -- NodeBox13
|
||||
{-0.4375, -0.4375, 0.0625, -0.375, -0.3125, 0.375}, -- NodeBox14
|
||||
{-0.375, -0.342324, 0.25, 0.5, -0.4375, 0.1875}, -- NodeBox15
|
||||
{-0.5, -0.25, -0.0290173, 0.5, -0.125, 0.0125346}, -- NodeBox16
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.15625, 1.5, 0.5, 0.5 }
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
|
||||
"homedecor:bench_large_2_left", "homedecor:bench_large_2_right", true)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + homedecor.fdir_to_right[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_right[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:bench_large_2_right" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bench_large_2_right", {
|
||||
tiles = {
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_generic_wood.png",
|
||||
"homedecor_bench_large_2_right_back.png",
|
||||
"homedecor_bench_large_2_right_front.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, -- NodeBox1
|
||||
{-0.5, 0.3125, 0.4375, 0.375, 0.4375, 0.5}, -- NodeBox2
|
||||
{-0.5, -0.0625, 0.4375, 0.375, 0.0625, 0.5}, -- NodeBox3
|
||||
{-0.5, 0.0625, 0.45, -0.4375, 0.3125, 0.48}, -- NodeBox4
|
||||
{-0.375, 0.0625, 0.45, -0.3125, 0.3125, 0.48}, -- NodeBox5
|
||||
{-0.25, 0.0625, 0.45, -0.1875, 0.3125, 0.48}, -- NodeBox6
|
||||
{-0.125, 0.0625, 0.45, -0.0625, 0.3125, 0.48}, -- NodeBox7
|
||||
{0, 0.0625, 0.45, 0.0625, 0.3125, 0.48}, -- NodeBox8
|
||||
{0.125, 0.0625, 0.45, 0.1875, 0.3125, 0.48}, -- NodeBox9
|
||||
{0.25, 0.0625, 0.45, 0.3125, 0.3125, 0.48}, -- NodeBox10
|
||||
{0.375, 0.0625, -0.145362, 0.5, 0.125, 0.375}, -- NodeBox11
|
||||
{0.375, -0.5, -0.0625, 0.5, 0.125, 0.0625}, -- NodeBox12
|
||||
{0.375, -0.4375, 0.0625, 0.4375, -0.3125, 0.375}, -- NodeBox13
|
||||
{-0.5, -0.4375, 0.1875, 0.375, -0.342324, 0.25}, -- NodeBox14
|
||||
{-0.5, -0.125, -0.0625, 0.4375, -0.0911603, 0.4375}, -- NodeBox15
|
||||
{-0.5, -0.25, -0.0290173, 0.5, -0.125, 0.0125346}, -- NodeBox16
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:deckchair_head", {
|
||||
tiles = {
|
||||
"homedecor_deckchair_top_c1.png",
|
||||
"homedecor_deckchair_bottom.png",
|
||||
"homedecor_deckchair_sides.png",
|
||||
"homedecor_deckchair_sides.png^[transformFX",
|
||||
"homedecor_deckchair_back.png",
|
||||
"homedecor_deckchair_front.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.375, -0.3125, -0.0625, 0.375, -0.25, 0}, -- NodeBox1
|
||||
{-0.375, -0.25, 0, 0.375, -0.1875, 0.0625}, -- NodeBox2
|
||||
{-0.375, -0.1875, 0.0625, 0.375, -0.125, 0.125}, -- NodeBox3
|
||||
{-0.375, -0.125, 0.125, 0.375, -0.0625, 0.1875}, -- NodeBox4
|
||||
{-0.375, -0.0625, 0.1875, 0.375, 0, 0.25}, -- NodeBox5
|
||||
{-0.375, 0, 0.25, 0.375, 0.0625, 0.3125}, -- NodeBox6
|
||||
{-0.375, 0.0625, 0.3125, 0.375, 0.125, 0.375}, -- NodeBox7
|
||||
{-0.375, 0.125, 0.375, 0.375, 0.1875, 0.4375}, -- NodeBox8
|
||||
{-0.375, 0.1875, 0.4375, 0.375, 0.25, 0.5}, -- NodeBox9
|
||||
{-0.375, -0.375, -0.5, 0.375, -0.3125, 0.0625}, -- NodeBox10
|
||||
{0.3125, -0.1875, -0.5, 0.4375, -0.1575, 0.0625}, -- NodeBox11
|
||||
{-0.4375, -0.1875, -0.5, -0.3125, -0.1575, 0.0625}, -- NodeBox12
|
||||
{0.3125, -0.5, 0, 0.375, -0.25, 0.0625}, -- NodeBox13
|
||||
{-0.375, -0.5, 0, -0.3125, -0.25, 0.0625}, -- NodeBox14
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:deckchair_foot", {
|
||||
tiles = {
|
||||
"homedecor_deckchair_top_c2.png",
|
||||
"homedecor_deckchair_bottom.png",
|
||||
"homedecor_deckchair_sides.png",
|
||||
"homedecor_deckchair_sides.png^[transformFX",
|
||||
"homedecor_deckchair_front.png"
|
||||
},
|
||||
description = "Deck chair",
|
||||
inventory_image = "homedecor_deckchair_inv.png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.375, -0.375, -0.5, 0.375, -0.3125, 0.5}, -- NodeBox1
|
||||
{0.3125, -0.5, -0.5, 0.375, -0.375, -0.4375}, -- NodeBox2
|
||||
{-0.375, -0.5, -0.5, -0.3125, -0.375, -0.4375}, -- NodeBox3
|
||||
{0.3125, -0.1875, 0.3, 0.4375, -0.1575, 0.5}, -- NodeBox4
|
||||
{-0.4375, -0.1875, 0.3, -0.3125, -0.1575, 0.5}, -- NodeBox5
|
||||
{-0.365, -0.3125, 0.32, -0.3225, -0.1875, 0.4375}, -- NodeBox6
|
||||
{0.3225, -0.3125, 0.32, 0.365, -0.1875, 0.4375}, -- NodeBox7
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.45, -0.5, -0.5, 0.45, 0.35, 1.5 }
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
|
||||
"homedecor:deckchair_foot", "homedecor:deckchair_head", false)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + homedecor.fdir_to_fwd[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_fwd[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:deckchair_head" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor: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",
|
||||
fixed = {
|
||||
{-0.5, 0.4, 0.47, 0.5, 0.47, 0.5},
|
||||
{-0.5, 0.47, -0.1875, 0.5, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:grandfather_clock_bottom", {
|
||||
description = "Grandfather Clock",
|
||||
tiles = {
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_bottom.png"
|
||||
},
|
||||
inventory_image = "homedecor_grandfather_clock_inv.png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4, -0.5, -0.4, -0.3125, 0.5, 0.4}, -- NodeBox1
|
||||
{-0.3125, -0.4375, -0.3125, 0.3125, 0.5, 0.4}, -- NodeBox2
|
||||
{0.3125, -0.5, -0.4, 0.4, 0.5, 0.4}, -- NodeBox3
|
||||
{-0.3125, -0.5, -0.4, 0.3125, -0.405, 0.4}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.4, -0.5, -0.4, 0.4, 1.5, 0.4 }
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_vertically(itemstack, placer, pointed_thing,
|
||||
"homedecor:grandfather_clock_bottom", "homedecor:grandfather_clock_top")
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(pos2).name == "homedecor:grandfather_clock_top" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:grandfather_clock_top", {
|
||||
tiles = {
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_sides.png",
|
||||
"homedecor_grandfather_clock_top.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4, -0.5, -0.4, -0.3125, 0.5, 0.4}, -- NodeBox1
|
||||
{-0.3125, -0.1875, -0.4, 0.3125, 0.5, 0.4}, -- NodeBox2
|
||||
{0.3125, -0.5, -0.4, 0.4, 0.5, 0.4}, -- NodeBox3
|
||||
{-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.4}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
},
|
||||
})
|
||||
|
||||
-- Aliases for 3dforniture mod.
|
||||
|
||||
minetest.register_alias("3dforniture:table", "homedecor:table")
|
||||
minetest.register_alias("3dforniture:chair", "homedecor:chair")
|
||||
minetest.register_alias("3dforniture:armchair", "homedecor:armchair_black")
|
||||
minetest.register_alias("homedecor:armchair", "homedecor:armchair_black")
|
||||
|
||||
minetest.register_alias('table', 'homedecor:table')
|
||||
minetest.register_alias('chair', 'homedecor:chair')
|
||||
minetest.register_alias('armchair', 'homedecor:armchair')
|
203
mods/homedecor_modpack/homedecor/furniture_bathroom.lua
Normal file
@ -0,0 +1,203 @@
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node("homedecor:toilet", {
|
||||
description = S("Toilet"),
|
||||
tiles = { "forniture_marble.png" },
|
||||
drawtype = "nodebox",
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.20, -0.50, -0.20, 0.20, -0.45, 0.50, },
|
||||
{ -0.10, -0.45, -0.10, 0.10, 0.00, 0.50, },
|
||||
{ -0.30, -0.20, -0.30, 0.30, 0.00, 0.35, },
|
||||
{ -0.25, 0.00, -0.25, 0.25, 0.05, 0.25, },
|
||||
{ -0.30, 0.00, 0.30, 0.30, 0.40, 0.50, },
|
||||
{ -0.05, 0.40, 0.35, 0.05, 0.45, 0.45, },
|
||||
},
|
||||
},
|
||||
groups = {cracky=3,},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_punch = function (pos, node, puncher)
|
||||
node.name = "homedecor:toilet_open"
|
||||
minetest.set_node(pos, node)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:toilet_open", {
|
||||
tiles = {
|
||||
"forniture_marble_top_toilet.png",
|
||||
"forniture_marble.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.20, -0.50, -0.20, 0.20, -0.45, 0.50, },
|
||||
{ -0.10, -0.45, -0.10, 0.10, -0.20, 0.50, },
|
||||
{ -0.10, -0.20, 0.30, 0.10, 0.00, 0.50, },
|
||||
{ -0.30, -0.20, 0.10, 0.30, 0.00, 0.35, },
|
||||
{ -0.30, -0.20, -0.30, -0.10, -0.15, 0.10, },
|
||||
{ -0.10, -0.20, -0.30, 0.10, -0.15, -0.10, },
|
||||
{ 0.10, -0.20, -0.30, 0.30, -0.15, 0.10, },
|
||||
{ -0.30, -0.15, -0.30, -0.20, 0.00, 0.10, },
|
||||
{ -0.20, -0.15, -0.30, 0.20, 0.00, -0.20, },
|
||||
{ 0.20, -0.15, -0.30, 0.30, 0.00, 0.10, },
|
||||
{ -0.25, 0.00, 0.20, 0.25, 0.50, 0.25, },
|
||||
{ -0.30, 0.00, 0.30, 0.30, 0.40, 0.50, },
|
||||
},
|
||||
},
|
||||
drop = "homedecor:toilet",
|
||||
groups = {cracky = 3,},
|
||||
--sounds = {dig = "3dforniture_dig_toilet", gain=0.5},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_punch = function (pos, node, puncher)
|
||||
node.name = "homedecor:toilet"
|
||||
minetest.set_node(pos, node)
|
||||
minetest.sound_play("homedecor_toilet_flush", {
|
||||
pos=pos,
|
||||
max_hear_distance = 5,
|
||||
gain = 1,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
--Sink
|
||||
minetest.register_node("homedecor: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 = {
|
||||
{ -0.15, 0.35, 0.20, 0.15, 0.40, 0.50, },
|
||||
{ -0.25, 0.40, 0.40, 0.25, 0.45, 0.50, },
|
||||
{ -0.25, 0.40, 0.15, -0.15, 0.45, 0.40, },
|
||||
{ 0.15, 0.40, 0.15, 0.25, 0.45, 0.40, },
|
||||
{ -0.15, 0.40, 0.15, 0.15, 0.45, 0.20, },
|
||||
{ -0.30, 0.45, 0.40, 0.30, 0.50, 0.50, },
|
||||
{ -0.30, 0.45, 0.10, -0.25, 0.50, 0.40, },
|
||||
{ 0.25, 0.45, 0.10, 0.30, 0.50, 0.40, },
|
||||
{ -0.25, 0.45, 0.10, 0.25, 0.50, 0.15, },
|
||||
{-0.1, -0.5, 0.3, 0.1, 0.4, 0.5},
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3,-0.5,0.1, 0.3,0.5,0.5},
|
||||
},
|
||||
groups = {cracky=2,},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--Taps
|
||||
minetest.register_node("homedecor: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 = {
|
||||
{ -0.25, -0.450, 0.49, 0.25, -0.30, 0.50, },
|
||||
{ -0.05, -0.400, 0.25, 0.05, -0.35, 0.50, },
|
||||
{ -0.05, -0.425, 0.25, 0.05, -0.40, 0.30, },
|
||||
{ -0.20, -0.400, 0.45, -0.15, -0.35, 0.50, },
|
||||
{ -0.20, -0.450, 0.40, -0.15, -0.30, 0.45, },
|
||||
{ -0.25, -0.400, 0.40, -0.10, -0.35, 0.45, },
|
||||
{ 0.15, -0.400, 0.45, 0.20, -0.35, 0.50, },
|
||||
{ 0.15, -0.450, 0.40, 0.20, -0.30, 0.45, },
|
||||
{ 0.10, -0.400, 0.40, 0.25, -0.35, 0.45, },
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.45, 0.25, 0.25, -0.3, 0.5 },
|
||||
},
|
||||
groups = {cracky=2,},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--Shower Tray
|
||||
minetest.register_node("homedecor: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",
|
||||
fixed = {
|
||||
{ -0.50, -0.50, -0.50, 0.50, -0.45, 0.50, },
|
||||
{ -0.50, -0.45, -0.50, 0.50, -0.40, -0.45, },
|
||||
{ -0.50, -0.45, 0.45, 0.50, -0.40, 0.50, },
|
||||
{ -0.50, -0.45, -0.45, -0.45, -0.40, 0.45, },
|
||||
{ 0.45, -0.45, -0.45, 0.50, -0.40, 0.45, },
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 },
|
||||
},
|
||||
groups = {cracky=2,},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--Shower Head
|
||||
minetest.register_node("homedecor: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 = {
|
||||
{ -0.10, -0.50, 0.10, 0.10, -0.40, 0.30, },
|
||||
{ -0.05, -0.40, 0.15, 0.05, -0.30, 0.25, },
|
||||
{ -0.05, -0.35, 0.25, 0.05, -0.30, 0.50, },
|
||||
{ -0.10, -0.40, 0.49, 0.10, -0.25, 0.50, },
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1, -0.5, 0.1, 0.1, -0.25, 0.5 },
|
||||
},
|
||||
groups = {cracky=2,},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_alias("3dforniture:toilet", "homedecor:toilet")
|
||||
minetest.register_alias("3dforniture:toilet_open", "homedecor:toilet_open")
|
||||
minetest.register_alias("3dforniture:sink", "homedecor:sink")
|
||||
minetest.register_alias("3dforniture:taps", "homedecor:taps")
|
||||
minetest.register_alias("3dforniture:shower_tray", "homedecor:shower_tray")
|
||||
minetest.register_alias("3dforniture:shower_head", "homedecor:shower_head")
|
||||
minetest.register_alias("3dforniture:table_lamp", "homedecor:table_lamp_off")
|
||||
|
||||
minetest.register_alias("toilet", "homedecor:toilet")
|
||||
minetest.register_alias("sink", "homedecor:sink")
|
||||
minetest.register_alias("taps", "homedecor:taps")
|
||||
minetest.register_alias("shower_tray", "homedecor:shower_tray")
|
||||
minetest.register_alias("shower_head", "homedecor:shower_head")
|
||||
minetest.register_alias("table_lamp", "homedecor:table_lamp_off")
|
170
mods/homedecor_modpack/homedecor/furniture_medieval.lua
Normal file
@ -0,0 +1,170 @@
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node("homedecor:bars", {
|
||||
description = S("Bars"),
|
||||
tiles = { "forniture_black_metal.png" },
|
||||
drawtype = "nodebox",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.5, -0.50, -0.10, -0.4, 0.50, 0.10 },
|
||||
{ -0.1, -0.50, -0.10, 0.1, 0.50, 0.10 },
|
||||
{ 0.4, -0.50, -0.10, 0.5, 0.50, 0.10 },
|
||||
{ -0.5, -0.50, -0.05, 0.5, -0.45, 0.05 },
|
||||
{ -0.5, 0.45, -0.05, 0.5, 0.50, 0.05 },
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.1, 0.5, 0.5, 0.1 },
|
||||
},
|
||||
groups = {cracky=1},
|
||||
})
|
||||
|
||||
--L Binding Bars
|
||||
minetest.register_node("homedecor: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 = {
|
||||
{ -0.10, -0.50, -0.50, 0.10, 0.50, -0.40 },
|
||||
{ -0.15, -0.50, -0.15, 0.15, 0.50, 0.15 },
|
||||
{ 0.40, -0.50, -0.10, 0.50, 0.50, 0.10 },
|
||||
{ 0.00, -0.50, -0.05, 0.50, -0.45, 0.05 },
|
||||
{ -0.05, -0.50, -0.50, 0.05, -0.45, 0.00 },
|
||||
{ 0.00, 0.45, -0.05, 0.50, 0.50, 0.05 },
|
||||
{ -0.05, 0.45, -0.50, 0.05, 0.50, 0.00 },
|
||||
},
|
||||
},
|
||||
groups = {cracky=1,}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor: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 = {
|
||||
{ -0.45, 0.25, 0.45, -0.20, 0.50, 0.50, },
|
||||
{ -0.35, 0.40, 0.35, -0.30, 0.45, 0.45, },
|
||||
{ -0.35, 0.30, 0.35, -0.30, 0.35, 0.45, },
|
||||
{ -0.35, 0.35, 0.30, -0.30, 0.40, 0.35, },
|
||||
{ -0.40, 0.35, 0.35, -0.25, 0.40, 0.40, },
|
||||
{ -0.40, 0.15, 0.35, -0.25, 0.20, 0.40, },
|
||||
{ -0.45, 0.20, 0.35, -0.40, 0.35, 0.40, },
|
||||
{ -0.25, 0.20, 0.35, -0.20, 0.35, 0.40, },
|
||||
{ -0.35, 0.20, 0.30, -0.30, 0.25, 0.45, },
|
||||
{ -0.35, 0.00, 0.30, -0.30, 0.05, 0.45, },
|
||||
{ -0.35, 0.05, 0.25, -0.30, 0.20, 0.30, },
|
||||
{ -0.35, 0.05, 0.45, -0.30, 0.20, 0.50, },
|
||||
{ -0.40, 0.05, 0.35, -0.25, 0.10, 0.40, },
|
||||
{ -0.40, -0.15, 0.35, -0.25, -0.10, 0.40, },
|
||||
{ -0.45, -0.10, 0.35, -0.40, 0.05, 0.40, },
|
||||
{ -0.25, -0.10, 0.35, -0.20, 0.05, 0.40, },
|
||||
{ -0.35, -0.10, 0.30, -0.30, -0.05, 0.45, },
|
||||
{ -0.35, -0.30, 0.30, -0.30, -0.25, 0.45, },
|
||||
{ -0.35, -0.25, 0.25, -0.30, -0.10, 0.30, },
|
||||
{ -0.35, -0.25, 0.45, -0.30, -0.10, 0.50, },
|
||||
{ -0.40, -0.25, 0.35, -0.25, -0.20, 0.40, },
|
||||
{ -0.40, -0.45, 0.35, -0.25, -0.40, 0.40, },
|
||||
{ -0.45, -0.40, 0.35, -0.40, -0.25, 0.40, },
|
||||
{ -0.25, -0.40, 0.35, -0.20, -0.25, 0.40, },
|
||||
{ 0.20, 0.25, 0.45, 0.45, 0.50, 0.50, },
|
||||
{ 0.30, 0.40, 0.35, 0.35, 0.45, 0.45, },
|
||||
{ 0.30, 0.30, 0.35, 0.35, 0.35, 0.45, },
|
||||
{ 0.30, 0.35, 0.30, 0.35, 0.40, 0.35, },
|
||||
{ 0.25, 0.35, 0.35, 0.40, 0.40, 0.40, },
|
||||
{ 0.25, 0.15, 0.35, 0.40, 0.20, 0.40, },
|
||||
{ 0.20, 0.20, 0.35, 0.25, 0.35, 0.40, },
|
||||
{ 0.40, 0.20, 0.35, 0.45, 0.35, 0.40, },
|
||||
{ 0.30, 0.20, 0.30, 0.35, 0.25, 0.45, },
|
||||
{ 0.30, 0.00, 0.30, 0.35, 0.05, 0.45, },
|
||||
{ 0.30, 0.05, 0.25, 0.35, 0.20, 0.30, },
|
||||
{ 0.30, 0.05, 0.45, 0.35, 0.20, 0.50, },
|
||||
{ 0.25, 0.05, 0.35, 0.40, 0.10, 0.40, },
|
||||
{ 0.25, -0.15, 0.35, 0.40, -0.10, 0.40, },
|
||||
{ 0.20, -0.10, 0.35, 0.25, 0.05, 0.40, },
|
||||
{ 0.40, -0.10, 0.35, 0.45, 0.05, 0.40, },
|
||||
{ 0.30, -0.10, 0.30, 0.35, -0.05, 0.45, },
|
||||
{ 0.30, -0.30, 0.30, 0.35, -0.25, 0.45, },
|
||||
{ 0.30, -0.25, 0.25, 0.35, -0.10, 0.30, },
|
||||
{ 0.30, -0.25, 0.45, 0.35, -0.10, 0.50, },
|
||||
{ 0.25, -0.25, 0.35, 0.40, -0.20, 0.40, },
|
||||
{ 0.25, -0.45, 0.35, 0.40, -0.40, 0.40, },
|
||||
{ 0.20, -0.40, 0.35, 0.25, -0.25, 0.40, },
|
||||
{ 0.40, -0.40, 0.35, 0.45, -0.25, 0.40, },
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, 1/4, 1/2, 1/2, 1/2},
|
||||
},
|
||||
groups = {cracky=1},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:torch_wall", {
|
||||
description = S("Wall Torch"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"forniture_torch_wall_s.png",
|
||||
"forniture_torch_wall_i.png",
|
||||
{
|
||||
name="forniture_torch_wall_anim.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=40,
|
||||
aspect_h=40,
|
||||
length=1.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
inventory_image="3dforniture_inv_torch_wall.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.05, -0.45, 0.45, 0.05, -0.35, 0.50, },
|
||||
{ -0.05, -0.35, 0.40, 0.05, -0.25, 0.50, },
|
||||
{ -0.05, -0.25, 0.35, 0.05, -0.15, 0.45, },
|
||||
{ -0.05, -0.15, 0.30, 0.05, -0.05, 0.40, },
|
||||
{ -0.05, -0.05, 0.25, 0.05, 0.00, 0.35, },
|
||||
{ -0.10, 0.00, 0.20, 0.10, 0.05, 0.40, },
|
||||
{ -0.15, 0.05, 0.15, 0.15, 0.15, 0.45, },
|
||||
{ -0.10, 0.15, 0.20, 0.10, 0.25, 0.40, },
|
||||
{ -0.05, 0.25, 0.25, 0.05, 0.35, 0.35, },
|
||||
},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
|
||||
},
|
||||
groups = {cracky=2},
|
||||
})
|
||||
|
||||
minetest.register_alias("3dforniture:bars", "homedecor:bars")
|
||||
minetest.register_alias("3dforniture:L_binding_bars", "homedecor:L_binding_bars")
|
||||
minetest.register_alias("3dforniture:chains", "homedecor:chains")
|
||||
minetest.register_alias("3dforniture:torch_wall", "homedecor:torch_wall")
|
||||
|
||||
minetest.register_alias('bars', 'homedecor:bars')
|
||||
minetest.register_alias('binding_bars', 'homedecor:L_binding_bars')
|
||||
minetest.register_alias('chains', 'homedecor:chains')
|
||||
minetest.register_alias('torch_wall', 'homedecor:torch_wall')
|
255
mods/homedecor_modpack/homedecor/furniture_recipes.lua
Normal file
@ -0,0 +1,255 @@
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table", "homedecor:chair 2",
|
||||
recipe = {
|
||||
{ "group:wood","group:wood", "group:wood" },
|
||||
{ "group:stick", "", "group:stick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:table_mahogany",
|
||||
recipe = {
|
||||
"homedecor:table",
|
||||
"dye:brown",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:table_mahogany",
|
||||
recipe = {
|
||||
"homedecor:table",
|
||||
"unifieddyes:dark_orange",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:table_white",
|
||||
recipe = {
|
||||
"homedecor:table",
|
||||
"dye:white",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_mahogany",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_white",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:chair 2",
|
||||
recipe = {
|
||||
{ "group:stick",""},
|
||||
{ "group:wood","group:wood" },
|
||||
{ "group:stick","group:stick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:chair",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
local chaircolors = { "black", "red", "pink", "violet", "blue", "dark_green" }
|
||||
|
||||
for _, color in ipairs(chaircolors) do
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:chair_"..color,
|
||||
recipe = {
|
||||
"homedecor:chair",
|
||||
"wool:white",
|
||||
"dye:"..color
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:chair_"..color,
|
||||
recipe = {
|
||||
"homedecor:chair",
|
||||
"wool:"..color
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:chair_"..color,
|
||||
burntime = 15,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:armchair",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{"default:paper","default:torch" ,"default:paper"},
|
||||
{"","group:stick",""},
|
||||
{"","stairs:slab_wood",""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{"default:paper","default:torch" ,"default:paper"},
|
||||
{"","group:stick",""},
|
||||
{"","moreblocks:slab_wood",""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:standing_lamp_bottom_off",
|
||||
recipe = {
|
||||
{"homedecor:table_lamp_off"},
|
||||
{"group:stick"},
|
||||
{"group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_lamp_off",
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
local lamp_colors = { "blue", "green", "pink", "red", "violet" }
|
||||
|
||||
for _, color in ipairs(lamp_colors) do
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_"..color.."_off",
|
||||
recipe = {
|
||||
{"wool:"..color,"default:torch" ,"wool:"..color},
|
||||
{"","group:stick",""},
|
||||
{"","stairs:slab_wood",""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_"..color.."_off",
|
||||
recipe = {
|
||||
{"wool:"..color,"default:torch" ,"wool:"..color},
|
||||
{"","group:stick",""},
|
||||
{"","moreblocks:slab_wood",""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:table_lamp_"..color.."_off",
|
||||
recipe = {
|
||||
"dye:"..color,
|
||||
"homedecor:table_lamp_off",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_lamp_"..color.."_off",
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:standing_lamp_bottom_"..color.."_off",
|
||||
recipe = {
|
||||
{"homedecor:table_lamp_"..color.."_off"},
|
||||
{"group:stick"},
|
||||
{"group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:standing_lamp_bottom_"..color.."_off",
|
||||
recipe = {
|
||||
"homedecor:standing_lamp_bottom_off",
|
||||
"dye:"..color
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:toilet",
|
||||
recipe = {
|
||||
{"","","bucket:bucket_water"},
|
||||
{ "building_blocks:Marble","building_blocks:Marble", "building_blocks:Marble" },
|
||||
{ "", "bucket:bucket_empty", "" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:sink",
|
||||
recipe = {
|
||||
{ "building_blocks:Marble","bucket:bucket_empty", "building_blocks:Marble" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:taps",
|
||||
recipe = {
|
||||
{ "default:steel_ingot","bucket:bucket_water", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:shower_tray",
|
||||
recipe = {
|
||||
{ "building_blocks:Marble","bucket:bucket_water", "building_blocks:Marble" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:shower_head",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "bucket:bucket_water"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:bars 6",
|
||||
recipe = {
|
||||
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" },
|
||||
{ "homedecor:pole_wrought_iron","homedecor:pole_wrought_iron","homedecor:pole_wrought_iron" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:L_binding_bars 3",
|
||||
recipe = {
|
||||
{ "homedecor:bars","" },
|
||||
{ "homedecor:bars","homedecor:bars" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:torch_wall 10",
|
||||
recipe = {
|
||||
{ "default:coal_lump" },
|
||||
{ "default:steel_ingot" },
|
||||
},
|
||||
})
|
241
mods/homedecor_modpack/homedecor/init.lua
Normal file
@ -0,0 +1,241 @@
|
||||
-- Home Decor mod by VanessaE
|
||||
--
|
||||
-- Mostly my own code, with bits and pieces lifted from Minetest's default
|
||||
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
||||
-- for helping me figure out the inventories used in the nightstands/dressers.
|
||||
--
|
||||
-- The code for ovens, nightstands, refrigerators are basically modified
|
||||
-- copies of the code for chests and furnaces.
|
||||
|
||||
homedecor = {}
|
||||
|
||||
homedecor.debug = 0
|
||||
|
||||
-- detail level for roofing slopes and also cobwebs
|
||||
|
||||
homedecor.detail_level = 16
|
||||
|
||||
homedecor.modpath = minetest.get_modpath("homedecor")
|
||||
homedecor.intllib_modpath = minetest.get_modpath("intllib")
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if homedecor.intllib_modpath then
|
||||
dofile(homedecor.intllib_modpath.."/intllib.lua")
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function ( s ) return s end
|
||||
end
|
||||
homedecor.gettext = S
|
||||
|
||||
-- debug
|
||||
|
||||
local dbg = function(s)
|
||||
if homedecor.debug == 1 then
|
||||
print('[HomeDecor] ' .. s)
|
||||
end
|
||||
end
|
||||
|
||||
-- infinite stacks
|
||||
|
||||
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
|
||||
homedecor.expect_infinite_stacks = false
|
||||
else
|
||||
homedecor.expect_infinite_stacks = true
|
||||
end
|
||||
|
||||
--table copy
|
||||
|
||||
function homedecor.table_copy(t)
|
||||
local nt = { };
|
||||
for k, v in pairs(t) do
|
||||
if type(v) == "table" then
|
||||
nt[k] = homedecor.table_copy(v)
|
||||
else
|
||||
nt[k] = v
|
||||
end
|
||||
end
|
||||
return nt
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
function homedecor.get_nodedef_field(nodename, fieldname)
|
||||
if not minetest.registered_nodes[nodename] then
|
||||
return nil
|
||||
end
|
||||
return minetest.registered_nodes[nodename][fieldname]
|
||||
end
|
||||
|
||||
-- Stack one node above another
|
||||
|
||||
function homedecor.stack_vertically(itemstack, placer, pointed_thing, node1, node2)
|
||||
local pos = pointed_thing.under
|
||||
local pnode = minetest.get_node(pointed_thing.under)
|
||||
local rnodedef = minetest.registered_nodes[pnode.name]
|
||||
|
||||
if not rnodedef["buildable_to"] then
|
||||
pos = pointed_thing.above
|
||||
end
|
||||
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
|
||||
local tnode = minetest.get_node(pos)
|
||||
local tnode2 = minetest.get_node(pos2)
|
||||
|
||||
if homedecor.get_nodedef_field(tnode.name, "buildable_to")
|
||||
and homedecor.get_nodedef_field(tnode2.name, "buildable_to")
|
||||
and not minetest.is_protected(pos, placer:get_player_name())
|
||||
and not minetest.is_protected(pos2, placer:get_player_name()) then
|
||||
minetest.add_node(pos, { name = node1, param2 = fdir })
|
||||
minetest.add_node(pos2, { name = node2, param2 = fdir })
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Place one node right of or behind another
|
||||
|
||||
homedecor.fdir_to_right = {
|
||||
{ 1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 0 },
|
||||
{ 0, 1 },
|
||||
}
|
||||
|
||||
homedecor.fdir_to_fwd = {
|
||||
{ 0, 1 },
|
||||
{ 1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 0 },
|
||||
}
|
||||
|
||||
function homedecor.stack_sideways(itemstack, placer, pointed_thing, node1, node2, dir)
|
||||
local pos = pointed_thing.under
|
||||
local pnode = minetest.get_node(pointed_thing.under)
|
||||
local rnodedef = minetest.registered_nodes[pnode.name]
|
||||
|
||||
if not rnodedef["buildable_to"] then
|
||||
pos = pointed_thing.above
|
||||
end
|
||||
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local pos2
|
||||
if dir then
|
||||
pos2 = { x = pos.x + homedecor.fdir_to_right[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_right[fdir+1][2] }
|
||||
else
|
||||
pos2 = { x = pos.x + homedecor.fdir_to_fwd[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_fwd[fdir+1][2] }
|
||||
end
|
||||
|
||||
local tnode = minetest.get_node(pos)
|
||||
local tnode2 = minetest.get_node(pos2)
|
||||
|
||||
if homedecor.get_nodedef_field(tnode.name, "buildable_to")
|
||||
and homedecor.get_nodedef_field(tnode2.name, "buildable_to")
|
||||
and not minetest.is_protected(pos, placer:get_player_name())
|
||||
and not minetest.is_protected(pos2, placer:get_player_name()) then
|
||||
minetest.add_node(pos, { name = node1, param2 = fdir })
|
||||
minetest.add_node(pos2, { name = node2, param2 = fdir })
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Determine if the item being pointed at is the underside of a node (e.g a ceiling)
|
||||
|
||||
function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
||||
-- most of this is copied from the rotate-and-place function in builtin
|
||||
local unode = core.get_node_or_nil(pointed_thing.under)
|
||||
if not unode then
|
||||
return
|
||||
end
|
||||
local undef = core.registered_nodes[unode.name]
|
||||
if undef and undef.on_rightclick then
|
||||
undef.on_rightclick(pointed_thing.under, unode, placer,
|
||||
itemstack, pointed_thing)
|
||||
return
|
||||
end
|
||||
local pitch = placer:get_look_pitch()
|
||||
local fdir = core.dir_to_facedir(placer:get_look_dir())
|
||||
local wield_name = itemstack:get_name()
|
||||
|
||||
local above = pointed_thing.above
|
||||
local under = pointed_thing.under
|
||||
local iswall = (above.y == under.y)
|
||||
local isceiling = not iswall and (above.y < under.y)
|
||||
local anode = core.get_node_or_nil(above)
|
||||
if not anode then
|
||||
return
|
||||
end
|
||||
local pos = pointed_thing.above
|
||||
local node = anode
|
||||
|
||||
if undef and undef.buildable_to then
|
||||
pos = pointed_thing.under
|
||||
node = unode
|
||||
iswall = false
|
||||
end
|
||||
|
||||
if core.is_protected(pos, placer:get_player_name()) then
|
||||
core.record_protection_violation(pos,
|
||||
placer:get_player_name())
|
||||
return
|
||||
end
|
||||
|
||||
local ndef = core.registered_nodes[node.name]
|
||||
if not ndef or not ndef.buildable_to then
|
||||
return
|
||||
end
|
||||
return isceiling, pos
|
||||
end
|
||||
|
||||
-- load various other components
|
||||
|
||||
dofile(homedecor.modpath.."/misc-nodes.lua") -- the catch-all for all misc nodes
|
||||
dofile(homedecor.modpath.."/tables.lua")
|
||||
dofile(homedecor.modpath.."/electronics.lua")
|
||||
dofile(homedecor.modpath.."/shutters.lua")
|
||||
dofile(homedecor.modpath.."/shingles.lua")
|
||||
dofile(homedecor.modpath.."/slopes.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/door_models.lua")
|
||||
dofile(homedecor.modpath.."/doors_and_gates.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/fences.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/lighting.lua")
|
||||
dofile(homedecor.modpath.."/kitchen_cabinet.lua")
|
||||
dofile(homedecor.modpath.."/refrigerator.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/misc-bathroom.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/laundry.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/furnaces.lua")
|
||||
dofile(homedecor.modpath.."/nightstands.lua")
|
||||
dofile(homedecor.modpath.."/clocks.lua")
|
||||
dofile(homedecor.modpath.."/misc-electrical.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/paintings.lua")
|
||||
dofile(homedecor.modpath.."/window_treatments.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/crafts.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/furniture.lua")
|
||||
dofile(homedecor.modpath.."/furniture_medieval.lua")
|
||||
dofile(homedecor.modpath.."/furniture_bathroom.lua")
|
||||
dofile(homedecor.modpath.."/furniture_recipes.lua")
|
||||
dofile(homedecor.modpath.."/climate-control.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/cobweb.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/locked.lua")
|
||||
|
||||
|
||||
|
||||
print("[HomeDecor] "..S("Loaded!"))
|
173
mods/homedecor_modpack/homedecor/kitchen_cabinet.lua
Normal file
@ -0,0 +1,173 @@
|
||||
-- This file supplies Kitchen cabinets and kitchen sink
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
local counter_materials = { "", "granite", "marble", "steel" }
|
||||
|
||||
for _, mat in ipairs(counter_materials) do
|
||||
|
||||
local desc = S("Kitchen Cabinet")
|
||||
local material = ""
|
||||
|
||||
if mat ~= "" then
|
||||
desc = S("Kitchen Cabinet ("..mat.." top)")
|
||||
material = "_"..mat
|
||||
end
|
||||
|
||||
minetest.register_node('homedecor:kitchen_cabinet'..material, {
|
||||
description = desc,
|
||||
tiles = { 'homedecor_kitchen_cabinet_top'..material..'.png',
|
||||
'homedecor_kitchen_cabinet_bottom.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_front.png'},
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,8]"..
|
||||
"list[current_name;main;0,0;8,3;]"..
|
||||
"list[current_player;main;0,4;8,4;]")
|
||||
meta:set_string("infotext", S("Kitchen Cabinet"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 24)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node('homedecor:kitchen_cabinet_half', {
|
||||
drawtype="nodebox",
|
||||
description = S('Half-height Kitchen Cabinet (on ceiling)'),
|
||||
tiles = { 'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_bottom.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_front_half.png'},
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,7]"..
|
||||
"list[current_name;main;1,0;6,2;]"..
|
||||
"list[current_player;main;0,3;8,4;]")
|
||||
meta:set_string("infotext", S("Kitchen Cabinet"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 12)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node('homedecor:kitchen_cabinet_with_sink', {
|
||||
description = S("Kitchen Cabinet with sink"),
|
||||
tiles = { 'homedecor_kitchen_cabinet_sinktop.png',
|
||||
'homedecor_kitchen_cabinet_bottom.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_sides.png',
|
||||
'homedecor_kitchen_cabinet_front.png'},
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,7]"..
|
||||
"list[current_name;main;0,0;8,2;]"..
|
||||
"list[current_player;main;0,3;8,4;]")
|
||||
meta:set_string("infotext", S("Under-sink cabinet"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 16)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from kitchen cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
56
mods/homedecor_modpack/homedecor/laundry.lua
Normal file
@ -0,0 +1,56 @@
|
||||
-- laundry devices
|
||||
|
||||
minetest.register_node("homedecor:washing_machine", {
|
||||
description = "Washing Machine",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_washing_machine_top.png",
|
||||
"homedecor_washing_machine_bottom.png",
|
||||
"homedecor_washing_machine_sides.png",
|
||||
"homedecor_washing_machine_sides.png^[transformFX",
|
||||
"homedecor_washing_machine_back.png",
|
||||
"homedecor_washing_machine_front.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.375},
|
||||
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:dryer", {
|
||||
description = "Tumble dryer",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_dryer_top.png",
|
||||
"homedecor_dryer_bottom.png",
|
||||
"homedecor_dryer_sides.png",
|
||||
"homedecor_dryer_sides.png^[transformFX",
|
||||
"homedecor_dryer_back.png",
|
||||
"homedecor_dryer_front.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.375},
|
||||
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
})
|
||||
|
537
mods/homedecor_modpack/homedecor/lighting.lua
Normal file
@ -0,0 +1,537 @@
|
||||
|
||||
-- This file supplies glowlights
|
||||
|
||||
local dirs1 = { 20, 23, 22, 21 }
|
||||
local dirs2 = { 9, 18, 7, 12 }
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
local colors = {"yellow","white"}
|
||||
|
||||
for i in ipairs(colors) do
|
||||
local color = colors[i]
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:glowlight_thin_"..color },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.add_node(pos, {name = "homedecor:glowlight_quarter_"..color, param2 = 20})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:glowlight_thick_"..color },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.add_node(pos, {name = "homedecor:glowlight_half_"..color, param2 = 20})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:glowlight_thin_"..color.."_wall" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2 or 0
|
||||
nfdir = dirs2[fdir+1]
|
||||
minetest.add_node(pos, {name = "homedecor:glowlight_quarter_"..color, param2 = nfdir})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:glowlight_thick_"..color.."_wall" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2 or 0
|
||||
nfdir = dirs2[fdir+1]
|
||||
minetest.add_node(pos, {name = "homedecor:glowlight_half_"..color, param2 = nfdir})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:glowlight_small_cube_"..color.."_ceiling" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.add_node(pos, {name = "homedecor:glowlight_small_cube_"..color, param2 = 20})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- Yellow
|
||||
|
||||
minetest.register_node('homedecor:glowlight_half_yellow', {
|
||||
description = S("Yellow Glowlight (thick)"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
'homedecor_glowlight_yellow_top.png',
|
||||
'homedecor_glowlight_yellow_bottom.png',
|
||||
'homedecor_glowlight_thick_yellow_sides.png',
|
||||
'homedecor_glowlight_thick_yellow_sides.png',
|
||||
'homedecor_glowlight_thick_yellow_sides.png',
|
||||
'homedecor_glowlight_thick_yellow_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
|
||||
},
|
||||
|
||||
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', {
|
||||
description = S("Yellow Glowlight (thin)"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
'homedecor_glowlight_yellow_top.png',
|
||||
'homedecor_glowlight_yellow_bottom.png',
|
||||
'homedecor_glowlight_thin_yellow_sides.png',
|
||||
'homedecor_glowlight_thin_yellow_sides.png',
|
||||
'homedecor_glowlight_thin_yellow_sides.png',
|
||||
'homedecor_glowlight_thin_yellow_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
|
||||
},
|
||||
|
||||
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
|
||||
})
|
||||
|
||||
-- White
|
||||
|
||||
minetest.register_node('homedecor:glowlight_half_white', {
|
||||
description = S("White Glowlight (thick)"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
'homedecor_glowlight_white_top.png',
|
||||
'homedecor_glowlight_white_bottom.png',
|
||||
'homedecor_glowlight_thick_white_sides.png',
|
||||
'homedecor_glowlight_thick_white_sides.png',
|
||||
'homedecor_glowlight_thick_white_sides.png',
|
||||
'homedecor_glowlight_thick_white_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
|
||||
},
|
||||
|
||||
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', {
|
||||
description = S("White Glowlight (thin)"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
'homedecor_glowlight_white_top.png',
|
||||
'homedecor_glowlight_white_bottom.png',
|
||||
'homedecor_glowlight_thin_white_sides.png',
|
||||
'homedecor_glowlight_thin_white_sides.png',
|
||||
'homedecor_glowlight_thin_white_sides.png',
|
||||
'homedecor_glowlight_thin_white_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
|
||||
},
|
||||
|
||||
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
|
||||
})
|
||||
|
||||
-- Glowlight "cubes"
|
||||
|
||||
minetest.register_node('homedecor: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',
|
||||
'homedecor_glowlight_cube_yellow_sides.png',
|
||||
'homedecor_glowlight_cube_yellow_sides.png',
|
||||
'homedecor_glowlight_cube_yellow_sides.png',
|
||||
'homedecor_glowlight_cube_yellow_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
|
||||
},
|
||||
node_box = {
|
||||
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(),
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor: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',
|
||||
'homedecor_glowlight_cube_white_sides.png',
|
||||
'homedecor_glowlight_cube_white_sides.png',
|
||||
'homedecor_glowlight_cube_white_sides.png',
|
||||
'homedecor_glowlight_cube_white_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
|
||||
},
|
||||
node_box = {
|
||||
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(),
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:plasma_lamp", {
|
||||
description = "Plasma Lamp",
|
||||
drawtype = "glasslike_framed",
|
||||
tiles = {"homedecor_gold_block.png","homedecor_glass_face_clean.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name="homedecor_plasma_storm.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
|
||||
}
|
||||
},
|
||||
-- use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
light_source = LIGHT_MAX - 1,
|
||||
sunlight_propagates = true,
|
||||
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
minetest.swap_node(pos, {name = "homedecor:plasma_lamp", param2 = 255})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:candle', {
|
||||
description = S("Thick Candle"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
'homedecor_candle_top.png',
|
||||
'homedecor_candle_bottom.png',
|
||||
{name="homedecor_candle_sides.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125 },
|
||||
{ -0.125, 0, 0, 0.125, 0.5, 0 },
|
||||
{ 0, 0, -0.125, 0, 0.5, 0.125 }
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 },
|
||||
}
|
||||
},
|
||||
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', {
|
||||
description = S("Little Candle"),
|
||||
inventory_image = 'homedecor_candle_inv.png',
|
||||
drawtype = "plantlike",
|
||||
tiles = {
|
||||
{name="homedecor_candle.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.0}},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 },
|
||||
}
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
light_source = LIGHT_MAX-4,
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor: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 = {
|
||||
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
light_source = LIGHT_MAX-4,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor: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 = {
|
||||
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
light_source = LIGHT_MAX-4,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor: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', {
|
||||
description = S("Lattice lantern (small)"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
'homedecor_lattice_lantern_small_tb.png',
|
||||
'homedecor_lattice_lantern_small_tb.png',
|
||||
'homedecor_lattice_lantern_small_sides.png'
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
|
||||
},
|
||||
node_box = {
|
||||
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(),
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
local repl = { off="low", low="med", med="hi", hi="max", max="off", }
|
||||
local lamp_colors = { "", "blue", "green", "pink", "red", "violet" }
|
||||
|
||||
local function reg_lamp(suffix, nxt, tilesuffix, light, color)
|
||||
local lampcolor = "_"..color
|
||||
local standingcolor = "_"..color
|
||||
local colordesc = " ("..color..")"
|
||||
if color == "" then
|
||||
lampcolor = ""
|
||||
standingcolor = "_white"
|
||||
colordesc = " (white)"
|
||||
end
|
||||
minetest.register_node("homedecor:table_lamp"..lampcolor.."_"..suffix, {
|
||||
description = S("Table Lamp "..colordesc),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"forniture_table_lamp_s"..tilesuffix..".png",
|
||||
"forniture_table_lamp_s"..tilesuffix..".png",
|
||||
"forniture_table_lamp"..lampcolor.."_l"..tilesuffix..".png",
|
||||
},
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1500, -0.500, -0.1500, 0.1500, -0.45, 0.1500 },
|
||||
{ -0.0500, -0.450, -0.0500, 0.0500, -0.40, 0.0500 },
|
||||
{ -0.0250, -0.400, -0.0250, 0.0250, -0.10, 0.0250 },
|
||||
{ -0.0125, -0.125, -0.2000, 0.0125, -0.10, 0.2000 },
|
||||
{ -0.2000, -0.125, -0.0125, 0.2000, -0.10, 0.0125 },
|
||||
{ -0.2000, -0.100, -0.2000, -0.1750, 0.30, 0.2000 },
|
||||
{ 0.1750, -0.100, -0.2000, 0.2000, 0.30, 0.2000 },
|
||||
{ -0.1750, -0.100, -0.2000, 0.1750, 0.30, -0.1750 },
|
||||
{ -0.1750, -0.100, 0.1750, 0.1750, 0.30, 0.2000 },
|
||||
},
|
||||
},
|
||||
walkable = false,
|
||||
light_source = light,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.2, -0.5, -0.2, 0.2, 0.30, 0.2 },
|
||||
},
|
||||
groups = {cracky=2,oddly_breakable_by_hand=1,
|
||||
not_in_creative_inventory=((light ~= nil) and 1) or nil,
|
||||
},
|
||||
drop = "homedecor:table_lamp"..lampcolor.."_off",
|
||||
on_punch = function(pos, node, puncher)
|
||||
node.name = "homedecor:table_lamp"..lampcolor.."_"..repl[suffix]
|
||||
minetest.set_node(pos, node)
|
||||
nodeupdate(pos)
|
||||
end,
|
||||
})
|
||||
if lampcolor == "" then
|
||||
minetest.register_alias("3dforniture:table_lamp_"..suffix, "homedecor:table_lamp_"..suffix)
|
||||
end
|
||||
|
||||
-- standing lamps
|
||||
|
||||
minetest.register_node("homedecor:standing_lamp_bottom"..lampcolor.."_"..suffix, {
|
||||
description = S("Standing Lamp"..colordesc),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"forniture_table_lamp_s"..tilesuffix..".png",
|
||||
"homedecor_standing_lamp_bottom_sides.png",
|
||||
},
|
||||
inventory_image = "homedecor_standing_lamp"..standingcolor.."_inv.png",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1500, -0.500, -0.1500, 0.1500, -0.45, 0.1500 },
|
||||
{ -0.0500, -0.450, -0.0500, 0.0500, -0.40, 0.0500 },
|
||||
{ -0.0250, -0.400, -0.0250, 0.0250, 0.50, 0.0250 },
|
||||
},
|
||||
},
|
||||
walkable = false,
|
||||
light_source = light,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0}
|
||||
},
|
||||
groups = {cracky=2,oddly_breakable_by_hand=1,
|
||||
not_in_creative_inventory=((light ~= nil) and 1) or nil,
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_vertically(itemstack, placer, pointed_thing,
|
||||
"homedecor:standing_lamp_bottom"..lampcolor.."_"..suffix, "homedecor:standing_lamp_top"..lampcolor.."_"..suffix)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:standing_lamp_top"..lampcolor.."_"..suffix, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"forniture_table_lamp_s"..tilesuffix..".png",
|
||||
"forniture_table_lamp_s"..tilesuffix..".png",
|
||||
"forniture_standing_lamp"..lampcolor.."_l"..tilesuffix..".png"
|
||||
},
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.0250, -0.500, -0.0250, 0.0250, 0.10, 0.0250 },
|
||||
{ -0.0125, 0.0625, -0.2000, 0.0125, 0.10, 0.2000 },
|
||||
{ -0.2000, 0.0625, -0.0125, 0.2000, 0.10, 0.0125 },
|
||||
{ -0.2000, 0.100, -0.2000, -0.1750, 0.50, 0.2000 },
|
||||
{ 0.1750, 0.100, -0.2000, 0.2000, 0.50, 0.2000 },
|
||||
{ -0.1750, 0.100, -0.2000, 0.1750, 0.50, -0.1750 },
|
||||
{ -0.1750, 0.100, 0.1750, 0.1750, 0.50, 0.2000 },
|
||||
},
|
||||
},
|
||||
walkable = false,
|
||||
light_source = light,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.2, -1.5, -0.2, 0.2, 0.5, 0.2 },
|
||||
},
|
||||
groups = {snappy=3, not_in_creative_inventory=1},
|
||||
on_punch = function(pos, node, puncher)
|
||||
node.name = "homedecor:standing_lamp_top"..lampcolor.."_"..repl[suffix]
|
||||
minetest.set_node(pos, node)
|
||||
nodeupdate(pos)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local pos2 = { x = pos.x, y=pos.y - 1, z = pos.z }
|
||||
if minetest.get_node(pos2).name == "homedecor:standing_lamp_bottom"..lampcolor.."_off" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end,
|
||||
drop = "homedecor:standing_lamp_bottom"..lampcolor.."_off"
|
||||
})
|
||||
end
|
||||
|
||||
for _, color in ipairs(lamp_colors) do
|
||||
reg_lamp("off", "low", "", nil, color )
|
||||
reg_lamp("low", "med", "l", 3, color )
|
||||
reg_lamp("med", "hi", "m", 7, color )
|
||||
reg_lamp("hi", "max", "h", 11, color )
|
||||
reg_lamp("max", "off", "x", 14, color )
|
||||
end
|
13
mods/homedecor_modpack/homedecor/listnodes.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Node listing as of "`date` > nodes.txt
|
||||
|
||||
for i in *.lua; do
|
||||
echo -e "\nIn $i:\n" >> nodes.txt
|
||||
cat $i | grep "minetest.register_node(" | \
|
||||
sed "s/minetest.register_node(.homedecor:/homedecor:/; s/., {//" | \
|
||||
sort >> nodes.txt
|
||||
done
|
||||
|
||||
less nodes.txt
|
||||
rm -f nodes.txt
|
223
mods/homedecor_modpack/homedecor/locale/de.txt
Normal file
@ -0,0 +1,223 @@
|
||||
# Translation by Xanthin
|
||||
|
||||
### Special strings ###
|
||||
|
||||
### kitchen_cabinet.lua ###
|
||||
Kitchen Cabinet = Kuechenschrank
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in kitchen cabinet at %s = %s bewegt etwas im Kuechenschrank bei %s
|
||||
%s moves stuff to kitchen cabinet at %s = %s legt etwas in den Kuechenschrank bei %s
|
||||
%s takes stuff from kitchen cabinet at %s = %s nimmt etwas aus dem Kuechenschrank bei %s
|
||||
Half-height Kitchen Cabinet (on ceiling) = Halbhoher Kuechenschrank (haengend)
|
||||
Under-sink cabinet = Unterschrank
|
||||
Kitchen Cabinet with sink = Unterschrank mit Spuele
|
||||
|
||||
### door_models.lua ###
|
||||
Mahogany Closet Door = Wandschranktuer aus Mahagoni
|
||||
Oak Closet Door = Wandschranktuer aus Eiche
|
||||
Fancy Wood/Glass Door = Schicke Holz/Glastuer
|
||||
Glass Office Door = Glasbuerotuer
|
||||
Glass and Wood, Mahogany-colored = Glas-Holz-Tuer, mahagonifarben
|
||||
Glass and Wood, Oak-colored = Glas-Holz-Tuer, eichefarben
|
||||
Glass and Wood, White = Glas-Holz-Tuer, weiss
|
||||
Plain Wooden Door = Einfache Holztuer
|
||||
left = links
|
||||
right = rechts
|
||||
## 1: Side the doors opens to
|
||||
#deaktiviert, weil es nicht funktioniert
|
||||
#(Top Half, %s-opening) = (obere Haelfte, %soeffnend)
|
||||
#(%s-opening) = (%soeffnend)
|
||||
|
||||
|
||||
### door_nodes.lua ###
|
||||
Not enough space above that spot to place a door! = Es gibt nicht genug Raum ueber dieser Stelle um die Tuer zu platzieren!
|
||||
|
||||
### crafts.lua ###
|
||||
Brass Ingot = Messingbarren
|
||||
Bucket of white paint = Eimer mit weisser Farbe
|
||||
Legs for Small Utility table = Tischbeine fuer kleinen Arbeitsplatte
|
||||
Plastic sheet = Kunststoffplatte
|
||||
Silicon lump = Silikonklumpen
|
||||
Simple Integrated Circuit = Einfacher integrierter Schaltkreis
|
||||
Small Wooden Drawer = Kleiner Holzschubkasten
|
||||
Terracotta Roof Tile = Terrakottadachziegel
|
||||
Titanium Dioxide = Titandioxid
|
||||
Uncooked Terracotta Base = Ungebrannte Terrakotta
|
||||
Unprocessed Plastic base = Unverarbeitetes Plastik
|
||||
|
||||
### door_models.lua ###
|
||||
|
||||
### door_nodes.lua ###
|
||||
|
||||
### fences.lua ###
|
||||
Barbed Wire Fence = Stacheldrahtzaun
|
||||
Barbed Wire Fence Corner = Stacheldrahtzaunecke
|
||||
Barbed Wire Fence Gate = Stacheldrahtzauntor
|
||||
Brass Fence/railing = Messingzaun/Gelaender
|
||||
Brass Fence/railing with sign = Messingzaun/Gelaender mit Schild
|
||||
Chainlink Fence = Maschendrahtzaun
|
||||
Chainlink Fence Corner = Maschendrahtzaunecke
|
||||
Chainlink Fence Gate = Maschendrahtzauntor
|
||||
Unpainted Picket Fence = Unlackierter Lattenenzaun
|
||||
Unpainted Picket Fence Corner = Unlackierte Lattenenzaunecke
|
||||
Unpainted Picket Fence Gate = Unlackiertes Lattenzauntor
|
||||
White Picket Fence = Weisser Lattenzaun
|
||||
White Picket Fence Corner = Weisse Lattenzaunecke
|
||||
White Picket Fence Gate = Weisses Lattenzauntor
|
||||
Wooden Privacy Fence = Sichtschutzzaun aus Holz
|
||||
Wooden Privacy Fence Corner = Sichtschutzzaunecke aus Holz
|
||||
Wrought Iron Fence/railing = Schmiedeeiserner Zaun/Gelaender
|
||||
Wrought Iron Fence/railing with sign = Schmiedeeiserner Zaun/Gelaender mit Schild
|
||||
want to simply place the wielded item like usual. = Moechte einfach den getragenen Gegenstand wie gewohnt platzieren.
|
||||
|
||||
### furniture.lua ###
|
||||
Table = Tisch
|
||||
Chair = Stuhl
|
||||
Black = schwarz
|
||||
Red = rot
|
||||
Pink = rosa
|
||||
Violet = violett
|
||||
Blue = blau
|
||||
Dark Green = dunkelgruen
|
||||
## 1: Color name
|
||||
Armchair (%s) = Sessel (%s)
|
||||
Table Lamp = Tischlampe
|
||||
|
||||
### furniture_medieval.lua ###
|
||||
Bars = Gitterstaebe
|
||||
Binding Bars = Eckverbindung fuer Gitterstaebe
|
||||
Chains = Ketten
|
||||
Wall Torch = Wandfackel
|
||||
|
||||
### furniture_bathroom.lua ###
|
||||
Toilet = Toilette
|
||||
Sink = Waschbecken
|
||||
Taps = Wasserhahn
|
||||
Shower Tray = Duschtasse
|
||||
Shower Head = Duschbrause
|
||||
|
||||
### init.lua ###
|
||||
Loaded! = Geladen!
|
||||
Air Conditioner = Klimaanlage
|
||||
Asphalt Shingles = Asphaltschindeln
|
||||
Asphalt Shingles (outer corner) = Asphaltschindeln (Aussenecke)
|
||||
Asphalt Shingles (inner corner) = Asphaltschindeln (Innenecke)
|
||||
Black Plastic Flower Pot = Schwarzer Plastikblumentopf
|
||||
Brass Pole = Messingstange
|
||||
Brass Table Legs = Messingtischbeine
|
||||
Wrought Iron Table Legs = Schmiedeeiserne Tischbeine
|
||||
red = rot
|
||||
green = gruen
|
||||
blue = blau
|
||||
white = weiss
|
||||
pink = rosa
|
||||
violet = violett
|
||||
## 1: Color name
|
||||
Curtains (%s) = Vorhaenge (%s)
|
||||
Drop-Ceiling Tile = Deckenplatte
|
||||
Glass Skylight = Glasdachfenster
|
||||
Glass Skylight Frosted = Milchglasdachfenster
|
||||
Glass Table (Small, Round) = Glastischplatte (klein, rund)
|
||||
Glass Table (Small, Square) = Glastischplatte (klein, quadratisch)
|
||||
Glass Table Piece (large) = Glastischplatte (gross)
|
||||
Green Plastic Flower Pot = Gruener Plastikblumentopf
|
||||
Large Area Rug = Grosser Teppich
|
||||
Glass Table Piece (large) = Glastischplatte (gross)
|
||||
Large Stereo Speaker = Grosser Lautsprecher
|
||||
Legs for Utility Table = Tischbeine fuer Arbeitsplatte
|
||||
Projection Screen Material = Projektorleinwand
|
||||
Small Surround Speaker = Kleiner Lautsprecher
|
||||
Small Throw Rug = Kleiner Teppich
|
||||
Stereo Receiver = Stereoanlage
|
||||
Terracotta Flower Pot = Terrakottablumentopf
|
||||
Terracotta Shingles = Terrakottaschindeln
|
||||
Terracotta Shingles (outer corner) = Terrakottaschindeln (Aussenecke)
|
||||
Terracotta Shingles (inner corner) = Terrakottaschindeln (Innenecke)
|
||||
Textured Ceiling Paint = Deckenfarbe (Raufaser)
|
||||
Utility Table = Arbeitsplatte
|
||||
Utility table mk2 = Arbeitsplatte Modell 2
|
||||
Wooden Shutter (Black) = Holzjalousie (schwarz)
|
||||
Wooden Shutter (Dark grey) = Holzjalousie (dunkelgrau)
|
||||
Wooden Shutter (Forest green) = Holzjalousie (waldgruen)
|
||||
Wooden Shutter (Grey) = Holzjalousie (grau)
|
||||
Wooden Shutter (Light blue) = Holzjalousie (hellblau)
|
||||
Wooden Shutter (Violet) = Holzjalousie (violett)
|
||||
Wooden Shutter (Red) = Holzjalousie (rot)
|
||||
Wooden Shutter (Mahogany) = Holzjalousie (mahagoni)
|
||||
Wooden Shutter (Unpainted oak) = Holzjalousie (eiche)
|
||||
Wooden Shutter (White) = Holzjalousie (weiss)
|
||||
Wooden Shutter (Yellow) = Holzjalousie (gelb)
|
||||
Wood Table Piece (large)= Holztischplatte (gross)
|
||||
Wood Table (Small, Round) = Holztischplatte (klein, rund)
|
||||
Wood Table (Small, Square) = Holztischplatte (klein, quadratisch)
|
||||
Wood Shingles = Holzschindeln
|
||||
Wood Shingles (outer corner) = Holzschindeln (Aussenecke)
|
||||
Wood Shingles (inner corner) = Holzschindeln (Innenecke)
|
||||
Wrought Iron Pole = Schmiedeeiserne Stange
|
||||
someone = jemand
|
||||
## 1: Player name
|
||||
Sorry, %s owns that spot. = Tut mir leid, %s gehoert diese Stelle.
|
||||
|
||||
### lighting.lua ###
|
||||
White Glowlight (small cube) = Weisse Gluehlampe (kleiner Wuerfel)
|
||||
White Glowlight (small cube, on ceiling) = Weisse Gluehlampe (kleiner Wuerfel, an der Decke)
|
||||
White Glowlight (thick) = Weisse Gluehlampe (dick)
|
||||
White Glowlight (thick, on wall) = Weisse Gluehlampe (dick, an der Wand)
|
||||
White Glowlight (thin) = Weisse Gluehlampe (duenn)
|
||||
White Glowlight (thin, on wall) = Weisse Gluehlampe (duenn, an der Wand)
|
||||
Yellow Glowlight (small cube) = Gelbe Gluehlampe (kleiner Wuerfel)
|
||||
Yellow Glowlight (small cube, on ceiling) = Gelbe Gluehlampe (kleiner Wuerfel, an der Decke)
|
||||
Yellow Glowlight (thick) = Gelbe Gluehlampe (dick)
|
||||
Yellow Glowlight (thick, on wall) = Gelbe Gluehlampe (dick, an der Wand)
|
||||
Yellow Glowlight (thin) = Gelbe Gluehlampe (duenn)
|
||||
Yellow Glowlight (thin, on wall) = Gelbe Gluehlampe (duenn, an der Wand)
|
||||
|
||||
### locked.lua ###
|
||||
## 1: Item description, 2: Owner name
|
||||
%s (owned by %s) = %s (gehoert %s)
|
||||
## 1: Player name, 2: Item description, 3: Owner name, 4: Position
|
||||
%s tried to access a %s belonging to %s at %s = %s versuchte Zugang zu %s von %s zu bekommen bei %s
|
||||
## 1: Item description
|
||||
%s (Locked) = %s (verschlossen)
|
||||
Locked Fridge = Verschlossener Kuehlschrank
|
||||
Locked Cabinet = Verschlossener Schrank
|
||||
Locked Nightstand = Verschlossener Nachttisch
|
||||
Locked Oven = Verschlossener Herd
|
||||
Locked Oven (active) = Verschlossener Herd (aktiv)
|
||||
Locked Microwave Oven = Verschlossene Mikrowelle
|
||||
Locked Microwave Oven (active) = Verschlossene Mikrowelle (aktiv)
|
||||
|
||||
### nightstands.lua ###
|
||||
Mahogany Nightstand with One Drawer = Mahagoninachttisch mit einer Schublade
|
||||
Mahogany Nightstand with Two Drawers = Mahagoninachttisch mit zwei Schubladen
|
||||
Oak Nightstand with One Drawer = Eichenachttisch mit einer Schublade
|
||||
Oak Nightstand with Two Drawers = Eichenachttisch mit zwei Schubladen
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in nightstand at %s = %s bewegt etwas im Nachttisch
|
||||
%s moves stuff to nightstand at %s = %s legt etwas in den Nachttisch
|
||||
%s takes stuff from nightstand at %s = %s nimmt etwas aus dem Nachttisch
|
||||
One-drawer Nightstand = Nachttisch mit einer Schublade
|
||||
Two-drawer Nightstand = Nachttisch mit zwei Schubladen
|
||||
|
||||
### oven.lua ###
|
||||
Oven = Herd
|
||||
Microwave Oven = Mikrowelle
|
||||
## 1: Item descrition
|
||||
Could not insert '%s' = Kann '%s' nicht einfuegen
|
||||
## 1: Item description, 2: Percentage
|
||||
%s active: %d%% = %s ist aktiv: %d%%
|
||||
## 1: Item description
|
||||
%s is empty = %s ist leer
|
||||
: Out of fuel = : kein Brennmaterial vorhanden
|
||||
: output bins are full = : Produktfelder sind voll
|
||||
|
||||
### refrigerator.lua ###
|
||||
Refrigerator = Kuehlschrank
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in refrigerator at %s = %s bewegt etwas im Kuehlschrank bei %s
|
||||
%s moves stuff to refrigerator at %s = %s legt etwas in den Kuehlschrank bei %s
|
||||
%s takes stuff from refrigerator at %s = %s nimmt etwas aus dem Kuehlschrank bei %s
|
||||
Not enough vertical space to place a refrigerator! = Es gibt nicht genug Raum ueber dieser Stelle um den Kuehlschrank zu platzieren!
|
||||
|
||||
### television.lua ###
|
||||
Small CRT Television = Kleiner Roehrenfernseher
|
194
mods/homedecor_modpack/homedecor/locale/es.txt
Normal file
@ -0,0 +1,194 @@
|
||||
|
||||
#
|
||||
# Language: Español
|
||||
# Author: Diego Martínez <lkaezadl3@gmail.com>
|
||||
#
|
||||
|
||||
### kitchen_cabinet.lua ###
|
||||
Kitchen Cabinet = Gabinete de Cocina
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in kitchen cabinet at %s = %s mueve cosas en gabinete de cocina en %s
|
||||
%s moves stuff to kitchen cabinet at %s = %s mueve cosas al gabinete de cocina en %s
|
||||
%s takes stuff from kitchen cabinet at %s = %s toma cosas del gabinete de cocina en %s
|
||||
Half-height Kitchen Cabinet (on ceiling) = Gabinete de cocina de media altura (en techo)
|
||||
Under-sink cabinet = Gabinete con Lavabo
|
||||
Kitchen Cabinet with sink = Gabinete de cocina con lavabo
|
||||
|
||||
### door_models.lua ###
|
||||
Mahogany Closet Door = Puerta de Armario de Caoba
|
||||
Oak Closet Door = Puerta de Armario de Roble
|
||||
Fancy Wood/Glass Door = Puerta de Madera y Cristal de Lujo
|
||||
Glass Office Door = Puerta de Oficina de Cristal
|
||||
Glass and Wood, Mahogany-colored = Cristal y Madera, color Caoba
|
||||
Glass and Wood, Oak-colored = Cristal y Madera, color Roble
|
||||
Glass and Wood, White = Cristal y Madera, color Blanco
|
||||
Plain Wooden Door = Puerta Simple de Madera
|
||||
left = izquierda
|
||||
right = derecha
|
||||
## 1: Side the doors opens to
|
||||
(Top Half, %s-opening) = (Parte Superior, abre a la %s)
|
||||
(%s-opening) = (abre a la %s)
|
||||
|
||||
### door_nodes.lua ###
|
||||
Not enough vertical space to place a door! = ¡No hay suficiente espacio vertical para colocar una puerta!
|
||||
|
||||
### crafts.lua ###
|
||||
Brass Ingot = Lingote de Latón
|
||||
Bucket of white paint = Cubo de Pintura Blanca
|
||||
Legs for Small Utility table = Patas de Mesa Utilitaria Pequeña
|
||||
Plastic sheet = Lámina de Plástico
|
||||
Silicon lump = Terrón de Silicio
|
||||
Simple Integrated Circuit = Circuito Integrado Simple
|
||||
Small Wooden Drawer = Cajón Pequeño de Madera
|
||||
Terracotta Roof Tile = Teja de Terracota
|
||||
Titanium Dioxide = Dióxido de Titanio
|
||||
Uncooked Terracotta Base = Base de Terracota sin Cocer
|
||||
Unprocessed Plastic base = Base de Plástico sin Procesar
|
||||
|
||||
### fences.lua ###
|
||||
Barbed Wire Fence = Cerca de Alambre de Púas
|
||||
Barbed Wire Fence Gate = Portón de Cerca de Alambre de Púas
|
||||
Brass Fence/railing = Cerca/Barandilla de Latón
|
||||
Brass Fence/railing with sign = Cerca/Barandilla de Latón con Letrero
|
||||
Chainlink Fence = Cerca de Cadenas
|
||||
Chainlink Fence Gate = Portón de Cerca de Cadenas
|
||||
Chainlink Fence Gate (open) = Portón de Cerca de Cadenas (Abierto)
|
||||
Unpainted Picket Fence = Cerca de Piquete sin pintar
|
||||
Unpainted Picket Fence Gate = Portón de Cerca de Piquete sin pintar
|
||||
White Picket Fence = Cerca de Piquete blanca
|
||||
White Picket Fence Gate = Portón de Cerca de Piquete blanca
|
||||
Wooden Privacy Fence = Cerca privada de madera
|
||||
Wrought Iron Fence/railing = Cerca/Barandilla de Hierro Forjado
|
||||
Wrought Iron Fence/railing with sign = Cerca/Barandilla de Hierro Forjado con Letrero
|
||||
want to simply place the wielded item like usual. = solo se desea colocar el objeto empuñado normalmente.
|
||||
|
||||
### furniture_medieval.lua ###
|
||||
Bars = Barras
|
||||
Binding Bars = Barras de Unión
|
||||
Chains = Cadenas
|
||||
Wall Torch = Antorcha de Pared
|
||||
|
||||
### furniture_bathroom.lua ###
|
||||
Toilet = Inodoro
|
||||
Sink = Lavabo
|
||||
Taps = Grifo
|
||||
Shower Tray = Piso de Ducha
|
||||
Shower Head = Ducha
|
||||
|
||||
### init.lua ###
|
||||
Loaded! = ¡Cargado!
|
||||
Asphalt Shingles = Tejas de Asfalto
|
||||
Black Plastic Flower Pot = Florero de Plástico Negro
|
||||
Brass Pole = Poste de Latón
|
||||
Brass Table Legs = Patas de Mesa de Latón
|
||||
red = rojas
|
||||
green = verdes
|
||||
blue = azules
|
||||
white = blancas
|
||||
pink = rosas
|
||||
violet = violetas
|
||||
## 1: Color name
|
||||
Curtains (%s) = Cortinas (%s)
|
||||
Drop-Ceiling Tile = Cielorraso
|
||||
Glass Skylight = Claraboya de Cristal
|
||||
Glass Table (Small, Round) = Mesa de Cristal (Pequeña, Redonda)
|
||||
Glass Table (Small, Square) = Mesa de Cristal (Pequeña, Cuadrada)
|
||||
Green Plastic Flower Pot = Florero de Plástico Negro
|
||||
Large Area Rug = Manta Grande
|
||||
Large Glass Table Piece = Pieza de Mesa de Cristal Grande
|
||||
Large Stereo Speaker = Altavoz de Estéreo Grande
|
||||
Legs for Utility Table = Patas de Mesa Utilitaria
|
||||
Projection Screen Material = Material de Pantalla de Proyección
|
||||
Small Surround Speaker = Pequeño Altavoz Envolvente
|
||||
Small Throw Rug = Manta Pequeña
|
||||
Stereo Receiver = Receptor Estéreo
|
||||
Terracotta Flower Pot = Florero de Terracota
|
||||
Terracotta Roofing = Tejado de Terracota
|
||||
Textured Ceiling Paint = Pintura Texturada para Techo
|
||||
Utility Table = Mesa Utilitaria
|
||||
Utility table mk2 = Mesa Utilitaria mk2
|
||||
Wooden Shutter (Black) = Obturador de Madera (Negro)
|
||||
Wooden Shutter (Dark Grey) = Obturador de Madera (Gris Oscuro)
|
||||
Wooden Shutter (Forest Green) = Obturador de Madera (Verde Bosque)
|
||||
Wooden Shutter (Grey) = Obturador de Madera (Gris)
|
||||
Wooden Shutter (Light Blue) = Obturador de Madera (Azul Claro)
|
||||
Wooden Shutter (Purple) = Obturador de Madera (Púrpura)
|
||||
Wooden Shutter (Red) = Obturador de Madera (Rojo)
|
||||
Wooden Shutter (Unpainted Mahogany) = Obturador de Madera (Caoba sin Pintar)
|
||||
Wooden Shutter (Unpainted Oak) = Obturador de Madera (Roble sin Pintar)
|
||||
Wooden Shutter (White) = Obturador de Madera (Blanco)
|
||||
Wooden Shutter (Yellow) = Obturador de Madera (Amarillo)
|
||||
Wooden Tabletop piece = Pieza de Mesa de Madera
|
||||
Wooden Tabletop (Small, Round) = Pieza de Mesa de Madera (Pequeña, Redonda)
|
||||
Wooden Tabletop (Small, Square) = Pieza de Mesa de Madera (Pequeña, Cuadrada)
|
||||
Wood Shingles = Tejas de Madera
|
||||
Wrought Iron Pole = Poste de Hierro Forjado
|
||||
someone = alguien
|
||||
## 1: Player name
|
||||
Sorry, %s owns that spot. = Lo siento, %s es dueño de ése lugar.
|
||||
|
||||
### lighting.lua ###
|
||||
White Glowlight (small cube) = Luz Blanca (cubo pequeño)
|
||||
White Glowlight (small cube, on ceiling) = Luz Blanca (cubo pequeño, en techo)
|
||||
White Glowlight (thick) = Luz Blanca (Gruesa)
|
||||
White Glowlight (thick, on wall) = Luz Blanca (Gruesa, en pared)
|
||||
White Glowlight (thin) = Luz Blanca (Fina)
|
||||
White Glowlight (thin, on wall) = Luz Blanca (Fina, en pared)
|
||||
Yellow Glowlight (small cube) = Luz Amarilla (cubo pequeño)
|
||||
Yellow Glowlight (small cube, on ceiling) = Luz Amarilla (cubo pequeño, en techo)
|
||||
Yellow Glowlight (thick) = Luz Amarilla (Gruesa)
|
||||
Yellow Glowlight (thick, on wall) = Luz Amarilla (Gruesa, en pared)
|
||||
Yellow Glowlight (thin) = Luz Amarilla (Fina)
|
||||
Yellow Glowlight (thin, on wall) = Luz Amarilla (Fina, en pared)
|
||||
|
||||
### locked.lua ###
|
||||
## 1: Item description, 2: Owner name
|
||||
%s (owned by %s) = %s (propiedad de %s)
|
||||
## 1: Player name, 2: Item description, 3: Owner name, 4: Position
|
||||
%s tried to access a %s belonging to %s at %s = %s ha intentado acceder un(a) %s propiedad de %s en %s
|
||||
## 1: Item description
|
||||
%s (Locked) = %s (Cerrado)
|
||||
Locked Cabinet = Gabinete Cerrado
|
||||
Locked Nightstand = Mesa de Noche Cerrada
|
||||
Locked Fridge = Refri Cerrado
|
||||
Locked Oven = Estufa Cerrada
|
||||
|
||||
### nightstands.lua ###
|
||||
Mahogany Nightstand with One Drawer = Mesa de Noche de Caoba, un Cajón
|
||||
Mahogany Nightstand with Two Drawers = Mesa de Noche de Caoba, dos Cajones
|
||||
Oak Nightstand with One Drawer = Mesa de Noche de Roble, un Cajón
|
||||
Oak Nightstand with Two Drawers = Mesa de Noche de Roble, dos Cajones
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in nightstand at %s = %s mueve cosas en mesa de noche en %s
|
||||
%s moves stuff to nightstand at %s = %s mueve cosas hacia mesa de noche en %s
|
||||
%s takes stuff from nightstand at %s = %s mueve cosas desde mesa de noche en %s
|
||||
One-drawer Nightstand = Mesa de Noche de un Cajón
|
||||
Two-drawer Nightstand = Mesa de Noche de dos Cajones
|
||||
|
||||
### oven.lua ###
|
||||
Oven = Estufa
|
||||
## 1: Item name
|
||||
Could not insert '%s' = No se pudo insertar '%s'
|
||||
## 1: Percentage
|
||||
Oven active: %d%% = Estufa activa: %d%%
|
||||
Oven out of fuel = Estufa sin combustible
|
||||
Oven is empty = Estufavacía
|
||||
|
||||
### refrigerator.lua ###
|
||||
Refrigerator = Refrigerador
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in refrigerator at %s = %s mueve cosas en refrigerador en %s
|
||||
%s moves stuff to refrigerator at %s = %s mueve cosas hacia refrigerador en %s
|
||||
%s takes stuff from refrigerator at %s = %s mueve cosas desde refrigerador en %s
|
||||
Not enough vertical space to place a refrigerator! = ¡No hay suficiente espacio vertical para colocar un refrigerador!
|
||||
|
||||
### television.lua ###
|
||||
Small CRT Television = Pequeña Televisión CRT
|
||||
|
||||
### signs_lib.lua ###
|
||||
%s wrote "%s" to sign at %s = %s ha escrito "%s" en el letrero en %s
|
||||
Reading cached character database. = Leyendo base de datos de catacteres.
|
||||
Font seems to have changed. Rebuilding cache. = La fuente parece haber cambiado. Reconstruyendo información guardada.
|
||||
Could not find font line height in cached DB. Trying brute force. = No se pudo encontrar la altura de línea en la base de datos. Intentando con fuerza bruta.
|
||||
Registered %s and %s = Registrados %s y %s
|
||||
signs loaded = letreros cargados
|
180
mods/homedecor_modpack/homedecor/locale/fr.txt
Normal file
@ -0,0 +1,180 @@
|
||||
|
||||
#
|
||||
# Language: Français
|
||||
# Author: Calinou
|
||||
#
|
||||
|
||||
### kitchen_cabinet.lua ###
|
||||
Kitchen Cabinet = Meuble de cuisine
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in kitchen cabinet at %s = %s déplace des objets dans un meuble de cuisine à %s
|
||||
%s moves stuff to kitchen cabinet at %s = %s édplace des objets vers un meuble de cuisine à %s
|
||||
%s takes stuff from kitchen cabinet at %s = %s prend des objets d'un meuble de cuisine à %s
|
||||
Half-height Kitchen Cabinet (on ceiling) = Meuble de cuisine réduit en hauteur (sur le plafond)
|
||||
Under-sink cabinet = Meuble sous évier
|
||||
Kitchen Cabinet with sink = Meuble de cuisine avec lavabo
|
||||
|
||||
### door_models.lua ###
|
||||
Mahogany Closet Door = Porte en bois d'acajou
|
||||
Oak Closet Door = Porte en bois de chêne
|
||||
Fancy Wood/Glass Door = Porte artistique en bois et verre
|
||||
Glass Office Door = Porte en verre
|
||||
Glass and Wood, Mahogany-colored = Porte couleur acajou en bois et verre
|
||||
Glass and Wood, Oak-colored = Porte couleur chêne en bois et verre
|
||||
Glass and Wood, White = Porte blanche en bois et verre
|
||||
Plain Wooden Door = Porte en bois simple
|
||||
left = gauche
|
||||
right = droite
|
||||
## 1: Side the doors opens to
|
||||
(Top Half, %s-opening) = (partie supérieur, charnière à %s)
|
||||
(%s-opening) = (charnière à %s)
|
||||
|
||||
### door_nodes.lua ###
|
||||
Not enough vertical space to place a door! = Pas assez d'espace vertical pour placer une porte !
|
||||
|
||||
### crafts.lua ###
|
||||
Brass Ingot = Lingot de laiton
|
||||
Bucket of white paint = Seau de peinture blanche
|
||||
Legs for Small Utility table = Pieds pour table basse
|
||||
Plastic sheet = Bout de plastique
|
||||
Silicon lump = Silicone
|
||||
Simple Integrated Circuit = Circuit intégré simple
|
||||
Small Wooden Drawer = Petit tiroir en bois
|
||||
Terracotta Roof Tile = Tuile de toit en terre cuite
|
||||
Titanium Dioxide = Dioxide de titane
|
||||
Uncooked Terracotta Base = Base de terre non cuite
|
||||
Unprocessed Plastic base = Base de plastique non transformée
|
||||
|
||||
### fences.lua ###
|
||||
Barbed Wire Fence = Barrière en fil barbelé
|
||||
Barbed Wire Fence Gate = Porte de barrière en fil barbelé
|
||||
Brass Fence/railing = Barrière en laiton
|
||||
Brass Fence/railing with sign = Barrière en laiton avec pancarte
|
||||
Chainlink Fence = Grillage
|
||||
Chainlink Fence Gate = Porte de grillage
|
||||
Chainlink Fence Gate (open) = Porte de grillage (ouverte)
|
||||
Unpainted Picket Fence = Barrière en piquets non peinte
|
||||
Unpainted Picket Fence Gate = Porte de barrière en piquets non peinte
|
||||
White Picket Fence = Barrière en piquets blanche
|
||||
White Picket Fence Gate = Porte de barrière en piquets blanche
|
||||
Wooden Privacy Fence = Barrière en bois
|
||||
Wrought Iron Fence/railing = Barrière en fer forgé
|
||||
Wrought Iron Fence/railing with sign = Barrière en fer forgé avec pancarte
|
||||
want to simply place the wielded item like usual. = veut simplement placer l'objet comme d'habitude.
|
||||
|
||||
### init.lua ###
|
||||
Loaded! = Chargé !
|
||||
Asphalt Shingles = Bardeaux d'asphalte
|
||||
Black Plastic Flower Pot = Pot de fleur en plastique noir
|
||||
Brass Pole = Barre en laiton
|
||||
Brass Table Legs = Pieds de table en laiton
|
||||
red = rouges
|
||||
green = vertes
|
||||
blue = bleues
|
||||
white = blanches
|
||||
pink = roses
|
||||
violet = violettes
|
||||
## 1: Color name
|
||||
Curtains (%s) = Volets (%s)
|
||||
Drop-Ceiling Tile = Dalle suspendue au plafond
|
||||
Glass Skylight = Verre
|
||||
Glass Table (Small, Round) = Table en verre (petite, ronde)
|
||||
Glass Table (Small, Square) = Table en verre (petite, carrée)
|
||||
Green Plastic Flower Pot = Pot de fleur en plastique vert
|
||||
Large Area Rug = Grande couverture
|
||||
Large Glass Table Piece = Grand bout de verre de table
|
||||
Large Stereo Speaker = Grand haut-parleur stéréo
|
||||
Legs for Utility Table = Pieds pour table basse
|
||||
Projection Screen Material = Matériel pour projecteur
|
||||
Small Surround Speaker = Petit haut-parleur surround
|
||||
Small Throw Rug = Petite couverture
|
||||
Stereo Receiver = Récepteur stéréo
|
||||
Terracotta Flower Pot = Pot de fleur en terre cuite
|
||||
Terracotta Roofing = Tuile en terre cuite
|
||||
Textured Ceiling Paint = Papier peint avec motif pour plafond
|
||||
Utility Table = Table basse
|
||||
Utility table mk2 = Table basse MK2
|
||||
Wooden Shutter (Black) = Volet en bois (noir)
|
||||
Wooden Shutter (Dark Grey) = Volet en bois (gris foncé)
|
||||
Wooden Shutter (Forest Green) = Volet en bois (vert foncé)
|
||||
Wooden Shutter (Grey) = Volet en bois (gris)
|
||||
Wooden Shutter (Light Blue) = Volet en bois (bleu clair)
|
||||
Wooden Shutter (Purple) = Volet en bois (violet)
|
||||
Wooden Shutter (Red) = Volet en bois (rouge)
|
||||
Wooden Shutter (Unpainted Mahogany) = Volet en bois (acajou non peint)
|
||||
Wooden Shutter (Unpainted Oak) = Volet en bois (chêne non peint)
|
||||
Wooden Shutter (White) = Volet en bois (blanc)
|
||||
Wooden Shutter (Yellow) = Volet en bois (jaune)
|
||||
Wooden Tabletop piece = Bout de dessus de table
|
||||
Wooden Tabletop (Small, Round) = Dessus de table (petit, rond)
|
||||
Wooden Tabletop (Small, Square) = Dessus de table (petit, carré)
|
||||
Wood Shingles = Bardeaux de bois
|
||||
Wrought Iron Pole = Barre de fer forgé
|
||||
someone = quelqu'un
|
||||
## 1: Player name
|
||||
Sorry, %s owns that spot. = Désolé, %s est propriétaire de cette zone.
|
||||
|
||||
### lighting.lua ###
|
||||
White Glowlight (small cube) = Lampe blanche (petit cube)
|
||||
White Glowlight (small cube, on ceiling) = Lampe blanche (petit cube, sur le plafond)
|
||||
White Glowlight (thick) = Lampe blanche (épaisse)
|
||||
White Glowlight (thick, on wall) = Lampe blanche (épaisse, sur le mur)
|
||||
White Glowlight (thin) = Lampe blanche (fine)
|
||||
White Glowlight (thin, on wall) = Lampe blanche (fine, sur le mur)
|
||||
Yellow Glowlight (small cube) = Lampe jaune (petit cube)
|
||||
Yellow Glowlight (small cube, on ceiling) = Lampe jaune (petit cube, sur le plafond)
|
||||
Yellow Glowlight (thick) = Lampe jaune (épaisse)
|
||||
Yellow Glowlight (thick, on wall) = Lampe jaune (épaisse, sur le mur)
|
||||
Yellow Glowlight (thin) = Lampe jaune (fine)
|
||||
Yellow Glowlight (thin, on wall) = Lampe jaune (fine, sur le mur)
|
||||
|
||||
### locked.lua ###
|
||||
## 1: Item description, 2: Owner name
|
||||
%s (owned by %s) = %s (propriété de %s)
|
||||
## 1: Player name, 2: Item description, 3: Owner name, 4: Position
|
||||
%s tried to access a %s belonging to %s at %s = %s a essayé d'accéder à %s qui est propriété de %s à %s
|
||||
## 1: Item description
|
||||
%s (Locked) = %s (verrouillé)
|
||||
Locked Cabinet = Meuble verrouillé
|
||||
Locked Nightstand = Table de chevet verrouillée
|
||||
Locked Fridge = Réfrégirateur verrouillé
|
||||
Locked Oven = Four verrouillé
|
||||
|
||||
### nightstands.lua ###
|
||||
Mahogany Nightstand with One Drawer = Table de chevet en acajou avec un tiroir
|
||||
Mahogany Nightstand with Two Drawers = Table de chevet en acajou avec deux tiroirs
|
||||
Oak Nightstand with One Drawer = Table de chevet en chêne avec un tiroir
|
||||
Oak Nightstand with Two Drawers = Table de chevet en chêne avec deux tiroirs
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in nightstand at %s = %s déplace des objets dans une table de chevet à %s
|
||||
%s moves stuff to nightstand at %s = %s déplace des objets vers une table de chevet à %s
|
||||
%s takes stuff from nightstand at %s = %s prend des objets d'une table de chevet à %s
|
||||
One-drawer Nightstand = Table de chevet avec un tiroir
|
||||
Two-drawer Nightstand = Table de chevet avec deux tiroirs
|
||||
|
||||
### oven.lua ###
|
||||
Oven = Four
|
||||
## 1: Item name
|
||||
Could not insert '%s' = Ne peut insérer '%s'
|
||||
## 1: Percentage
|
||||
Oven active: %d%% = Four actif : %d%%
|
||||
Oven out of fuel = Four sans carburant
|
||||
Oven is empty = Four vide
|
||||
|
||||
### refrigerator.lua ###
|
||||
Refrigerator = Réfrégirateur
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in refrigerator at %s = %s déplace des objets dans un réfrégirateur à %s
|
||||
%s moves stuff to refrigerator at %s = %s déplace des objets vers un réfrégirateur à %s
|
||||
%s takes stuff from refrigerator at %s = %s prend des objets d'un réfrégirateur à %s
|
||||
Not enough vertical space to place a refrigerator! = Pas assez d'espace vertical pour placer un réfrégirateur !
|
||||
|
||||
### television.lua ###
|
||||
Small CRT Television = Petite télévision à tube cathodique
|
||||
|
||||
### signs_lib.lua ###
|
||||
E: character map file not found = E: fichier de table de caractère non trouvé
|
||||
## 1: Full String, 2: pos in string, 3: current char at pos
|
||||
W: unknown symbol in '%s' at %d (probably %s) = A: symbole inconnu dans '%s' dans %d (probablement %s)
|
||||
%s wrote "%s" to sign at %s =
|
||||
signs loaded =
|
198
mods/homedecor_modpack/homedecor/locale/pt.txt
Normal file
@ -0,0 +1,198 @@
|
||||
|
||||
# Brazilian Portuguese translation of homedecor
|
||||
# Last update: 2013/11/10
|
||||
# Last translator: Aracnus <frederico@teia.bio.br>
|
||||
|
||||
### Special strings ###
|
||||
|
||||
### kitchen_cabinet.lua ###
|
||||
Kitchen Cabinet = Armário de cozinha
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in kitchen cabinet at %s = %s moveu itens no armário de cozinha em %s
|
||||
%s moves stuff to kitchen cabinet at %s = %s moveu itens para o armário de cozinha em %s
|
||||
%s takes stuff from kitchen cabinet at %s = %s retirou itens do armário de cozinha em %s
|
||||
Half-height Kitchen Cabinet (on ceiling) = Meio armário de cozinha (no teto)
|
||||
Under-sink cabinet = Armário sob a pia
|
||||
Kitchen Cabinet with sink = Armário de cozinha com pia
|
||||
|
||||
### door_models.lua ###
|
||||
Mahogany Closet Door = Porta do armário de mogno
|
||||
Oak Closet Door = Porta do armário de carvalho
|
||||
Fancy Wood/Glass Door = Porta de madeira/vidro trabalhada
|
||||
Glass Office Door = Porta de escritório de vidro
|
||||
Glass and Wood, Mahogany-colored = Vidro e madeira (mogno)
|
||||
Glass and Wood, Oak-colored = Vidro e madeira (carvalho)
|
||||
Glass and Wood, White = Vidro e madeira (branca)
|
||||
Plain Wooden Door = Porta de madeira simples
|
||||
left = esquerda
|
||||
right = direita
|
||||
## 1: Side the doors opens to
|
||||
(Top Half, %s-opening) = (Metade superior, abre para %s)
|
||||
(%s-opening) = (abre para %s)
|
||||
|
||||
|
||||
### door_nodes.lua ###
|
||||
Not enough vertical space to place a door! = Não existe espaço vertical suficiente para colocar uma porta.
|
||||
|
||||
### crafts.lua ###
|
||||
Brass Ingot = Lingote de bronze
|
||||
Bucket of white paint = Balde de tinta branca
|
||||
Legs for Small Utility table = Pernas para mesa pequena
|
||||
Plastic sheet = Folha de plástico
|
||||
Silicon lump = Massa de silício
|
||||
Simple Integrated Circuit = Circuito integrado simples
|
||||
Small Wooden Drawer = Gaveta pequena de madeira
|
||||
Terracotta Roof Tile = Telha de terracota
|
||||
Titanium Dioxide = Dióxido de titânio
|
||||
Uncooked Terracotta Base = Base bruta de terracota
|
||||
Unprocessed Plastic base = Base de plástico não processada
|
||||
|
||||
### door_models.lua ###
|
||||
|
||||
### door_nodes.lua ###
|
||||
|
||||
### fences.lua ###
|
||||
Barbed Wire Fence = Cerca de arame farpado
|
||||
Barbed Wire Fence Gate = Portão da cerca de arame farpado
|
||||
Brass Fence/railing = Cerca/corrimão de bronze
|
||||
Brass Fence/railing with sign = Cerca/corrimão de bronze, com placa
|
||||
Chainlink Fence = Cerca de tela de arame
|
||||
Chainlink Fence Gate = Portão da cerca de tela de arame
|
||||
Chainlink Fence Gate (open) = Portão da cerca de tela de arame (aberto)
|
||||
Unpainted Picket Fence = Cerca de tábuas não pintada
|
||||
Unpainted Picket Fence Gate = Portão da cerca de madeira não pintado
|
||||
White Picket Fence = Cerca de madeira branca
|
||||
White Picket Fence Gate = Portão da cerca de madeira branco
|
||||
Wooden Privacy Fence = Cerca fechada de mandeira
|
||||
Wrought Iron Fence/railing = Cerca/corrimão de ferro forjado
|
||||
Wrought Iron Fence/railing with sign = Cerca/corrimão de ferro forjado, com placa
|
||||
want to simply place the wielded item like usual. = quer somente colocar o item empunhado normalmente.
|
||||
|
||||
### furniture_medieval.lua ###
|
||||
Bars = Barras
|
||||
Binding Bars = Barras do canto
|
||||
Chains = Correntes
|
||||
Wall Torch = Tocha de parede
|
||||
|
||||
### furniture_bathroom.lua ###
|
||||
Toilet = Vaso sanitário
|
||||
Sink = Pia
|
||||
Taps = Torneira
|
||||
Shower Tray = Ralo do chuveiro
|
||||
Shower Head = Chuveiro
|
||||
|
||||
### init.lua ###
|
||||
Loaded! = Carregado!
|
||||
Asphalt Shingles = Telhas de asfalto
|
||||
Black Plastic Flower Pot = Vaso de flor de plástico preto
|
||||
Brass Pole = Poste de bronze
|
||||
Brass Table Legs = Pernas da mesa de bronze
|
||||
red = vermelho
|
||||
green = verde
|
||||
blue = azul
|
||||
white = branco
|
||||
pink = rosa
|
||||
violet = violeta
|
||||
## 1: Color name
|
||||
Curtains (%s) = Cortina (%s)
|
||||
Drop-Ceiling Tile = Placa de teto
|
||||
Glass Skylight = Claraboia de vidro
|
||||
Glass Table (Small, Round) = Mesa de vidro (pequena, redonda)
|
||||
Glass Table (Small, Square) = Mesa de vidro (pequena, quadrada)
|
||||
Green Plastic Flower Pot = Vaso de flor de plástico verde
|
||||
Large Area Rug = Tapete grande
|
||||
Large Glass Table Piece = Pedaço da mesa grande de vidro
|
||||
Large Stereo Speaker = Auto-falante grande
|
||||
Legs for Utility Table = Pernas para mesa
|
||||
Projection Screen Material = Material de tela de projeção
|
||||
Small Surround Speaker = Auto-falante pequeno
|
||||
Small Throw Rug = Tapete pequeno
|
||||
Stereo Receiver = Aparelho de som
|
||||
Terracotta Flower Pot = Vaso de flor de terracota
|
||||
Terracotta Roofing = Telhado de terracota
|
||||
Textured Ceiling Paint = Pintura texturizada do teto
|
||||
Utility Table = Mesa de trabalho
|
||||
Utility table mk2 = Mesa de trabalho mk2
|
||||
Wooden Shutter (Black) = Persiana de madeira (preta)
|
||||
Wooden Shutter (Dark Grey) = Persiana de madeira (cinza escura)
|
||||
Wooden Shutter (Forest Green) = Persiana de madeira (verde)
|
||||
Wooden Shutter (Grey) = Persiana de madeira (cinza)
|
||||
Wooden Shutter (Light Blue) = Persiana de madeira (azul clara)
|
||||
Wooden Shutter (Purple) = Persiana de madeira (roxa)
|
||||
Wooden Shutter (Red) = Persiana de madeira (vermelha)
|
||||
Wooden Shutter (Unpainted Mahogany) = Persiana de madeira (mogno)
|
||||
Wooden Shutter (Unpainted Oak) = Persiana de madeira (carvalho)
|
||||
Wooden Shutter (White) = Persiana de madeira (branca)
|
||||
Wooden Shutter (Yellow) = Persiana de madeira (amarela)
|
||||
Wooden Tabletop piece = Pedaço do tampo da mesa
|
||||
Wooden Tabletop (Small, Round) = Tampo da mesa (pequeno, arredondado)
|
||||
Wooden Tabletop (Small, Square) = Tampo da mesa (pequeno, quadrado)
|
||||
Wood Shingles = Telhas de madeira
|
||||
Wrought Iron Pole = Poste de ferro forjado
|
||||
someone = alguém
|
||||
## 1: Player name
|
||||
Sorry, %s owns that spot. = Desculpe, mas esse local pertence a %s.
|
||||
|
||||
### lighting.lua ###
|
||||
White Glowlight (small cube) = Arandela branca (cubo pequeno)
|
||||
White Glowlight (small cube, on ceiling) = Arandela branca (cubo pequeno, na parede)
|
||||
White Glowlight (thick) = Arandela branca (grossa)
|
||||
White Glowlight (thick, on wall) = Arandela branca (grossa, na parede)
|
||||
White Glowlight (thin) = Arandela branca (fina)
|
||||
White Glowlight (thin, on wall) = Arandela branca (fina, na parede)
|
||||
Yellow Glowlight (small cube) = Arandela amarela (cubo pequeno)
|
||||
Yellow Glowlight (small cube, on ceiling) = Arandela amarela (cubo pequeno, na parede)
|
||||
Yellow Glowlight (thick) = Arandela amarela (grossa)
|
||||
Yellow Glowlight (thick, on wall) = Arandela amarela (grossa, na parede)
|
||||
Yellow Glowlight (thin) = Arandela amarela (fina)
|
||||
Yellow Glowlight (thin, on wall) = Arandela amarela (fina, na parede)
|
||||
|
||||
### locked.lua ###
|
||||
## 1: Item description, 2: Owner name
|
||||
%s (owned by %s) = %s (pertence a %s)
|
||||
## 1: Player name, 2: Item description, 3: Owner name, 4: Position
|
||||
%s tried to access a %s belonging to %s at %s = %s tentou acessar %s pertencente a %s em %s
|
||||
## 1: Item description
|
||||
%s (Locked) = %s (trancado)
|
||||
Locked Cabinet = Armário trancado
|
||||
Locked Nightstand = Criado-mudo trancado
|
||||
|
||||
### nightstands.lua ###
|
||||
Mahogany Nightstand with One Drawer = Criado-mudo de mogno, com uma gaveta
|
||||
Mahogany Nightstand with Two Drawers = Criado-mudo de mogno, com duas gavetas
|
||||
Oak Nightstand with One Drawer = Criado-mudo de carvalho, com uma gaveta
|
||||
Oak Nightstand with Two Drawers = Criado-mudo de carvalho, com duas gavetas
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in nightstand at %s = %s moveu item(ns) no criado-mudo em %s
|
||||
%s moves stuff to nightstand at %s = %s moveu item(ns) para o criado-mudo em %s
|
||||
%s takes stuff from nightstand at %s = %s tirou item(ns) do criado-mudo em %s
|
||||
One-drawer Nightstand = Criado-mudo com uma gaveta
|
||||
Two-drawer Nightstand = Criado-mudo com duas gavetas
|
||||
|
||||
### oven.lua ###
|
||||
Oven = Forno
|
||||
## 1: Item name
|
||||
Could not insert '%s' = Não foi possível inserir '%s'
|
||||
## 1: Percentage
|
||||
Oven active: %d%% = Forno ativo: %d%%
|
||||
Oven out of fuel = O forno está sem combustível
|
||||
Oven is empty = O forno está vazio
|
||||
|
||||
### refrigerator.lua ###
|
||||
Refrigerator = Geladeira
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in refrigerator at %s = %s moveu item(ns) na geladeira em %s
|
||||
%s moves stuff to refrigerator at %s = %s moveu item(ns) para a geladeira em %s
|
||||
%s takes stuff from refrigerator at %s = %s tirou item(ns) da geladeira em %s
|
||||
Not enough vertical space to place a refrigerator! = Não existe espaço vertical suficiente para adicionar uma geladeira.
|
||||
|
||||
### television.lua ###
|
||||
Small CRT Television = TV de tubo pequena
|
||||
|
||||
### signs_lib.lua ###
|
||||
%s wrote "%s" to sign at %s = %s escreveu "%s" na placa em %s
|
||||
Reading cached character database. = Lendo banco de dados de caracteres no cache.
|
||||
Font seems to have changed. Rebuilding cache. = Aparentemente as fontes foram alteradas. Reconstruindo o cache.
|
||||
Could not find font line height in cached DB. Trying brute force. = Não foi possível encontrar a altura da linha da fonte no cache do BD. Tentando na marra.
|
||||
Registered %s and %s = %s e %s registrados
|
||||
signs loaded = placas carregadas
|
232
mods/homedecor_modpack/homedecor/locale/template.txt
Normal file
@ -0,0 +1,232 @@
|
||||
##########################
|
||||
# Template language file #
|
||||
##########################
|
||||
|
||||
### Special strings ###
|
||||
|
||||
### kitchen_cabinet.lua ###
|
||||
Kitchen Cabinet =
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in kitchen cabinet at %s =
|
||||
%s moves stuff to kitchen cabinet at %s =
|
||||
%s takes stuff from kitchen cabinet at %s =
|
||||
Half-height Kitchen Cabinet (on ceiling) =
|
||||
Under-sink cabinet =
|
||||
Kitchen Cabinet with sink =
|
||||
|
||||
### door_models.lua ###
|
||||
Mahogany Closet Door =
|
||||
Oak Closet Door =
|
||||
Fancy Wood/Glass Door =
|
||||
Glass Office Door =
|
||||
Glass and Wood, Mahogany-colored =
|
||||
Glass and Wood, Oak-colored =
|
||||
Glass and Wood, White =
|
||||
Plain Wooden Door =
|
||||
left =
|
||||
right =
|
||||
## 1: Side the doors opens to
|
||||
(Top Half, %s-opening) =
|
||||
(%s-opening) =
|
||||
|
||||
|
||||
### door_nodes.lua ###
|
||||
Not enough space above that spot to place a door! =
|
||||
|
||||
### crafts.lua ###
|
||||
Brass Ingot =
|
||||
Bucket of white paint =
|
||||
Legs for Small Utility table =
|
||||
Plastic sheet =
|
||||
Silicon lump =
|
||||
Simple Integrated Circuit =
|
||||
Small Wooden Drawer =
|
||||
Terracotta Roof Tile =
|
||||
Titanium Dioxide =
|
||||
Uncooked Terracotta Base =
|
||||
Unprocessed Plastic base =
|
||||
|
||||
### door_models.lua ###
|
||||
|
||||
### door_nodes.lua ###
|
||||
|
||||
### fences.lua ###
|
||||
Barbed Wire Fence =
|
||||
Barbed Wire Fence Corner =
|
||||
Barbed Wire Fence Gate =
|
||||
Brass Fence/railing =
|
||||
Brass Fence/railing with sign =
|
||||
Chainlink Fence =
|
||||
Chainlink Fence Corner =
|
||||
Chainlink Fence Gate =
|
||||
Unpainted Picket Fence =
|
||||
Unpainted Picket Fence Corner =
|
||||
Unpainted Picket Fence Gate =
|
||||
White Picket Fence =
|
||||
White Picket Fence Corner =
|
||||
White Picket Fence Gate =
|
||||
Wooden Privacy Fence =
|
||||
Wooden Privacy Fence Corner =
|
||||
Wrought Iron Fence/railing =
|
||||
Wrought Iron Fence/railing with sign =
|
||||
want to simply place the wielded item like usual. =
|
||||
|
||||
### furniture.lua ###
|
||||
Table =
|
||||
Chair =
|
||||
Black =
|
||||
Red =
|
||||
Pink =
|
||||
Violet =
|
||||
Blue =
|
||||
Dark Green =
|
||||
## 1: Color name
|
||||
Armchair (%s) =
|
||||
Table Lamp =
|
||||
|
||||
### furniture_medieval.lua ###
|
||||
Bars =
|
||||
Binding Bars =
|
||||
Chains =
|
||||
Wall Torch =
|
||||
|
||||
### furniture_bathroom.lua ###
|
||||
Toilet =
|
||||
Sink =
|
||||
Taps =
|
||||
Shower Tray =
|
||||
Shower Head =
|
||||
|
||||
### init.lua ###
|
||||
Loaded! =
|
||||
Air Conditioner =
|
||||
Asphalt Shingles =
|
||||
Asphalt Shingles (outer corner) =
|
||||
Asphalt Shingles (inner corner) =
|
||||
Black Plastic Flower Pot =
|
||||
Brass Pole =
|
||||
Brass Table Legs =
|
||||
Wrought Iron Table Legs =
|
||||
red =
|
||||
green =
|
||||
blue =
|
||||
white =
|
||||
pink =
|
||||
violet =
|
||||
## 1: Color name
|
||||
Curtains (%s) =
|
||||
Drop-Ceiling Tile =
|
||||
Glass Skylight =
|
||||
Glass Skylight Frosted =
|
||||
Glass Table (Small, Round) =
|
||||
Glass Table (Small, Square) =
|
||||
Glass Table Piece (large) =
|
||||
Green Plastic Flower Pot =
|
||||
Large Area Rug =
|
||||
Glass Table Piece (large) =
|
||||
Large Stereo Speaker =
|
||||
Legs for Utility Table =
|
||||
Projection Screen Material =
|
||||
Small Surround Speaker =
|
||||
Small Throw Rug =
|
||||
Stereo Receiver =
|
||||
Terracotta Flower Pot =
|
||||
Terracotta Shingles =
|
||||
Terracotta Shingles (outer corner) =
|
||||
Terracotta Shingles (inner corner) =
|
||||
Textured Ceiling Paint =
|
||||
Utility Table =
|
||||
Utility table mk2 =
|
||||
Wooden Shutter (Black) =
|
||||
Wooden Shutter (Dark grey) =
|
||||
Wooden Shutter (Forest green) =
|
||||
Wooden Shutter (Grey) =
|
||||
Wooden Shutter (Light blue) =
|
||||
Wooden Shutter (Violet) =
|
||||
Wooden Shutter (Red) =
|
||||
Wooden Shutter (Mahogany) =
|
||||
Wooden Shutter (Unpainted oak) =
|
||||
Wooden Shutter (White) =
|
||||
Wooden Shutter (Yellow) =
|
||||
Wood Table Piece (large)=
|
||||
Wood Table (Small, Round) =
|
||||
Wood Table (Small, Square) =
|
||||
Wood Shingles =
|
||||
Wood Shingles (outer corner) =
|
||||
Wood Shingles (inner corner) =
|
||||
Wrought Iron Pole =
|
||||
someone =
|
||||
## 1: Player name
|
||||
Sorry, %s owns that spot. =
|
||||
|
||||
### lighting.lua ###
|
||||
White Glowlight (small cube) =
|
||||
White Glowlight (small cube, on ceiling) =
|
||||
White Glowlight (thick) =
|
||||
White Glowlight (thick, on wall) =
|
||||
White Glowlight (thin) =
|
||||
White Glowlight (thin, on wall) =
|
||||
Yellow Glowlight (small cube) =
|
||||
Yellow Glowlight (small cube, on ceiling) =
|
||||
Yellow Glowlight (thick) =
|
||||
Yellow Glowlight (thick, on wall) =
|
||||
Yellow Glowlight (thin) =
|
||||
Yellow Glowlight (thin, on wall) =
|
||||
|
||||
### locked.lua ###
|
||||
## 1: Item description, 2: Owner name
|
||||
%s (owned by %s) =
|
||||
## 1: Player name, 2: Item description, 3: Owner name, 4: Position
|
||||
%s tried to access a %s belonging to %s at %s =
|
||||
## 1: Item description
|
||||
%s (Locked) =
|
||||
Locked Fridge =
|
||||
Locked Cabinet =
|
||||
Locked Nightstand =
|
||||
Locked Oven =
|
||||
Locked Oven (active) =
|
||||
Locked Microwave Oven =
|
||||
Locked Microwave Oven (active) =
|
||||
|
||||
### nightstands.lua ###
|
||||
Mahogany Nightstand with One Drawer =
|
||||
Mahogany Nightstand with Two Drawers =
|
||||
Oak Nightstand with One Drawer =
|
||||
Oak Nightstand with Two Drawers =
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in nightstand at %s =
|
||||
%s moves stuff to nightstand at %s =
|
||||
%s takes stuff from nightstand at %s =
|
||||
One-drawer Nightstand =
|
||||
Two-drawer Nightstand =
|
||||
|
||||
### oven.lua ###
|
||||
Oven =
|
||||
Microwave Oven =
|
||||
## 1: Item descrition
|
||||
Could not insert '%s' =
|
||||
## 1: Item description, 2: Percentage
|
||||
%s active: %d%% =
|
||||
## 1: Item description
|
||||
%s is empty =
|
||||
: Out of fuel =
|
||||
: output bins are full =
|
||||
|
||||
### refrigerator.lua ###
|
||||
Refrigerator =
|
||||
## 1: Player name, 2: position
|
||||
%s moves stuff in refrigerator at %s =
|
||||
%s moves stuff to refrigerator at %s =
|
||||
%s takes stuff from refrigerator at %s =
|
||||
Not enough vertical space to place a refrigerator! =
|
||||
|
||||
### television.lua ###
|
||||
Small CRT Television =
|
||||
|
||||
### signs_lib.lua ###
|
||||
%s wrote "%s" to sign at %s =
|
||||
Reading cached character database. =
|
||||
Font seems to have changed. Rebuilding cache. =
|
||||
Could not find font line height in cached DB. Trying brute force. =
|
||||
Registered %s and %s =
|
||||
signs loaded =
|
161
mods/homedecor_modpack/homedecor/locked.lua
Normal file
@ -0,0 +1,161 @@
|
||||
-- Locked Stuff for Home Decor mod, by Kaeza
|
||||
--
|
||||
-- The code is mostly copypasta from default:chest_locked, with a few
|
||||
-- tidbits to ease creation of new items, should need arise.
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
--[[
|
||||
| create_locked ( name, infotext )
|
||||
|
|
||||
| Description:
|
||||
| This function takes a base node name such as "homedecor:refrigerator",
|
||||
| copies the definition from the original item into a new table, modifies
|
||||
| it a bit, and registers a new node with a "_locked" suffix such as
|
||||
| "homedecor:refrigerator_locked". The new node behaves identically to
|
||||
| the base node, except that moving items to/from the node's inventory
|
||||
| is only allowed for the original placer. In addition, it register a new
|
||||
| shapeless recipe for the node, using the base node plus a steel ingot.
|
||||
|
|
||||
| Arguments:
|
||||
| name The base node name
|
||||
| infotext The infotext description (in case the name is too long).
|
||||
|
|
||||
| Example Usage:
|
||||
| create_locked("homedecor:refrigerator", "Locked Fridge")
|
||||
| ^ This generates a new "Locked Refrigerator" node, whose infotext is
|
||||
| "Locked Fridge (owned by <placer>)".
|
||||
|
|
||||
| Notes:
|
||||
| If <infotext> is not specified (or is nil), the infotext will be the
|
||||
| base node's description prefixed by "Locked ".
|
||||
|
|
||||
| The ABM for the locked oven is defined in oven.lua.
|
||||
]]
|
||||
local function create_locked ( name, infotext )
|
||||
local def = { }
|
||||
for k, v in pairs(minetest.registered_nodes[name]) do
|
||||
def[k] = v
|
||||
end
|
||||
def.type = nil
|
||||
def.name = nil
|
||||
def.description = S("%s (Locked)"):format(def.description)
|
||||
local after_place_node = def.after_place_node
|
||||
def.after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", placer:get_player_name() or "")
|
||||
meta:set_string("infotext", S("%s (owned by %s)"):format(infotext,meta:get_string("owner")))
|
||||
if (after_place_node) then
|
||||
return after_place_node(pos, placer)
|
||||
end
|
||||
end
|
||||
local allow_metadata_inventory_move = def.allow_metadata_inventory_move;
|
||||
def.allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if (player:get_player_name() ~= meta:get_string("owner")) then
|
||||
minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format(
|
||||
player:get_player_name(),
|
||||
infotext,
|
||||
meta:get_string("owner"),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
return 0
|
||||
end
|
||||
if (allow_metadata_inventory_move) then
|
||||
return allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
else
|
||||
return count
|
||||
end
|
||||
end
|
||||
local allow_metadata_inventory_put = def.allow_metadata_inventory_put;
|
||||
def.allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if (player:get_player_name() ~= meta:get_string("owner")) then
|
||||
minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format(
|
||||
player:get_player_name(),
|
||||
infotext,
|
||||
meta:get_string("owner"),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
return 0
|
||||
end
|
||||
if (allow_metadata_inventory_put) then
|
||||
return allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||
else
|
||||
return stack:get_count()
|
||||
end
|
||||
end
|
||||
local allow_metadata_inventory_take = def.allow_metadata_inventory_take;
|
||||
def.allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if (player:get_player_name() ~= meta:get_string("owner")) then
|
||||
minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format(
|
||||
player:get_player_name(),
|
||||
infotext,
|
||||
meta:get_string("owner"),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
return 0
|
||||
end
|
||||
if (allow_metadata_inventory_take) then
|
||||
return allow_metadata_inventory_take(pos, listname, index, stack, player)
|
||||
else
|
||||
return stack:get_count()
|
||||
end
|
||||
end
|
||||
minetest.register_node(name.."_locked", def)
|
||||
minetest.register_craft({
|
||||
output = name.."_locked",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
name,
|
||||
"default:steel_ingot",
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
local items = {
|
||||
{ "refrigerator_white_bottom",
|
||||
"Refrigerator" },
|
||||
{ "refrigerator_steel_bottom",
|
||||
"Refrigerator (stainless steel)" },
|
||||
{ "kitchen_cabinet",
|
||||
"Cabinet" },
|
||||
{ "kitchen_cabinet_steel",
|
||||
"Cabinet (stainless steel top)" },
|
||||
{ "kitchen_cabinet_granite",
|
||||
"Cabinet (granite top)" },
|
||||
{ "kitchen_cabinet_marble",
|
||||
"Cabinet (marble top)" },
|
||||
{ "kitchen_cabinet_half",
|
||||
"Cabinet" },
|
||||
{ "kitchen_cabinet_with_sink",
|
||||
"Cabinet" },
|
||||
{ "nightstand_oak_one_drawer",
|
||||
"Nightstand" },
|
||||
{ "nightstand_oak_two_drawers",
|
||||
"Nightstand" },
|
||||
{ "nightstand_mahogany_one_drawer",
|
||||
"Nightstand" },
|
||||
{ "nightstand_mahogany_two_drawers",
|
||||
"Nightstand" },
|
||||
{ "filing_cabinet",
|
||||
"Filing cabinet" },
|
||||
{ "oven",
|
||||
"Oven" },
|
||||
{ "oven_active",
|
||||
"Oven (active)" },
|
||||
{ "oven_steel",
|
||||
"Oven (stainless steel)" },
|
||||
{ "oven_steel_active",
|
||||
"Oven (stainless steel, active)" },
|
||||
{ "microwave_oven",
|
||||
"Microwave Oven" },
|
||||
{ "microwave_oven_active",
|
||||
"Microwave Oven (active)" },
|
||||
}
|
||||
|
||||
for _,item in ipairs(items) do
|
||||
local name, info = item[1], item[2];
|
||||
create_locked("homedecor:"..name, S("Locked "..info));
|
||||
end
|
185
mods/homedecor_modpack/homedecor/misc-bathroom.lua
Normal file
@ -0,0 +1,185 @@
|
||||
local S = homedecor.gettext
|
||||
|
||||
local bathroom_tile_colors = {
|
||||
{ "1", "white/grey" },
|
||||
{ "2", "white/dark grey" },
|
||||
{ "3", "white/black" },
|
||||
{ "4", "black/dark grey" },
|
||||
{ "red", "white/red" },
|
||||
{ "green", "white/green" },
|
||||
{ "blue", "white/blue" },
|
||||
{ "yellow", "white/yellow" },
|
||||
{ "tan", "white/tan" },
|
||||
}
|
||||
|
||||
for i in ipairs(bathroom_tile_colors) do
|
||||
local color = bathroom_tile_colors[i][1]
|
||||
local shade = bathroom_tile_colors[i][2]
|
||||
minetest.register_node("homedecor:tiles_"..color, {
|
||||
description = "Bathroom/kitchen tiles ("..shade..")",
|
||||
tiles = {
|
||||
"homedecor_bathroom_tiles_"..color..".png",
|
||||
"homedecor_bathroom_tiles_"..color..".png",
|
||||
"homedecor_bathroom_tiles_"..color..".png",
|
||||
"homedecor_bathroom_tiles_"..color..".png",
|
||||
"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(),
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:towel_rod", {
|
||||
description = "Towel rod with towel",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_towel_rod_top.png",
|
||||
"homedecor_towel_rod_bottom.png",
|
||||
"homedecor_towel_rod_sides.png",
|
||||
"homedecor_towel_rod_sides.png^[transformFX",
|
||||
"homedecor_towel_rod_fb.png",
|
||||
"homedecor_towel_rod_fb.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.375, 0.1875, 0.25, -0.3125, 0.375, 0.5},
|
||||
{ 0.3125, 0.1875, 0.25, 0.375, 0.375, 0.5},
|
||||
{-0.3125, 0.25, 0.3125, 0.3125, 0.375, 0.375},
|
||||
{-0.3125, 0, 0.375, 0.3125, 0.34375, 0.4375},
|
||||
{-0.3125, -0.3125, 0.25, 0.3125, 0.34375, 0.3125},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.375, -0.3125, 0.25, 0.375, 0.375, 0.5 }
|
||||
},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:medicine_cabinet', {
|
||||
drawtype = "nodebox",
|
||||
description = S("Medicine Cabinet"),
|
||||
tiles = {
|
||||
'homedecor_medicine_cabinet_tb.png',
|
||||
'homedecor_medicine_cabinet_tb.png',
|
||||
'homedecor_medicine_cabinet_sides.png',
|
||||
'homedecor_medicine_cabinet_sides.png',
|
||||
'homedecor_medicine_cabinet_back.png',
|
||||
'homedecor_medicine_cabinet_front.png'
|
||||
},
|
||||
inventory_image = "homedecor_medicine_cabinet_inv.png",
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:medicine_cabinet_open", param2 = fdir })
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,7]"..
|
||||
"list[current_name;main;1,0;6,1;]"..
|
||||
"list[current_player;main;0,3;8,4;]")
|
||||
meta:set_string("infotext", S("Medicine cabinet"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 16)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in medicine cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to medicine cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from medicine cabinet at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:medicine_cabinet_open", {
|
||||
tiles = {
|
||||
'homedecor_medicine_cabinet_tb.png',
|
||||
'homedecor_medicine_cabinet_tb.png',
|
||||
"homedecor_medicine_cabinet_open_right.png",
|
||||
'homedecor_medicine_cabinet_sides.png',
|
||||
'homedecor_medicine_cabinet_back.png',
|
||||
"homedecor_medicine_cabinet_open_front.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.1875, 0.375, 0.3125, 0.5, 0.5}, -- NodeBox1
|
||||
{0.28, -0.1875, -0.1875, 0.3125, 0.5, 0.375}, -- NodeBox2
|
||||
}
|
||||
},
|
||||
drop = "homedecor:medicine_cabinet",
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:medicine_cabinet", param2 = fdir })
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:toilet_paper", {
|
||||
description = S("Toilet paper"),
|
||||
tiles = {
|
||||
"homedecor_toilet_paper_sides.png",
|
||||
"homedecor_toilet_paper_sides.png",
|
||||
"homedecor_toilet_paper_ends.png",
|
||||
"homedecor_toilet_paper_ends.png",
|
||||
"homedecor_toilet_paper_sides.png",
|
||||
"homedecor_toilet_paper_sides.png"
|
||||
},
|
||||
inventory_image = "homedecor_toilet_paper_inv.png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.25, 0.1875, 0.4375, -0.1875, 0.375, 0.5}, -- NodeBox1
|
||||
{0.125, 0.1875, 0.4375, 0.1875, 0.375, 0.5}, -- NodeBox2
|
||||
{-0.25, 0.25, 0.1875, -0.1875, 0.3125, 0.5}, -- NodeBox3
|
||||
{0.125, 0.25, 0.1875, 0.1875, 0.3125, 0.5}, -- NodeBox4
|
||||
{-0.1875, 0.125, 0.125, 0.125, 0.4375, 0.3125}, -- NodeBox5
|
||||
{-0.1875, 0.1875, 0.0625, 0.125, 0.375, 0.375}, -- NodeBox6
|
||||
}
|
||||
},
|
||||
groups = {snappy=2,oddly_breakable_by_hand=3,flammable=3},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
62
mods/homedecor_modpack/homedecor/misc-electrical.lua
Normal file
@ -0,0 +1,62 @@
|
||||
minetest.register_node("homedecor:power_outlet", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
description = "Power Outlet",
|
||||
tiles = {
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_edges.png",
|
||||
"homedecor_outlet_back.png",
|
||||
"homedecor_outlet_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_outlet_inv.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.125, -0.3125, 0.4375, 0.125, 0, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1875, -0.375, 0.375, 0.1875, 0.0625, 0.5},
|
||||
}
|
||||
},
|
||||
groups = {cracky=3,dig_immediate=2},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:light_switch", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
description = "Light switch",
|
||||
tiles = {
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_edges.png",
|
||||
"homedecor_light_switch_back.png",
|
||||
"homedecor_light_switch_front.png"
|
||||
},
|
||||
inventory_image = "homedecor_light_switch_inv.png",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.125, -0.5, 0.4375, 0.125, -0.1875, 0.5 },
|
||||
{ -0.03125, -0.3125, 0.40625, 0.03125, -0.25, 0.5 },
|
||||
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.1875, -0.5625, 0.375, 0.1875, -0.1250, 0.5 },
|
||||
}
|
||||
},
|
||||
groups = {cracky=3,dig_immediate=2},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
1961
mods/homedecor_modpack/homedecor/misc-nodes.lua
Normal file
BIN
mods/homedecor_modpack/homedecor/models/homedecor_desk_fan.b3d
Normal file
After Width: | Height: | Size: 367 B |
261
mods/homedecor_modpack/homedecor/nightstands.lua
Normal file
@ -0,0 +1,261 @@
|
||||
-- This file supplies nightstands
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node('homedecor:nightstand_oak_one_drawer', {
|
||||
drawtype = "nodebox",
|
||||
description = S("Oak Nightstand with One Drawer"),
|
||||
tiles = { 'homedecor_nightstand_oak_top.png',
|
||||
'homedecor_nightstand_oak_bottom.png',
|
||||
'homedecor_nightstand_oak_right.png',
|
||||
'homedecor_nightstand_oak_left.png',
|
||||
'homedecor_nightstand_oak_back.png',
|
||||
'homedecor_nightstand_oak_1_drawer_front.png'},
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, 0, -30/64, 8/16, 8/16, 8/16 }, -- top half
|
||||
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64}, -- drawer face
|
||||
{ -8/16, -8/16, -30/64, -7/16, 0, 8/16 }, -- left
|
||||
{ 7/16, -8/16, -30/64, 8/16, 0, 8/16 }, -- right
|
||||
{ -8/16, -8/16, 7/16, 8/16, 0, 8/16 }, -- back
|
||||
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,6]"..
|
||||
"list[current_name;main;0,0;8,1;]"..
|
||||
"list[current_player;main;0,2;8,4;]")
|
||||
meta:set_string("infotext", S("One-drawer Nightstand"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:nightstand_oak_two_drawers', {
|
||||
drawtype = "nodebox",
|
||||
description = S("Oak Nightstand with Two Drawers"),
|
||||
tiles = { 'homedecor_nightstand_oak_top.png',
|
||||
'homedecor_nightstand_oak_bottom.png',
|
||||
'homedecor_nightstand_oak_right.png',
|
||||
'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 = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, -30/64, 8/16, 8/16, 8/16 }, -- main body
|
||||
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64 }, -- top drawer face
|
||||
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
|
||||
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,7]"..
|
||||
"list[current_name;main;0,0;8,2;]"..
|
||||
"list[current_player;main;0,3;8,4;]")
|
||||
meta:set_string("infotext", S("Two-drawer Nightstand"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 16)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:nightstand_mahogany_one_drawer', {
|
||||
drawtype = "nodebox",
|
||||
description = S("Mahogany Nightstand with One Drawer"),
|
||||
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
||||
'homedecor_nightstand_mahogany_bottom.png',
|
||||
'homedecor_nightstand_mahogany_right.png',
|
||||
'homedecor_nightstand_mahogany_left.png',
|
||||
'homedecor_nightstand_mahogany_back.png',
|
||||
'homedecor_nightstand_mahogany_1_drawer_front.png'},
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, 0, -30/64, 8/16, 8/16, 8/16 }, -- top half
|
||||
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64}, -- drawer face
|
||||
{ -8/16, -8/16, -30/64, -7/16, 0, 8/16 }, -- left
|
||||
{ 7/16, -8/16, -30/64, 8/16, 0, 8/16 }, -- right
|
||||
{ -8/16, -8/16, 7/16, 8/16, 0, 8/16 }, -- back
|
||||
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,6]"..
|
||||
"list[current_name;main;0,0;8,1;]"..
|
||||
"list[current_player;main;0,2;8,4;]")
|
||||
meta:set_string("infotext", S("One-drawer Nightstand"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:nightstand_mahogany_two_drawers', {
|
||||
drawtype = "nodebox",
|
||||
description = S("Mahogany Nightstand with Two Drawers"),
|
||||
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
||||
'homedecor_nightstand_mahogany_bottom.png',
|
||||
'homedecor_nightstand_mahogany_right.png',
|
||||
'homedecor_nightstand_mahogany_left.png',
|
||||
'homedecor_nightstand_mahogany_back.png',
|
||||
'homedecor_nightstand_mahogany_2_drawer_front.png'},
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, -30/64, 8/16, 8/16, 8/16 }, -- main body
|
||||
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64 }, -- top drawer face
|
||||
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
|
||||
|
||||
}
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,7]"..
|
||||
"list[current_name;main;0,0;8,2;]"..
|
||||
"list[current_player;main;0,3;8,4;]")
|
||||
meta:set_string("infotext", S("Two-drawer Nightstand"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 16)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from nightstand at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
29
mods/homedecor_modpack/homedecor/paintings.lua
Normal file
@ -0,0 +1,29 @@
|
||||
--Various kinds of paintings
|
||||
|
||||
for i = 1,20 do
|
||||
minetest.register_node("homedecor:painting_"..i, {
|
||||
description = "Decorative painting #"..i,
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_painting_edges.png",
|
||||
"homedecor_painting_edges.png",
|
||||
"homedecor_painting_edges.png",
|
||||
"homedecor_painting_edges.png",
|
||||
"homedecor_painting_back.png",
|
||||
"homedecor_painting"..i..".png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -32/64, -32/64, 28/64, -30/64, 32/64, 32/64 }, -- left edge
|
||||
{ 30/64, -32/64, 28/64, 32/64, 32/64, 32/64 }, -- right edge
|
||||
{ -32/64, 30/64, 28/64, 32/64, 32/64, 32/64 }, -- top edge
|
||||
{ -32/64, -30/64, 28/64, 32/64, -32/64, 32/64 }, -- bottom edge
|
||||
{ -32/64, -32/64, 29/64, 32/64, 32/64, 29/64 } -- the canvas
|
||||
}
|
||||
},
|
||||
groups = {snappy=3},
|
||||
})
|
||||
end
|
323
mods/homedecor_modpack/homedecor/refrigerator.lua
Normal file
@ -0,0 +1,323 @@
|
||||
-- This file supplies refrigerators
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
-- nodebox models
|
||||
|
||||
local fridge_model_bottom = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, -0.4375, -0.4375, 0.5, 0.5, 0.5}, -- NodeBox1
|
||||
{-0.5, -0.5, -0.42, 0.5, 0.5, 0.5}, -- NodeBox2
|
||||
{-0.5, -0.4375, -0.4375, -0.0625, 0.5, 0.5}, -- NodeBox3
|
||||
{0, 0.25, -0.5, 0.0625, 0.3125, -0.4375}, -- NodeBox4
|
||||
{-0.125, 0.25, -0.5, -0.0625, 0.3125, -0.4375}, -- NodeBox5
|
||||
{0, 0.25, -0.5, 0.0625, 0.5, -0.473029}, -- NodeBox6
|
||||
{-0.125, 0.25, -0.5, -0.0625, 0.5, -0.473029}, -- NodeBox7
|
||||
}
|
||||
}
|
||||
|
||||
local fridge_model_top = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, -0.5, -0.4375, 0.5, 0.5, 0.5}, -- NodeBox1
|
||||
{-0.0625, -0.5, -0.42, 0, 0.5, 0.5}, -- NodeBox2
|
||||
{-0.5, -0.5, -0.4375, -0.0625, -0.4375, 0.5}, -- NodeBox3
|
||||
{-0.5, -0.5, -0.4375, -0.4375, 0.5, 0.5}, -- NodeBox4
|
||||
{-0.5, -0.1875, -0.4375, -0.0625, 0.5, 0.5}, -- NodeBox5
|
||||
{-0.4375, -0.4375, -0.125, -0.0625, -0.1875, 0.5}, -- NodeBox6
|
||||
{-0.125, -0.4375, -0.4375, -0.0625, -0.1875, -0.125}, -- NodeBox7
|
||||
{-0.3125, -0.3125, -0.307054, -0.25, -0.1875, -0.286307}, -- NodeBox8
|
||||
{-0.125, 0, -0.5, -0.0625, 0.0625, -0.4375}, -- NodeBox9
|
||||
{0, 0, -0.5, 0.0625, 0.0625, -0.4375}, -- NodeBox10
|
||||
{0, -0.5, -0.5, 0.0625, 0.0625, -0.473029}, -- NodeBox11
|
||||
{-0.125, -0.5, -0.5, -0.0625, 0.0625, -0.473029}, -- NodeBox12
|
||||
}
|
||||
}
|
||||
|
||||
-- steel-textured fridge
|
||||
|
||||
minetest.register_node("homedecor:refrigerator_steel_bottom", {
|
||||
tiles = {
|
||||
"default_steel_block.png",
|
||||
"homedecor_refrigerator_steel_bottom.png",
|
||||
"homedecor_refrigerator_steel_sides2.png",
|
||||
"homedecor_refrigerator_steel_sides2.png^[transformFX",
|
||||
"homedecor_refrigerator_steel_back2.png",
|
||||
"homedecor_refrigerator_steel_front2.png"
|
||||
},
|
||||
inventory_image = "homedecor_refrigerator_steel_inv.png",
|
||||
description = S("Refrigerator (stainless steel)"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = fridge_model_bottom,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.under
|
||||
local pnode = minetest.get_node(pointed_thing.under)
|
||||
local rnodedef = minetest.registered_nodes[pnode.name]
|
||||
|
||||
if not rnodedef["buildable_to"] then
|
||||
pos = pointed_thing.above
|
||||
end
|
||||
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
|
||||
local tnode = minetest.get_node(pos)
|
||||
local tnode2 = minetest.get_node(pos2)
|
||||
|
||||
if homedecor.get_nodedef_field(tnode.name, "buildable_to")
|
||||
and homedecor.get_nodedef_field(tnode2.name, "buildable_to")
|
||||
and not minetest.is_protected(pos, placer:get_player_name())
|
||||
and not minetest.is_protected(pos2, placer:get_player_name()) then
|
||||
local nodename = itemstack:get_name()
|
||||
minetest.add_node(pos, { name = nodename, param2 = fdir })
|
||||
minetest.add_node(pos2, { name = "homedecor:refrigerator_steel_top", param2 = fdir })
|
||||
|
||||
if string.find(nodename, "_locked") then
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", placer:get_player_name() or "")
|
||||
meta:set_string("infotext", S("Locked Refrigerator (owned by %s)"):format(meta:get_string("owner")))
|
||||
end
|
||||
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(pos2).name == "homedecor:refrigerator_steel_top" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[10,10]"..
|
||||
"list[current_name;main;0,0;10,5;]"..
|
||||
"list[current_player;main;1,6;8,4;]")
|
||||
meta:set_string("infotext", S("Refrigerator"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main",50)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in refrigerator at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to refrigerator at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from refrigerator at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:refrigerator_steel_top", {
|
||||
tiles = {
|
||||
"homedecor_refrigerator_steel_top.png",
|
||||
"default_steel_block.png",
|
||||
"homedecor_refrigerator_steel_sides1.png",
|
||||
"homedecor_refrigerator_steel_sides1.png^[transformFX",
|
||||
"homedecor_refrigerator_steel_back1.png",
|
||||
"homedecor_refrigerator_steel_front1.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = fridge_model_top,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
},
|
||||
})
|
||||
|
||||
-- white, enameled fridge
|
||||
|
||||
minetest.register_node("homedecor:refrigerator_white_bottom", {
|
||||
tiles = {
|
||||
"default_steel_block.png",
|
||||
"homedecor_refrigerator_white_bottom.png",
|
||||
"homedecor_refrigerator_white_sides2.png",
|
||||
"homedecor_refrigerator_white_sides2.png^[transformFX",
|
||||
"homedecor_refrigerator_white_back2.png",
|
||||
"homedecor_refrigerator_white_front2.png"
|
||||
},
|
||||
inventory_image = "homedecor_refrigerator_white_inv.png",
|
||||
description = S("Refrigerator"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = fridge_model_bottom,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.under
|
||||
local pnode = minetest.get_node(pointed_thing.under)
|
||||
local rnodedef = minetest.registered_nodes[pnode.name]
|
||||
|
||||
if not rnodedef["buildable_to"] then
|
||||
pos = pointed_thing.above
|
||||
end
|
||||
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
|
||||
local tnode = minetest.get_node(pos)
|
||||
local tnode2 = minetest.get_node(pos2)
|
||||
|
||||
if homedecor.get_nodedef_field(tnode.name, "buildable_to")
|
||||
and homedecor.get_nodedef_field(tnode2.name, "buildable_to")
|
||||
and not minetest.is_protected(pos, placer:get_player_name())
|
||||
and not minetest.is_protected(pos2, placer:get_player_name()) then
|
||||
local nodename = itemstack:get_name()
|
||||
minetest.add_node(pos, { name = nodename, param2 = fdir })
|
||||
minetest.add_node(pos2, { name = "homedecor:refrigerator_white_top", param2 = fdir })
|
||||
|
||||
if string.find(nodename, "_locked") then
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", placer:get_player_name() or "")
|
||||
meta:set_string("infotext", S("Locked Refrigerator (owned by %s)"):format(meta:get_string("owner")))
|
||||
end
|
||||
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(pos2).name == "homedecor:refrigerator_white_top" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[10,10]"..
|
||||
"list[current_name;main;0,0;10,5;]"..
|
||||
"list[current_player;main;1,6;8,4;]")
|
||||
meta:set_string("infotext", S("Refrigerator"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main",50)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", S("%s moves stuff in refrigerator at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s moves stuff to refrigerator at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", S("%s takes stuff from refrigerator at %s"):format(
|
||||
player:get_player_name(),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:refrigerator_white_top", {
|
||||
tiles = {
|
||||
"homedecor_refrigerator_white_top.png",
|
||||
"default_steel_block.png",
|
||||
"homedecor_refrigerator_white_sides1.png",
|
||||
"homedecor_refrigerator_white_sides1.png^[transformFX",
|
||||
"homedecor_refrigerator_white_back1.png",
|
||||
"homedecor_refrigerator_white_front1.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
node_box = fridge_model_top,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||
},
|
||||
})
|
||||
|
||||
-- convert the old single-node fridges to the new two-node models
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:refrigerator" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2
|
||||
local p_top = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
minetest.swap_node(pos, { name = "homedecor:refrigerator_white_bottom", param2 = fdir })
|
||||
minetest.set_node(p_top, { name = "homedecor:refrigerator_white_top", param2 = fdir })
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:refrigerator_locked" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2
|
||||
local p_top = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
minetest.swap_node(pos, { name = "homedecor:refrigerator_white_bottom_locked", param2 = fdir })
|
||||
minetest.set_node(p_top, { name = "homedecor:refrigerator_white_top", param2 = fdir })
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:refrigerator_steel" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2
|
||||
local p_top = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
minetest.swap_node(pos, { name = "homedecor:refrigerator_steel_bottom", param2 = fdir })
|
||||
minetest.set_node(p_top, { name = "homedecor:refrigerator_steel_top", param2 = fdir })
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "homedecor:refrigerator_steel_locked" },
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2
|
||||
local p_top = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
minetest.swap_node(pos, { name = "homedecor:refrigerator_steel_bottom_locked", param2 = fdir })
|
||||
minetest.set_node(p_top, { name = "homedecor:refrigerator_steel_top", param2 = fdir })
|
||||
end
|
||||
})
|
||||
|
90
mods/homedecor_modpack/homedecor/shingles.lua
Normal file
@ -0,0 +1,90 @@
|
||||
-- Various kidns of shingles
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_node("homedecor:skylight", {
|
||||
description = S("Glass Skylight"),
|
||||
drawtype = "raillike",
|
||||
tiles = { "default_glass.png" },
|
||||
wield_image = "default_glass.png",
|
||||
inventory_image = "homedecor_skylight_inv.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = true,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:skylight_frosted", {
|
||||
description = S("Glass Skylight Frosted"),
|
||||
drawtype = "raillike",
|
||||
tiles = { "homedecor_skylight_frosted.png" },
|
||||
wield_image = "homedecor_skylight_frosted.png",
|
||||
inventory_image = "homedecor_skylight_frosted_inv.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = true,
|
||||
walkable = true,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:shingles_wood", {
|
||||
description = S("Wood Shingles"),
|
||||
drawtype = "raillike",
|
||||
tiles = { "homedecor_shingles_wood.png" },
|
||||
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(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:shingles_asphalt", {
|
||||
description = S("Asphalt Shingles"),
|
||||
drawtype = "raillike",
|
||||
tiles = { "homedecor_shingles_asphalt.png" },
|
||||
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(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:shingles_terracotta", {
|
||||
description = S("Terracotta Shingles"),
|
||||
drawtype = "raillike",
|
||||
tiles = { "homedecor_shingles_terracotta.png" },
|
||||
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(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
|
||||
}
|
||||
})
|
||||
|
54
mods/homedecor_modpack/homedecor/shutters.lua
Normal file
@ -0,0 +1,54 @@
|
||||
-- Various kinds of window shutters
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
local shutters = {
|
||||
{"oak", "Unpainted oak"},
|
||||
{"mahogany", "Mahogany"},
|
||||
{"red", "Red"},
|
||||
{"yellow", "Yellow"},
|
||||
{"forest_green", "Forest green"},
|
||||
{"light_blue", "Light blue"},
|
||||
{"violet", "Violet"},
|
||||
{"black", "Black"},
|
||||
{"dark_grey", "Dark grey"},
|
||||
{"grey", "Grey"},
|
||||
{"white", "White"},
|
||||
}
|
||||
|
||||
for i in ipairs(shutters) do
|
||||
local name = shutters[i][1]
|
||||
local desc = shutters[i][2]
|
||||
|
||||
minetest.register_node("homedecor:shutter_"..name, {
|
||||
description = S("Wooden Shutter ("..desc..")"),
|
||||
tiles = { "homedecor_window_shutter_"..name..".png" },
|
||||
inventory_image = "homedecor_window_shutter_"..name..".png",
|
||||
wield_image = "homedecor_window_shutter_"..name..".png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0.44, 0.5, -0.3125, 0.5}, -- NodeBox1
|
||||
{-0.5, -0.5, 0.44, -0.3125, 0.5, 0.5}, -- NodeBox2
|
||||
{-0.5, 0.3125, 0.44, 0.5, 0.5, 0.5}, -- NodeBox3
|
||||
{0.3125, -0.5, 0.44, 0.5, 0.5, 0.5}, -- NodeBox4
|
||||
{-0.3125, 0.1875, 0.46, 0.3125, 0.25, 0.48}, -- NodeBox5
|
||||
{-0.3125, 0.0625, 0.46, 0.3125, 0.125, 0.48}, -- NodeBox6
|
||||
{-0.3125, -0.0625, 0.46, 0.3125, 0, 0.48}, -- NodeBox7
|
||||
{-0.3125, -0.1875, 0.46, 0.3125, -0.125, 0.48}, -- NodeBox8
|
||||
{-0.3125, -0.3125, 0.46, 0.3125, -0.25, 0.48}, -- NodeBox9
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.44, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
303
mods/homedecor_modpack/homedecor/slopes.lua
Normal file
@ -0,0 +1,303 @@
|
||||
-- Various kinds of shingles
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
-- Corner shingle nodes, courtesy Bas080
|
||||
|
||||
homedecor.register_outer_corner = function(modname, subname, groups, images, description)
|
||||
local slopeboxedge = {}
|
||||
local detail = homedecor.detail_level
|
||||
for i = 0, detail-1 do
|
||||
slopeboxedge[i+1]={-0.5, -0.5, (i/detail)-0.5, 0.5-(i/detail), (i/detail)-0.5+(1.25/detail), 0.5}
|
||||
end
|
||||
minetest.register_node(modname..":shingle_outer_corner_" .. subname, {
|
||||
description = S(description.. " (outer corner)"),
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.25, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = slopeboxedge
|
||||
},
|
||||
groups = groups,
|
||||
})
|
||||
end
|
||||
|
||||
homedecor.register_inner_corner = function(modname, subname, groups, images, description)
|
||||
local slopeboxedge = {}
|
||||
local detail = homedecor.detail_level
|
||||
for i = 0, detail-1 do
|
||||
slopeboxedge[i+1]={-0.5, -0.5, -0.5, 0.5-(i/detail), (i/detail)-0.5+(1.25/detail), 0.5}
|
||||
slopeboxedge[i+detail+1]={-0.5, -0.5, (i/detail)-0.5, 0.5, (i/detail)-0.5+(1.25/detail), 0.5}
|
||||
end
|
||||
minetest.register_node(modname..":shingle_inner_corner_" .. subname, {
|
||||
description = S(description.. " (inner corner)"),
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = slopeboxedge
|
||||
},
|
||||
groups = groups,
|
||||
})
|
||||
end
|
||||
|
||||
homedecor.register_slope = function(modname, subname, recipeitem, groups, images, description)
|
||||
local slopeboxedge = {}
|
||||
local detail = homedecor.detail_level
|
||||
for i = 0, detail-1 do
|
||||
slopeboxedge[i+1]={-0.5, -0.5, (i/detail)-0.5, 0.5, (i/detail)-0.5+(1.25/detail), 0.5}
|
||||
end
|
||||
minetest.register_node(modname..":shingle_side_" .. subname, {
|
||||
description = S(description),
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = slopeboxedge,
|
||||
},
|
||||
groups = groups,
|
||||
})
|
||||
|
||||
-- convert between flat shingles and slopes
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname..":shingle_side_"..subname.." 3",
|
||||
recipe = {
|
||||
{recipeitem, recipeitem, recipeitem}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = recipeitem.." 3",
|
||||
recipe = {
|
||||
{modname..":shingle_side_"..subname, modname..":shingle_side_"..subname, modname..":shingle_side_"..subname},
|
||||
}
|
||||
})
|
||||
|
||||
-- craft outer corners
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname..":shingle_outer_corner_"..subname.." 3",
|
||||
recipe = {
|
||||
{ "", recipeitem, "" },
|
||||
{ recipeitem, "", recipeitem }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname..":shingle_outer_corner_"..subname.." 3",
|
||||
recipe = {
|
||||
{ "", modname..":shingle_side_"..subname, "" },
|
||||
{ modname..":shingle_side_"..subname, "", modname..":shingle_side_"..subname },
|
||||
}
|
||||
})
|
||||
|
||||
-- craft inner corners
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname..":shingle_inner_corner_"..subname.." 3",
|
||||
recipe = {
|
||||
{recipeitem, recipeitem},
|
||||
{"", recipeitem}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname..":shingle_inner_corner_"..subname.." 3",
|
||||
recipe = {
|
||||
{modname..":shingle_side_"..subname, modname..":shingle_side_"..subname},
|
||||
{"", modname..":shingle_side_"..subname}
|
||||
}
|
||||
})
|
||||
-- convert between flat shingles and inner/outer corners
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem.." 1",
|
||||
recipe = { modname..":shingle_outer_corner_"..subname }
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem.." 1",
|
||||
recipe = { modname..":shingle_inner_corner_"..subname }
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:shingle_side_glass",
|
||||
recipe = {
|
||||
{ "homedecor:skylight", "homedecor:skylight", "homedecor:skylight" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:roof_tile_terracotta 8",
|
||||
recipe = {
|
||||
{ "homedecor:shingle_outer_corner_terracotta", "homedecor:shingle_outer_corner_terracotta" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:roof_tile_terracotta 8",
|
||||
recipe = {
|
||||
{ "homedecor:shingle_inner_corner_terracotta", "homedecor:shingle_inner_corner_terracotta" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:roof_tile_terracotta 8",
|
||||
recipe = {
|
||||
{ "homedecor:shingle_side_terracotta", "homedecor:shingle_side_terracotta" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:shingle_inner_corner_wood",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:shingle_outer_corner_wood",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:shingle_side_wood",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
homedecor.register_roof = function(modname, subname, groups, images , description)
|
||||
homedecor.register_outer_corner(modname, subname, groups, images, description)
|
||||
homedecor.register_inner_corner(modname, subname, groups, images, description)
|
||||
end
|
||||
|
||||
-- corners
|
||||
|
||||
homedecor.register_roof("homedecor", "wood",
|
||||
{ snappy = 3 },
|
||||
{
|
||||
"homedecor_shingles_wood_c_t.png",
|
||||
"homedecor_shingles_wood_c_x.png",
|
||||
"homedecor_shingles_wood_c_x.png",
|
||||
"homedecor_shingles_wood_c_x.png",
|
||||
"homedecor_shingles_wood_c_z.png",
|
||||
"homedecor_shingles_wood_c_z.png",
|
||||
},
|
||||
"Wood Shingles"
|
||||
)
|
||||
|
||||
homedecor.register_roof("homedecor", "asphalt",
|
||||
{ snappy = 3 },
|
||||
{
|
||||
"homedecor_shingles_asphalt_c_t.png",
|
||||
"homedecor_shingles_asphalt_c_x.png",
|
||||
"homedecor_shingles_asphalt_c_x.png",
|
||||
"homedecor_shingles_asphalt_c_x.png",
|
||||
"homedecor_shingles_asphalt_c_z.png",
|
||||
"homedecor_shingles_asphalt_c_z.png",
|
||||
},
|
||||
"Asphalt Shingles"
|
||||
)
|
||||
|
||||
homedecor.register_roof("homedecor", "terracotta",
|
||||
{ snappy = 3 },
|
||||
{
|
||||
"homedecor_shingles_terracotta_c_t.png",
|
||||
"homedecor_shingles_terracotta_c_x.png",
|
||||
"homedecor_shingles_terracotta_c_x.png",
|
||||
"homedecor_shingles_terracotta_c_x.png",
|
||||
"homedecor_shingles_terracotta_c_z.png",
|
||||
"homedecor_shingles_terracotta_c_z.png",
|
||||
},
|
||||
"Terracotta Shingles"
|
||||
)
|
||||
|
||||
-- register just the slopes
|
||||
|
||||
homedecor.register_slope("homedecor", "wood",
|
||||
"homedecor:shingles_wood",
|
||||
{ snappy = 3 },
|
||||
{
|
||||
"homedecor_shingles_wood_s_t.png",
|
||||
"homedecor_shingles_wood_s_z.png",
|
||||
"homedecor_shingles_wood_s_z.png",
|
||||
"homedecor_shingles_wood_s_z.png",
|
||||
"homedecor_shingles_wood_s_z.png",
|
||||
"homedecor_shingles_wood_s_z.png",
|
||||
},
|
||||
"Wood Shingles"
|
||||
)
|
||||
|
||||
homedecor.register_slope("homedecor", "asphalt",
|
||||
"homedecor:shingles_asphalt",
|
||||
{ snappy = 3 },
|
||||
{
|
||||
"homedecor_shingles_asphalt_s_t.png",
|
||||
"homedecor_shingles_asphalt_s_z.png",
|
||||
"homedecor_shingles_asphalt_s_z.png",
|
||||
"homedecor_shingles_asphalt_s_z.png",
|
||||
"homedecor_shingles_asphalt_s_z.png",
|
||||
"homedecor_shingles_asphalt_s_z.png",
|
||||
},
|
||||
"Asphalt Shingles"
|
||||
)
|
||||
|
||||
homedecor.register_slope("homedecor", "terracotta",
|
||||
"homedecor:shingles_terracotta",
|
||||
{ snappy = 3 },
|
||||
{
|
||||
"homedecor_shingles_terracotta_s_t.png",
|
||||
"homedecor_shingles_terracotta_s_z.png",
|
||||
"homedecor_shingles_terracotta_s_z.png",
|
||||
"homedecor_shingles_terracotta_s_z.png",
|
||||
"homedecor_shingles_terracotta_s_z.png",
|
||||
"homedecor_shingles_terracotta_s_z.png",
|
||||
},
|
||||
"Terracotta Shingles"
|
||||
)
|
||||
|
||||
homedecor.register_slope("homedecor", "glass",
|
||||
"homedecor:shingles_glass",
|
||||
{ snappy = 3 },
|
||||
{
|
||||
"homedecor_shingles_glass_top.png",
|
||||
"homedecor_shingles_glass.png"
|
||||
},
|
||||
"Glass Shingles"
|
||||
)
|
||||
|
BIN
mods/homedecor_modpack/homedecor/sounds/homedecor_door_close.ogg
Normal file
BIN
mods/homedecor_modpack/homedecor/sounds/homedecor_door_open.ogg
Normal file
BIN
mods/homedecor_modpack/homedecor/sounds/homedecor_doorbell.ogg
Normal file
BIN
mods/homedecor_modpack/homedecor/sounds/toaster.ogg
Normal file
482
mods/homedecor_modpack/homedecor/tables.lua
Normal file
@ -0,0 +1,482 @@
|
||||
-- Various kinds of tables
|
||||
|
||||
local S = homedecor.gettext
|
||||
|
||||
local materials = {
|
||||
{"glass","Glass"},
|
||||
{"wood","Wood"}
|
||||
}
|
||||
|
||||
for i in ipairs(materials) do
|
||||
local m = materials[i][1]
|
||||
local d = materials[i][2]
|
||||
local s = nil
|
||||
|
||||
if m == "glass" then
|
||||
s = default.node_sound_glass_defaults()
|
||||
else
|
||||
s = default.node_sound_wood_defaults()
|
||||
end
|
||||
|
||||
-- small square tables
|
||||
|
||||
minetest.register_node("homedecor:"..m.."_table_small_square_b", {
|
||||
description = S(d.." Table (Small, Square)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_small_square_tb.png',
|
||||
'homedecor_'..m..'_table_small_square_tb.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png'
|
||||
},
|
||||
wield_image = 'homedecor_'..m..'_table_small_square_tb.png',
|
||||
inventory_image = 'homedecor_'..m..'_table_small_square_tb.png',
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.4375, -0.5, -0.5, 0.4375, -0.4375, 0.5 },
|
||||
{ -0.5, -0.5, -0.4375, 0.5, -0.4375, 0.4375 }
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||
},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_small_square_t', {
|
||||
description = S(d.." Table (Small, Square)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_small_square_tb.png',
|
||||
'homedecor_'..m..'_table_small_square_tb.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png'
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.4375, 0.4375, -0.5, 0.4375, 0.5, 0.5 },
|
||||
{ -0.5, 0.4375, -0.4375, 0.5, 0.5, 0.4375 }
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
drop = 'homedecor:'..m..'_table_small_square_b'
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_small_square_s', {
|
||||
description = S(d.." Table (Small, Square)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_edges.png',
|
||||
'homedecor_'..m..'_table_small_square_tb.png',
|
||||
'homedecor_'..m..'_table_small_square_tb.png',
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.4375, -0.5, 0.4375, 0.4375, 0.5, 0.5 },
|
||||
{ -0.5, -0.4375, 0.4375, 0.5, 0.4375, 0.5 }
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
drop = 'homedecor:'..m..'_table_small_square_b'
|
||||
})
|
||||
|
||||
-- small round tables
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_small_round_b', {
|
||||
description = S(d.." Table (Small, Round)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_small_round_tb.png',
|
||||
'homedecor_'..m..'_table_small_round_tb.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png'
|
||||
},
|
||||
wield_image = 'homedecor_'..m..'_table_small_round_tb.png',
|
||||
inventory_image = 'homedecor_'..m..'_table_small_round_tb.png',
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.25, -0.5, -0.5, 0.25, -0.4375, 0.5 },
|
||||
{ -0.375, -0.5, -0.4375, 0.375, -0.4375, 0.4375 },
|
||||
{ -0.5, -0.5, -0.25, 0.5, -0.4375, 0.25 },
|
||||
{ -0.4375, -0.5, -0.375, 0.4375, -0.4375, 0.375 },
|
||||
{ -0.25, -0.5, -0.5, 0.25, -0.4375, 0.5 },
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||
},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_small_round_t', {
|
||||
description = S(d.." Table (Small, Round)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_small_round_tb.png',
|
||||
'homedecor_'..m..'_table_small_round_tb.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png'
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.25, 0.4375, -0.5, 0.25, 0.5, 0.5 },
|
||||
{ -0.375, 0.4375, -0.4375, 0.375, 0.5, 0.4375 },
|
||||
{ -0.5, 0.4375, -0.25, 0.5, 0.5, 0.25 },
|
||||
{ -0.4375, 0.4375, -0.375, 0.4375, 0.5, 0.375 },
|
||||
{ -0.25, 0.4375, -0.5, 0.25, 0.5, 0.5 },
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
drop = 'homedecor:'..m..'_table_small_round_b'
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_small_round_s', {
|
||||
description = S(d.." Table (Small, Round)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_edges.png',
|
||||
'homedecor_'..m..'_table_small_round_tb.png',
|
||||
'homedecor_'..m..'_table_small_round_tb.png',
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.25, -0.5, 0.4375, 0.25, 0.5, 0.5 },
|
||||
{ -0.375, -0.4375, 0.4375, 0.375, 0.4375, 0.5 },
|
||||
{ -0.5, -0.25, 0.4375, 0.5, 0.25, 0.5 },
|
||||
{ -0.4375, -0.375, 0.4375, 0.4375, 0.375, 0.5 },
|
||||
{ -0.25, -0.5, 0.4375, 0.25, 0.5, 0.5 },
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
drop = 'homedecor:'..m..'_table_small_round_b'
|
||||
})
|
||||
|
||||
-- Large square table pieces
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_large_b', {
|
||||
description = S(d.." Table Piece (large)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_large_tb.png',
|
||||
'homedecor_'..m..'_table_large_tb.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png'
|
||||
},
|
||||
wield_image = 'homedecor_'..m..'_table_large_tb.png',
|
||||
inventory_image = 'homedecor_'..m..'_table_large_tb.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 },
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||
},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_large_t', {
|
||||
description = S(d.." Table Piece (large)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_large_tb.png',
|
||||
'homedecor_'..m..'_table_large_tb.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png'
|
||||
},
|
||||
wield_image = 'homedecor_'..m..'_table_large_tb.png',
|
||||
inventory_image = 'homedecor_'..m..'_table_large_tb.png',
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
drop = 'homedecor:'..m..'_table_large_b'
|
||||
})
|
||||
|
||||
minetest.register_node('homedecor:'..m..'_table_large_s', {
|
||||
description = S(d.." Table Piece (large)"),
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_edges.png',
|
||||
'homedecor_'..m..'_table_large_tb.png',
|
||||
'homedecor_'..m..'_table_large_tb.png',
|
||||
},
|
||||
wield_image = 'homedecor_'..m..'_table_large_tb.png',
|
||||
inventory_image = 'homedecor_'..m..'_table_large_tb.png',
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 },
|
||||
sounds = s,
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
drop = 'homedecor:'..m..'_table_large_b'
|
||||
})
|
||||
|
||||
minetest.register_alias('homedecor:'..m..'_table_large', 'homedecor:'..m..'_table_large_b')
|
||||
minetest.register_alias('homedecor:'..m..'_table_small_square', 'homedecor:'..m..'_table_small_square_b')
|
||||
minetest.register_alias('homedecor:'..m..'_table_small_round', 'homedecor:'..m..'_table_small_round_b')
|
||||
|
||||
end
|
||||
|
||||
minetest.register_node('homedecor:utility_table_top', {
|
||||
description = S("Utility Table"),
|
||||
tiles = {
|
||||
'homedecor_utility_table_tb.png',
|
||||
'homedecor_utility_table_tb.png',
|
||||
'homedecor_utility_table_edges.png',
|
||||
'homedecor_utility_table_edges.png',
|
||||
'homedecor_utility_table_edges.png',
|
||||
'homedecor_utility_table_edges.png'
|
||||
},
|
||||
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",
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 },
|
||||
},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 },
|
||||
},
|
||||
})
|
||||
|
||||
-- Various kinds of table legs
|
||||
|
||||
minetest.register_node("homedecor: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", {
|
||||
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', {
|
||||
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(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:desk", {
|
||||
drawtype = "nodebox",
|
||||
description = "Desk",
|
||||
tiles = {
|
||||
"homedecor_desk_top_l.png",
|
||||
"homedecor_desk_bottom_l.png",
|
||||
"homedecor_desk_rside_l.png",
|
||||
"homedecor_desk_lside_l.png",
|
||||
"homedecor_desk_back_l.png",
|
||||
"homedecor_desk_front_l.png"
|
||||
},
|
||||
inventory_image = "homedecor_desk_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.4375, 0.375, 0.5, 0.5},
|
||||
{-0.5, 0.4375, -0.4375, 0.5, 0.5, 0.5},
|
||||
{-0.4375, -0.4375, -0.5, 0.3125, -0.0625, -0.4375},
|
||||
{-0.4375, 0, -0.5, 0.3125, 0.375, 0.5},
|
||||
{0.3125, -0.375, 0.4375, 0.5, 0.25, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 1.5, 0.5, 0.5 }
|
||||
},
|
||||
groups = { snappy = 3 },
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
|
||||
"homedecor:desk", "homedecor:desk_r", true)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + homedecor.fdir_to_right[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_right[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:desk_r" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:desk_r", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"homedecor_desk_top_r.png",
|
||||
"homedecor_desk_bottom_r.png",
|
||||
"homedecor_desk_rside_r.png",
|
||||
"homedecor_desk_lside_r.png",
|
||||
"homedecor_desk_back_r.png",
|
||||
"homedecor_desk_front_r.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.4375, -0.4375, 0.5, 0.5, 0.5},
|
||||
{0.375, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0.3125, -0.4375, 0.5, 0.375, 0.5},
|
||||
{-0.5, 0.3125, -0.4375, -0.4375, 0.5, 0.5},
|
||||
{-0.5, -0.375, 0.4375, 0.4375, 0.25, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { 0,0,0,0,0,0 }
|
||||
},
|
||||
groups = { snappy = 3, not_in_creative_inventory=1 }
|
||||
})
|
||||
|
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 174 B |
After Width: | Height: | Size: 162 B |
After Width: | Height: | Size: 360 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 476 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 403 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 416 B |
After Width: | Height: | Size: 403 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 395 B |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 481 B |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 359 B |
After Width: | Height: | Size: 428 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 640 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 479 B |
After Width: | Height: | Size: 474 B |
After Width: | Height: | Size: 474 B |
After Width: | Height: | Size: 479 B |
After Width: | Height: | Size: 481 B |
After Width: | Height: | Size: 640 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 483 B |
After Width: | Height: | Size: 479 B |
After Width: | Height: | Size: 477 B |
After Width: | Height: | Size: 484 B |
After Width: | Height: | Size: 485 B |
After Width: | Height: | Size: 640 B |
After Width: | Height: | Size: 301 B |
After Width: | Height: | Size: 338 B |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 640 B |
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 354 B |