Drop trash can and alias it to chair

This commit is contained in:
kilbith 2015-09-01 15:15:23 +02:00
parent d2844ee252
commit 7b349767da
3 changed files with 4 additions and 45 deletions

View File

@ -1,2 +1,3 @@
minetest.register_alias("xdecor:fence_wrought_iron", "default:fence_wood")
minetest.register_alias("xdecor:metal_cabinet", "xdecor:cabinet")
minetest.register_alias("xdecor:trash_can", "xdecor:chair")

View File

@ -81,7 +81,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = "xdecor:coalstone_tile 8",
output = "xdecor:coalstone_tile 4",
recipe = {
{"default:coalblock", "default:stone"},
{"default:stone", "default:coalblock"}
@ -168,7 +168,6 @@ minetest.register_craft({
output = "xdecor:hammer",
recipe = {
{"default:steel_ingot", "group:stick", "default:steel_ingot"},
{"", "group:stick", ""},
{"", "group:stick", ""}
}
})
@ -198,7 +197,7 @@ minetest.register_craftitem("xdecor:honey", {
})
minetest.register_craft({
output = "xdecor:ivy 2",
output = "xdecor:ivy 4",
recipe = {
{"group:leaves"},
{"group:leaves"}
@ -377,15 +376,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "xdecor:trash_can",
recipe = {
{"group:wood", "", "group:wood"},
{"group:wood", "", "group:wood"},
{"group:wood", "group:wood", "group:wood"}
}
})
minetest.register_craft({
output = "xdecor:tv",
recipe = {

View File

@ -113,8 +113,7 @@ if minetest.get_modpath("bucket") then
local inv = user:get_inventory()
local player = user:get_player_name()
if pointed_thing.type == "node" and
minetest.get_node(pointed_thing.under).name == "xdecor:cauldron" then
if minetest.get_node(pointed_thing.under).name == "xdecor:cauldron" then
if inv:room_for_item("main", "bucket:bucket_water 1") then
itemstack:take_item()
inv:add_item("main", "bucket:bucket_water 1")
@ -533,37 +532,6 @@ xdecor.register("tatami", {
}
})
xdecor.register("trash_can", {
description = "Trash Can",
tiles = {"xdecor_wood.png"},
groups = {choppy=3, flammable=3},
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {{-0.3125, -0.5, 0.3125, 0.3125, 0.5, 0.375},
{0.3125, -0.5, -0.375, 0.375, 0.5, 0.375},
{-0.3125, -0.5, -0.375, 0.3125, 0.5, -0.3125},
{-0.375, -0.5, -0.375, -0.3125, 0.5, 0.375},
{-0.3125, -0.5, -0.3125, 0.3125, -0.4375, 0.3125}}
},
collision_box = {
type = "fixed", fixed = {{-0.375, -0.5, -0.375, 0.375, 0.19, 0.375}}
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Trash Can - throw your waste here.")
end
})
local old_on_step = minetest.registered_entities["__builtin:item"].on_step
minetest.registered_entities["__builtin:item"].on_step = function(self, dtime)
if minetest.get_node(self.object:getpos()).name == "xdecor:trash_can" then
self.object:remove()
return
end
old_on_step(self, dtime)
end
xdecor.register("tv", {
description = "Television",
light_source = 11,