added option to override the textures of the npc chests

This commit is contained in:
Sokomine 2015-07-27 17:32:49 +02:00
parent a07e2e706e
commit 2d05ae5b7d
2 changed files with 10 additions and 6 deletions

View File

@ -51,6 +51,9 @@ if( not( minetest.registered_nodes['default:wood'])) then
cottages.texture_furniture = "cottages_minimal_wood.png";
end
cottages.texture_chest = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"};
-- texture for roofs where the tree bark is the main roof texture
cottages.textures_roof_wood = "default_tree.png";
if( not( minetest.registered_nodes["default:tree"])) then
@ -71,6 +74,10 @@ if( not( minetest.registered_nodes["default:tree"])) then
cottages.craftitem_coal_lump = "minerals:charcoal";
cottages.craftitem_junglewood = "trees:chestnut_planks";
cottages.craftitem_slab_wood = "group:plank";
cottages.texture_chest = { "spruce_chest_top.png", "spruce_chest_top.png", "spruce_chest_side.png",
"spruce_chest_side.png", "spruce_chest_side.png", "spruce_chest_front.png"};
else
-- does not look so well in this case as it's no bark; but what else shall we do?
cottages.textures_roof_wood = "cottages_minimal_wood.png";

View File

@ -31,8 +31,7 @@ cottages_chests.can_dig = function(pos,player)
minetest.register_node("cottages:chest_private", {
description = S("private NPC chest"),
infotext = "chest containing the possesions of one of the inhabitants",
tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
tiles = cottages.texture_chest,
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
@ -44,8 +43,7 @@ minetest.register_node("cottages:chest_private", {
minetest.register_node("cottages:chest_work", {
description = S("chest for work utils and kitchens"),
infotext = "everything the inhabitant needs for his work",
tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
tiles = cottages.texture_chest,
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
@ -57,8 +55,7 @@ minetest.register_node("cottages:chest_work", {
minetest.register_node("cottages:chest_storage", {
description = S("storage chest"),
infotext = "stored food reserves",
tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
tiles = cottages.texture_chest,
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,