diff --git a/homedecor/furnaces.lua b/homedecor/furnaces.lua index c3431245..0d94c25d 100644 --- a/homedecor/furnaces.lua +++ b/homedecor/furnaces.lua @@ -350,6 +350,14 @@ homedecor.register_furnace("homedecor:oven", { 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 = { diff --git a/homedecor/locked.lua b/homedecor/locked.lua index 225dc77b..32a160a1 100644 --- a/homedecor/locked.lua +++ b/homedecor/locked.lua @@ -117,6 +117,8 @@ end local items = { { "refrigerator", "Fridge" }, + { "refrigerator_steel", + "Fridge (stainless steel)" }, { "kitchen_cabinet", "Cabinet" }, { "kitchen_cabinet_half", @@ -135,6 +137,10 @@ local items = { "Oven" }, { "oven_active", "Oven (active)" }, + { "oven_steel", + "Oven (stainless steel)" }, + { "oven_steel_active", + "Oven (stainless steel, active)" }, { "microwave_oven", "Microwave Oven" }, { "microwave_oven_active", diff --git a/homedecor/refrigerator.lua b/homedecor/refrigerator.lua index a2cffb85..1de744ce 100644 --- a/homedecor/refrigerator.lua +++ b/homedecor/refrigerator.lua @@ -74,3 +74,76 @@ minetest.register_node('homedecor:refrigerator', { )) end, }) + +minetest.register_node('homedecor:refrigerator_steel', { + drawtype = "nodebox", + description = S("Refrigerator (stainless steel)"), + tiles = { + 'homedecor_refrigerator_steel_top.png', + 'homedecor_refrigerator_steel_bottom.png', + 'homedecor_refrigerator_steel_right.png', + 'homedecor_refrigerator_steel_left.png', + 'homedecor_refrigerator_steel_back.png', + 'homedecor_refrigerator_steel_front.png' + }, + inventory_image = "homedecor_refrigerator_steel_inv.png", + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 } + }, + + sounds = default.node_sound_wood_defaults(), + 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 (stainless steel)")) + local inv = meta:get_inventory() + inv:set_size("main",50) + end, + + on_place = function(itemstack, placer, pointed_thing) + local pos = pointed_thing.above + if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then + minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place a refrigerator!') ) + return + end + return minetest.item_place(itemstack, placer, pointed_thing) + 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 steel 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 steel 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 steel refrigerator at %s"):format( + player:get_player_name(), + minetest.pos_to_string(pos) + )) + end, +}) diff --git a/homedecor/textures/homedecor_oven_steel_bottom.png b/homedecor/textures/homedecor_oven_steel_bottom.png new file mode 100644 index 00000000..f5cab8aa Binary files /dev/null and b/homedecor/textures/homedecor_oven_steel_bottom.png differ diff --git a/homedecor/textures/homedecor_oven_steel_front.png b/homedecor/textures/homedecor_oven_steel_front.png new file mode 100644 index 00000000..0ee93d13 Binary files /dev/null and b/homedecor/textures/homedecor_oven_steel_front.png differ diff --git a/homedecor/textures/homedecor_oven_steel_front_active.png b/homedecor/textures/homedecor_oven_steel_front_active.png new file mode 100644 index 00000000..98ea008d Binary files /dev/null and b/homedecor/textures/homedecor_oven_steel_front_active.png differ diff --git a/homedecor/textures/homedecor_oven_steel_side.png b/homedecor/textures/homedecor_oven_steel_side.png new file mode 100644 index 00000000..88ad1446 Binary files /dev/null and b/homedecor/textures/homedecor_oven_steel_side.png differ diff --git a/homedecor/textures/homedecor_oven_steel_top.png b/homedecor/textures/homedecor_oven_steel_top.png new file mode 100644 index 00000000..bcea2ebd Binary files /dev/null and b/homedecor/textures/homedecor_oven_steel_top.png differ diff --git a/homedecor/textures/homedecor_refrigerator_steel_back.png b/homedecor/textures/homedecor_refrigerator_steel_back.png new file mode 100644 index 00000000..31e89e32 Binary files /dev/null and b/homedecor/textures/homedecor_refrigerator_steel_back.png differ diff --git a/homedecor/textures/homedecor_refrigerator_steel_bottom.png b/homedecor/textures/homedecor_refrigerator_steel_bottom.png new file mode 100644 index 00000000..d9c74fee Binary files /dev/null and b/homedecor/textures/homedecor_refrigerator_steel_bottom.png differ diff --git a/homedecor/textures/homedecor_refrigerator_steel_front.png b/homedecor/textures/homedecor_refrigerator_steel_front.png new file mode 100644 index 00000000..4ee574ab Binary files /dev/null and b/homedecor/textures/homedecor_refrigerator_steel_front.png differ diff --git a/homedecor/textures/homedecor_refrigerator_steel_inv.png b/homedecor/textures/homedecor_refrigerator_steel_inv.png new file mode 100644 index 00000000..c8ecfa47 Binary files /dev/null and b/homedecor/textures/homedecor_refrigerator_steel_inv.png differ diff --git a/homedecor/textures/homedecor_refrigerator_steel_left.png b/homedecor/textures/homedecor_refrigerator_steel_left.png new file mode 100644 index 00000000..44fdc051 Binary files /dev/null and b/homedecor/textures/homedecor_refrigerator_steel_left.png differ diff --git a/homedecor/textures/homedecor_refrigerator_steel_right.png b/homedecor/textures/homedecor_refrigerator_steel_right.png new file mode 100644 index 00000000..a7b2c64d Binary files /dev/null and b/homedecor/textures/homedecor_refrigerator_steel_right.png differ diff --git a/homedecor/textures/homedecor_refrigerator_steel_top.png b/homedecor/textures/homedecor_refrigerator_steel_top.png new file mode 100644 index 00000000..f70477c9 Binary files /dev/null and b/homedecor/textures/homedecor_refrigerator_steel_top.png differ