Fridge now takes up two nodes and has a single 10x5 (50 slot) inventory via

using nodeboxes.  Also has a 64px inventory image because of the detail needed
for it.
This commit is contained in:
Vanessa Ezekowitz 2012-10-03 00:36:25 -04:00
parent 842a571b60
commit 77e74fd468
3 changed files with 25 additions and 11 deletions

View File

@ -1051,7 +1051,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:refrigerator 2", output = "homedecor:refrigerator",
recipe = { recipe = {
{"default:steel_ingot", "moreblocks:glowglass", "default:steel_ingot", }, {"default:steel_ingot", "moreblocks:glowglass", "default:steel_ingot", },
{"default:steel_ingot", "moreores:tin_ingot", "default:steel_ingot", }, {"default:steel_ingot", "moreores:tin_ingot", "default:steel_ingot", },

View File

@ -1,28 +1,42 @@
-- This file supplies refrigerators -- This file supplies refrigerators
minetest.register_node('homedecor:refrigerator', { minetest.register_node('homedecor:refrigerator', {
drawtype = "nodebox",
description = "Refrigerator", description = "Refrigerator",
tiles = { 'homedecor_refrigerator_top.png', tiles = {
'homedecor_refrigerator_top.png',
'homedecor_refrigerator_bottom.png', 'homedecor_refrigerator_bottom.png',
'homedecor_refrigerator_right.png', 'homedecor_refrigerator_right.png',
'homedecor_refrigerator_left.png', 'homedecor_refrigerator_left.png',
'homedecor_refrigerator_back.png', 'homedecor_refrigerator_back.png',
'homedecor_refrigerator_front.png'}, 'homedecor_refrigerator_front.png'
},
inventory_image = "homedecor_refrigerator_inv.png",
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
groups = { snappy = 3 }, 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_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.env:get_meta(pos) local meta = minetest.env:get_meta(pos)
meta:set_string("formspec", meta:set_string("formspec",
"size[8,8]".. "size[10,10]"..
"list[current_name;main;0,0;8,3;]".. "list[current_name;main;0,0;10,5;]"..
"list[current_player;main;0,4;8,4;]") "list[current_player;main;1,6;8,4;]")
meta:set_string("infotext", "Refrigerator") meta:set_string("infotext", "Refrigerator")
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 24) inv:set_size("main",50)
end, end,
can_dig = function(pos,player) can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos); local meta = minetest.env:get_meta(pos);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB