Add drawers in all wood types

This is still fully MineClone 2 compatible; there are different
drawers in MCL2 than MTG and they have different textures.

If you combine different wood types in the crafting field, the
default drawer (oak/wooden) will be crafted. If you use the same
wood, a drawer of this wood will be crafted.
fork-master
LNJ 2017-04-10 16:40:52 +02:00
parent 899caf5b84
commit 753b31d74f
No known key found for this signature in database
GPG Key ID: 69268DBD835B6B0B
46 changed files with 273 additions and 20 deletions

View File

@ -31,10 +31,42 @@ SOFTWARE.
License of media:
-----------------
Copyright (C) 2014 Justin Aquadro (MIT):
textures/drawers_wood.png
textures/drawers_acacia_wood_mcl_front_1.png
textures/drawers_acacia_wood_mcl_front_2.png
textures/drawers_acacia_wood_mcl_front_4.png
textures/drawers_acacia_wood_mcl.png
textures/drawers_aspen_wood_front_1.png
textures/drawers_aspen_wood_front_2.png
textures/drawers_aspen_wood_front_4.png
textures/drawers_aspen_wood.png
textures/drawers_birch_wood_front_1.png
textures/drawers_birch_wood_front_2.png
textures/drawers_birch_wood_front_4.png
textures/drawers_birch_wood.png
textures/drawers_dark_oak_wood_front_1.png
textures/drawers_dark_oak_wood_front_2.png
textures/drawers_dark_oak_wood_front_4.png
textures/drawers_dark_oak_wood.png
textures/drawers_junglewood_mcl_front_1.png
textures/drawers_junglewood_mcl_front_2.png
textures/drawers_junglewood_mcl_front_4.png
textures/drawers_junglewood_mcl.png
textures/drawers_oak_wood_front_1.png
textures/drawers_oak_wood_front_2.png
textures/drawers_oak_wood_front_4.png
textures/drawers_oak_wood.png
textures/drawers_pine_wood_front_1.png
textures/drawers_pine_wood_front_2.png
textures/drawers_pine_wood_front_4.png
textures/drawers_pine_wood.png
textures/drawers_spruce_wood_front_1.png
textures/drawers_spruce_wood_front_2.png
textures/drawers_spruce_wood_front_4.png
textures/drawers_spruce_wood.png
textures/drawers_wood_front_1.png
textures/drawers_wood_front_2.png
textures/drawers_wood_front_4.png
textures/drawers_wood.png
Everything not listed in here:
Copyright (C) 2017 LNJ <git@lnj.li> (MIT)

187
init.lua
View File

@ -31,18 +31,18 @@ local S, NS = dofile(MP.."/intllib.lua")
drawers = {}
drawers.drawer_visuals = {}
if default then
if core.get_modpath("default") and default then
drawers.WOOD_SOUNDS = default.node_sound_wood_defaults()
drawers.WOOD_ITEMSTRING = "group:wood"
drawers.CHEST_ITEMSTRING = "default:chest"
elseif mcl_core then -- MineClone 2
elseif core.get_modpath("mcl_core") and mcl_core then -- MineClone 2
drawers.WOOD_ITEMSTRING = "group:wood"
drawers.CHEST_ITEMSTRING = "mcl_chests:chest"
if mcl_sounds then
if core.get_modpath("mcl_sounds") and mcl_sounds then
drawers.WOOD_SOUNDS = mcl_sounds.node_sound_wood_defaults()
end
else
drawers.WOOD_ITEMSTRING = "wood"
drawers.WOOD_ITEMSTRING = "group:wood"
drawers.CHEST_ITEMSTRING = "chest"
end
@ -64,16 +64,169 @@ dofile(MP .. "/lua/api.lua")
-- Register drawers
--
drawers.register_drawer("drawers:wood", {
description = S("Wooden"),
tiles1 = {"drawers_wood.png", "drawers_wood.png", "drawers_wood.png",
"drawers_wood.png", "drawers_wood.png", "drawers_wood_front_1.png"},
tiles2 = {"drawers_wood.png", "drawers_wood.png", "drawers_wood.png",
"drawers_wood.png", "drawers_wood.png", "drawers_wood_front_2.png"},
tiles4 = {"drawers_wood.png", "drawers_wood.png", "drawers_wood.png",
"drawers_wood.png", "drawers_wood.png", "drawers_wood_front_4.png"},
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 8, -- normal chest size
material = drawers.WOOD_ITEMSTRING
})
if core.get_modpath("default") and default then
drawers.register_drawer("drawers:wood", {
description = S("Wooden"),
tiles1 = drawers.node_tiles_front_other("drawers_wood_front_1.png",
"drawers_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_wood_front_2.png",
"drawers_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_wood_front_4.png",
"drawers_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 8, -- normal chest size
material = drawers.WOOD_ITEMSTRING
})
drawers.register_drawer("drawers:acacia_wood", {
description = S("Acacia Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_acacia_wood_front_1.png",
"drawers_acacia_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_acacia_wood_front_2.png",
"drawers_acacia_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_acacia_wood_front_4.png",
"drawers_acacia_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 8, -- normal mcl chest size
material = "default:acacia_wood"
})
drawers.register_drawer("drawers:aspen_wood", {
description = S("Aspen Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_aspen_wood_front_1.png",
"drawers_aspen_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_aspen_wood_front_2.png",
"drawers_aspen_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_aspen_wood_front_4.png",
"drawers_aspen_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 8, -- normal chest size
material = "default:aspen_wood"
})
drawers.register_drawer("drawers:junglewood", {
description = S("Junglewood"),
tiles1 = drawers.node_tiles_front_other("drawers_junglewood_front_1.png",
"drawers_junglewood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_junglewood_front_2.png",
"drawers_junglewood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_junglewood_front_4.png",
"drawers_junglewood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 8, -- normal mcl chest size
material = "default:junglewood"
})
drawers.register_drawer("drawers:pine_wood", {
description = S("Pine Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_pine_wood_front_1.png",
"drawers_pine_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_pine_wood_front_2.png",
"drawers_pine_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_pine_wood_front_4.png",
"drawers_pine_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 8, -- normal chest size
material = "default:pine_wood"
})
elseif core.get_modpath("mcl_core") and mcl_core then
drawers.register_drawer("drawers:oakwood", {
description = S("Oak Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_oak_wood_front_1.png",
"drawers_oak_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_oak_wood_front_2.png",
"drawers_oak_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_oak_wood_front_4.png",
"drawers_oak_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 9, -- normal mcl chest size
material = drawers.WOOD_ITEMSTRING
})
drawers.register_drawer("drawers:acaciawood", {
description = S("Acacia Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_acacia_wood_mcl_front_1.png",
"drawers_acacia_wood_mcl.png"),
tiles2 = drawers.node_tiles_front_other("drawers_acacia_wood_mcl_front_2.png",
"drawers_acacia_wood_mcl.png"),
tiles4 = drawers.node_tiles_front_other("drawers_acacia_wood_mcl_front_4.png",
"drawers_acacia_wood_mcl.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 9, -- normal mcl chest size
material = "mcl_core:acaciawood"
})
drawers.register_drawer("drawers:birchwood", {
description = S("Birch Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_birch_wood_front_1.png",
"drawers_birch_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_birch_wood_front_2.png",
"drawers_birch_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_birch_wood_front_4.png",
"drawers_birch_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 9, -- normal mcl chest size
material = "mcl_core:birchwood"
})
drawers.register_drawer("drawers:darkwood", {
description = S("Dark Oak Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_dark_oak_wood_front_1.png",
"drawers_dark_oak_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_dark_oak_wood_front_2.png",
"drawers_dark_oak_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_dark_oak_wood_front_4.png",
"drawers_dark_oak_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 9, -- normal mcl chest size
material = "mcl_core:darkwood"
})
drawers.register_drawer("drawers:junglewood", {
description = S("Junglewood"),
tiles1 = drawers.node_tiles_front_other("drawers_junglewood_mcl_front_1.png",
"drawers_junglewood_mcl.png"),
tiles2 = drawers.node_tiles_front_other("drawers_junglewood_mcl_front_2.png",
"drawers_junglewood_mcl.png"),
tiles4 = drawers.node_tiles_front_other("drawers_junglewood_mcl_front_4.png",
"drawers_junglewood_mcl.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 9, -- normal mcl chest size
material = "mcl_core:junglewood"
})
drawers.register_drawer("drawers:sprucewood", {
description = S("Spruce Wood"),
tiles1 = drawers.node_tiles_front_other("drawers_spruce_wood_front_1.png",
"drawers_spruce_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_spruce_wood_front_2.png",
"drawers_spruce_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_spruce_wood_front_4.png",
"drawers_spruce_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 9, -- normal mcl chest size
material = "mcl_core:sprucewood"
})
-- backwards compatibility
core.register_alias("drawers:wood1", "drawers:oakwood1")
core.register_alias("drawers:wood2", "drawers:oakwood2")
core.register_alias("drawers:wood4", "drawers:oakwood4")
else
drawers.register_drawer("drawers:wood", {
description = S("Wooden"),
tiles1 = drawers.node_tiles_front_other("drawers_wood_front_1.png",
"drawers_wood.png"),
tiles2 = drawers.node_tiles_front_other("drawers_wood_front_2.png",
"drawers_wood.png"),
tiles4 = drawers.node_tiles_front_other("drawers_wood_front_4.png",
"drawers_wood.png"),
groups = {choppy = 3, oddly_breakable_by_hand = 2},
sounds = drawers.WOOD_SOUNDS,
drawer_stack_max_factor = 3 * 8, -- normal chest size
material = drawers.WOOD_ITEMSTRING
})
end

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-11 12:56+0200\n"
"POT-Creation-Date: 2017-04-14 16:06+0200\n"
"PO-Revision-Date: 2017-04-11 13:04+0200\n"
"Last-Translator: LNJ <git@lnj.li>\n"
"Language-Team: German\n"
@ -44,3 +44,35 @@ msgstr "@1schubfächer (2x2)"
#: lua/visual.lua
msgid "Empty"
msgstr "Leer"
#: init.lua
msgid "Acacia Wood"
msgstr ""
#: init.lua
msgid "Aspen Wood"
msgstr ""
#: init.lua
msgid "Junglewood"
msgstr ""
#: init.lua
msgid "Pine Wood"
msgstr ""
#: init.lua
msgid "Oak Wood"
msgstr ""
#: init.lua
msgid "Birch Wood"
msgstr ""
#: init.lua
msgid "Dark Oak Wood"
msgstr ""
#: init.lua
msgid "Spruce Wood"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-11 13:18+0200\n"
"POT-Creation-Date: 2017-04-14 16:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -44,3 +44,35 @@ msgstr ""
#: lua/visual.lua
msgid "Empty"
msgstr ""
#: init.lua
msgid "Acacia Wood"
msgstr ""
#: init.lua
msgid "Aspen Wood"
msgstr ""
#: init.lua
msgid "Junglewood"
msgstr ""
#: init.lua
msgid "Pine Wood"
msgstr ""
#: init.lua
msgid "Oak Wood"
msgstr ""
#: init.lua
msgid "Birch Wood"
msgstr ""
#: init.lua
msgid "Dark Oak Wood"
msgstr ""
#: init.lua
msgid "Spruce Wood"
msgstr ""

View File

@ -204,3 +204,7 @@ function drawers.randomize_pos(pos)
rndpos.z = rndpos.z + z
return rndpos
end
function drawers.node_tiles_front_other(front, other)
return {other, other, other, other, other, front}
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 242 B