forked from nalc/homedecor_modpack
whitespace cleanup:
* remove all trailing whitespaces * make inbox and computer use the prevalent indentation rules * CRLF->LF where found
This commit is contained in:
parent
29bf986ea8
commit
be4ed12b6c
@ -107,7 +107,7 @@ minetest.register_craft({
|
|||||||
output = 'chains:chain_top',
|
output = 'chains:chain_top',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot'},
|
{'default:steel_ingot'},
|
||||||
{'glooptest:chainlink'},
|
{'glooptest:chainlink'},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ minetest.register_craft({
|
|||||||
output = 'chains:chain_top_brass',
|
output = 'chains:chain_top_brass',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:brass_ingot'},
|
{'technic:brass_ingot'},
|
||||||
{'homedecor:chainlink_brass'},
|
{'homedecor:chainlink_brass'},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,122 +1,122 @@
|
|||||||
|
|
||||||
-- Amiga 500 lookalike
|
-- Amiga 500 lookalike
|
||||||
computer.register("computer:shefriendSOO", {
|
computer.register("computer:shefriendSOO", {
|
||||||
description = "SheFriendSOO";
|
description = "SheFriendSOO";
|
||||||
tiles_off = { front=true; };
|
tiles_off = { front=true; };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 0, 0, 17, 32, 32, 12 }, -- Monitor Screen
|
{ 0, 0, 17, 32, 32, 12 }, -- Monitor Screen
|
||||||
{ 3, 3, 29, 26, 26, 3 }, -- Monitor Tube
|
{ 3, 3, 29, 26, 26, 3 }, -- Monitor Tube
|
||||||
{ 0, 0, 0, 32, 4, 17 }, -- Keyboard
|
{ 0, 0, 0, 32, 4, 17 }, -- Keyboard
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-- Some generic laptop
|
-- Some generic laptop
|
||||||
computer.register("computer:vanio", {
|
computer.register("computer:vanio", {
|
||||||
description = "Pony Vanio";
|
description = "Pony Vanio";
|
||||||
tiles_off = { front=true; top=true; left=true; right=true; back=true; };
|
tiles_off = { front=true; top=true; left=true; right=true; back=true; };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
|
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
|
||||||
{ 0, 3, 25, 32, 21, 3 }, -- Screen
|
{ 0, 3, 25, 32, 21, 3 }, -- Screen
|
||||||
});
|
});
|
||||||
node_box_off = computer.pixelnodebox(32, {
|
node_box_off = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
|
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
|
||||||
{ 0, 3, 4, 32, 3, 24 }, -- Screen
|
{ 0, 3, 4, 32, 3, 24 }, -- Screen
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-- Sony PlayStation lookalike
|
-- Sony PlayStation lookalike
|
||||||
computer.register("computer:slaystation", {
|
computer.register("computer:slaystation", {
|
||||||
description = "Pony SlayStation";
|
description = "Pony SlayStation";
|
||||||
tiles_off = { top=true; };
|
tiles_off = { top=true; };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 0, 0, 11, 32, 6, 21 }, -- Console
|
{ 0, 0, 11, 32, 6, 21 }, -- Console
|
||||||
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
|
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
|
||||||
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
|
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
|
||||||
{ 5, 0, 4, 5, 2, 5 }, -- Controller 1 Center
|
{ 5, 0, 4, 5, 2, 5 }, -- Controller 1 Center
|
||||||
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
|
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
|
||||||
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
|
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
|
||||||
{ 22, 0, 4, 5, 2, 5 }, -- Controller 2 Center
|
{ 22, 0, 4, 5, 2, 5 }, -- Controller 2 Center
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-- Sony PlayStation 2 lookalike
|
-- Sony PlayStation 2 lookalike
|
||||||
computer.register("computer:slaystation2", {
|
computer.register("computer:slaystation2", {
|
||||||
description = "Pony SlayStation 2";
|
description = "Pony SlayStation 2";
|
||||||
tiles_off = { front=true; };
|
tiles_off = { front=true; };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 2, 2, 11, 28, 3, 19 }, -- Console (Upper part)
|
{ 2, 2, 11, 28, 3, 19 }, -- Console (Upper part)
|
||||||
{ 2, 0, 11, 26, 2, 19 }, -- Console (Lower part)
|
{ 2, 0, 11, 26, 2, 19 }, -- Console (Lower part)
|
||||||
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
|
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
|
||||||
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
|
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
|
||||||
{ 5, 0, 1, 5, 2, 8 }, -- Controller 1 Center
|
{ 5, 0, 1, 5, 2, 8 }, -- Controller 1 Center
|
||||||
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
|
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
|
||||||
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
|
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
|
||||||
{ 22, 0, 1, 5, 2, 8 }, -- Controller 2 Center
|
{ 22, 0, 1, 5, 2, 8 }, -- Controller 2 Center
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-- Sinclair ZX Spectrum lookalike
|
-- Sinclair ZX Spectrum lookalike
|
||||||
computer.register("computer:specter", {
|
computer.register("computer:specter", {
|
||||||
description = "SX Specter";
|
description = "SX Specter";
|
||||||
tiles_off = { };
|
tiles_off = { };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 3, 0, 0, 26, 4, 17 }, -- Keyboard
|
{ 3, 0, 0, 26, 4, 17 }, -- Keyboard
|
||||||
{ 18, 0, 18, 12, 6, 14 }, -- Tape Player
|
{ 18, 0, 18, 12, 6, 14 }, -- Tape Player
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-- Nintendo Wii lookalike
|
-- Nintendo Wii lookalike
|
||||||
computer.register("computer:wee", {
|
computer.register("computer:wee", {
|
||||||
description = "Nientiendo Wee";
|
description = "Nientiendo Wee";
|
||||||
tiles_off = { front=true; };
|
tiles_off = { front=true; };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 11, 0, 3, 10, 6, 26 }, -- Base
|
{ 11, 0, 3, 10, 6, 26 }, -- Base
|
||||||
{ 12, 6, 4, 8, 22, 24 }, -- Top
|
{ 12, 6, 4, 8, 22, 24 }, -- Top
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-- Apple iPad lookalike
|
-- Apple iPad lookalike
|
||||||
minetest.register_node("computer:piepad", {
|
minetest.register_node("computer:piepad", {
|
||||||
description = "Snapple Piepad",
|
description = "Snapple Piepad",
|
||||||
drawtype = "signlike",
|
drawtype = "signlike",
|
||||||
tiles = {"computer_piepad_inv.png"},
|
tiles = {"computer_piepad_inv.png"},
|
||||||
inventory_image = "computer_piepad_inv.png",
|
inventory_image = "computer_piepad_inv.png",
|
||||||
wield_image = "computer_piepad_inv.png",
|
wield_image = "computer_piepad_inv.png",
|
||||||
sunlight_propagates = false,
|
sunlight_propagates = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
light_source = 10,
|
light_source = 10,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { snappy=3, cracky=3, choppy=3, oddly_breakable_by_hand=3},
|
groups = { snappy=3, cracky=3, choppy=3, oddly_breakable_by_hand=3},
|
||||||
selection_box = {type = "wallmounted"},
|
selection_box = {type = "wallmounted"},
|
||||||
sounds = default.node_sound_wood_defaults()
|
sounds = default.node_sound_wood_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Commodore 64 lookalike
|
-- Commodore 64 lookalike
|
||||||
computer.register("computer:admiral64", {
|
computer.register("computer:admiral64", {
|
||||||
description = "Admiral64";
|
description = "Admiral64";
|
||||||
tiles_off = { };
|
tiles_off = { };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 0, 0, 0, 32, 4, 18 }, -- Keyboard
|
{ 0, 0, 0, 32, 4, 18 }, -- Keyboard
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-- Commodore 128 lookalike
|
-- Commodore 128 lookalike
|
||||||
computer.register("computer:admiral128", {
|
computer.register("computer:admiral128", {
|
||||||
description = "Admiral128";
|
description = "Admiral128";
|
||||||
tiles_off = { };
|
tiles_off = { };
|
||||||
node_box = computer.pixelnodebox(32, {
|
node_box = computer.pixelnodebox(32, {
|
||||||
-- X Y Z W H L
|
-- X Y Z W H L
|
||||||
{ 0, 0, 0, 32, 4, 27 }, -- Keyboard
|
{ 0, 0, 0, 32, 4, 27 }, -- Keyboard
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
---------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------
|
||||||
@ -127,8 +127,8 @@ computer.register("computer:admiral128", {
|
|||||||
minetest.register_node("computer:monitor_on", {
|
minetest.register_node("computer:monitor_on", {
|
||||||
description = "Monitor and keyboard",
|
description = "Monitor and keyboard",
|
||||||
tiles = {"computer_monitor_t.png","computer_monitor_bt.png",
|
tiles = {"computer_monitor_t.png","computer_monitor_bt.png",
|
||||||
"computer_monitor_l.png","computer_monitor_r.png",
|
"computer_monitor_l.png","computer_monitor_r.png",
|
||||||
"computer_monitor_b.png","computer_monitor_f_desktop.png"}, --"computer_monitor_f_on.png"}, --till i get a boot abm inplace
|
"computer_monitor_b.png","computer_monitor_f_desktop.png"}, --"computer_monitor_f_on.png"}, --till i get a boot abm inplace
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
light_source = 4,
|
light_source = 4,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -140,26 +140,26 @@ minetest.register_node("computer:monitor_on", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
||||||
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
||||||
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
||||||
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
||||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
||||||
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
drop = 'computer:monitor',
|
drop = 'computer:monitor',
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:monitor";
|
node.name = "computer:monitor";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("computer:monitor_bios", {
|
minetest.register_node("computer:monitor_bios", {
|
||||||
description = "Monitor and keyboard",
|
description = "Monitor and keyboard",
|
||||||
tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
|
tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
|
||||||
"computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_bios.png"},
|
"computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_bios.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
light_source = 4,
|
light_source = 4,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -171,17 +171,17 @@ minetest.register_node("computer:monitor_bios", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
||||||
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
||||||
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
||||||
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
||||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
||||||
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
drop = 'computer:monitor',
|
drop = 'computer:monitor',
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("computer:monitor_loading", {
|
minetest.register_node("computer:monitor_loading", {
|
||||||
description = "Monitor and keyboard",
|
description = "Monitor and keyboard",
|
||||||
tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
|
tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
|
||||||
@ -197,16 +197,16 @@ minetest.register_node("computer:monitor_loading", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
||||||
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
||||||
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
||||||
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
||||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
||||||
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
drop = 'computer:monitor',
|
drop = 'computer:monitor',
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("computer:monitor_login", {
|
minetest.register_node("computer:monitor_login", {
|
||||||
description = "Monitor and keyboard",
|
description = "Monitor and keyboard",
|
||||||
@ -223,11 +223,11 @@ minetest.register_node("computer:monitor_login", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
||||||
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
||||||
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
||||||
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
||||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
||||||
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -249,11 +249,11 @@ minetest.register_node("computer:monitor_desktop", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
||||||
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
||||||
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
||||||
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
||||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
||||||
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -263,7 +263,7 @@ minetest.register_node("computer:monitor_desktop", {
|
|||||||
minetest.register_node("computer:monitor", {
|
minetest.register_node("computer:monitor", {
|
||||||
description = "Monitor and keyboard",
|
description = "Monitor and keyboard",
|
||||||
tiles = {"computer_monitor_t_off.png","computer_monitor_bt.png","computer_monitor_l.png",
|
tiles = {"computer_monitor_t_off.png","computer_monitor_bt.png","computer_monitor_l.png",
|
||||||
"computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_off.png"},
|
"computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_off.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
light_source = 4,
|
light_source = 4,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -275,18 +275,18 @@ minetest.register_node("computer:monitor", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
{-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
|
||||||
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
{-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5},
|
||||||
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
{-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
|
||||||
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
{-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
|
||||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
|
||||||
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:monitor_on";
|
node.name = "computer:monitor_on";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -305,10 +305,10 @@ minetest.register_node("computer:router", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.25, -0.5, -0.0625, 0.25, -0.375, 0.3125},
|
{-0.25, -0.5, -0.0625, 0.25, -0.375, 0.3125},
|
||||||
{-0.1875, -0.4375, 0.3125, -0.125, -0.1875, 0.375},
|
{-0.1875, -0.4375, 0.3125, -0.125, -0.1875, 0.375},
|
||||||
{0.125, -0.4375, 0.3125, 0.1875, -0.1875, 0.375},
|
{0.125, -0.4375, 0.3125, 0.1875, -0.1875, 0.375},
|
||||||
{-0.0625, -0.4375, 0.3125, 0.0625, -0.25, 0.375},
|
{-0.0625, -0.4375, 0.3125, 0.0625, -0.25, 0.375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -317,7 +317,7 @@ minetest.register_node("computer:router", {
|
|||||||
minetest.register_node("computer:tower_on", {
|
minetest.register_node("computer:tower_on", {
|
||||||
description = "Computer Tower",
|
description = "Computer Tower",
|
||||||
tiles = {"computer_tower_t.png","computer_tower_bt.png","computer_tower_l.png",
|
tiles = {"computer_tower_t.png","computer_tower_bt.png","computer_tower_l.png",
|
||||||
"computer_tower_r.png","computer_tower_b.png","computer_tower_f_on.png"},
|
"computer_tower_r.png","computer_tower_b.png","computer_tower_f_on.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
@ -328,22 +328,22 @@ minetest.register_node("computer:tower_on", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
||||||
{-0.1875, -0.5, -0.353774, 0.1875, 0, -0.0625},
|
{-0.1875, -0.5, -0.353774, 0.1875, 0, -0.0625},
|
||||||
{-0.1875, 0.247641, -0.353774, 0.1875, 0.3125, 0.1875},
|
{-0.1875, 0.247641, -0.353774, 0.1875, 0.3125, 0.1875},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
drop = 'computer:tower',
|
drop = 'computer:tower',
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:tower";
|
node.name = "computer:tower";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -361,21 +361,21 @@ minetest.register_node("computer:tower", {
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
||||||
{-0.1875, -0.5, -0.353774, 0.1875, 0, -0.0625},
|
{-0.1875, -0.5, -0.353774, 0.1875, 0, -0.0625},
|
||||||
{-0.1875, 0.247641, -0.353774, 0.1875, 0.3125, 0.1875},
|
{-0.1875, 0.247641, -0.353774, 0.1875, 0.3125, 0.1875},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
{-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:tower_on";
|
node.name = "computer:tower_on";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -395,89 +395,89 @@ minetest.register_node("computer:printer", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.4375, -0.3125, -0.125, 0.4375, -0.0625, 0.375},
|
{-0.4375, -0.3125, -0.125, 0.4375, -0.0625, 0.375},
|
||||||
{-0.4375, -0.5, -0.125, 0.4375, -0.4375, 0.375},
|
{-0.4375, -0.5, -0.125, 0.4375, -0.4375, 0.375},
|
||||||
{-0.4375, -0.5, -0.125, -0.25, -0.0625, 0.375},
|
{-0.4375, -0.5, -0.125, -0.25, -0.0625, 0.375},
|
||||||
{0.25, -0.5, -0.125, 0.4375, -0.0625, 0.375},
|
{0.25, -0.5, -0.125, 0.4375, -0.0625, 0.375},
|
||||||
{-0.4375, -0.5, -0.0625, 0.4375, -0.0625, 0.375},
|
{-0.4375, -0.5, -0.0625, 0.4375, -0.0625, 0.375},
|
||||||
{-0.375, -0.4375, 0.25, 0.375, -0.0625, 0.4375},
|
{-0.375, -0.4375, 0.25, 0.375, -0.0625, 0.4375},
|
||||||
{-0.25, -0.25, 0.4375, 0.25, 0.0625, 0.5},
|
{-0.25, -0.25, 0.4375, 0.25, 0.0625, 0.5},
|
||||||
{-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0},
|
{-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
--Rack Server
|
--Rack Server
|
||||||
minetest.register_node("computer:server", {
|
minetest.register_node("computer:server", {
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
description = "Rack Server",
|
description = "Rack Server",
|
||||||
tiles = {
|
tiles = {
|
||||||
'computer_server_t.png',
|
'computer_server_t.png',
|
||||||
'computer_server_bt.png',
|
'computer_server_bt.png',
|
||||||
'computer_server_l.png',
|
'computer_server_l.png',
|
||||||
'computer_server_r.png',
|
'computer_server_r.png',
|
||||||
'computer_server_bt.png',
|
'computer_server_bt.png',
|
||||||
'computer_server_f_off.png'
|
'computer_server_f_off.png'
|
||||||
},
|
},
|
||||||
inventory_image = "computer_server_inv.png",
|
inventory_image = "computer_server_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 = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
||||||
},
|
},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
||||||
},
|
},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:server_on";
|
node.name = "computer:server_on";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end,
|
end,
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local pos = pointed_thing.above
|
local pos = pointed_thing.above
|
||||||
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then
|
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(), "Not enough vertical space to place a server!" )
|
minetest.chat_send_player( placer:get_player_name(), "Not enough vertical space to place a server!" )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("computer:server_on", {
|
minetest.register_node("computer:server_on", {
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
description = "Rack Server",
|
description = "Rack Server",
|
||||||
tiles = {
|
tiles = {
|
||||||
'computer_server_t.png',
|
'computer_server_t.png',
|
||||||
'computer_server_bt.png',
|
'computer_server_bt.png',
|
||||||
'computer_server_r.png',
|
'computer_server_r.png',
|
||||||
'computer_server_l.png',
|
'computer_server_l.png',
|
||||||
'computer_server_bt.png',
|
'computer_server_bt.png',
|
||||||
'computer_server_f_on.png',
|
'computer_server_f_on.png',
|
||||||
},
|
},
|
||||||
inventory_image = "computer_server_inv.png",
|
inventory_image = "computer_server_inv.png",
|
||||||
sunlight_propagates = false,
|
sunlight_propagates = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
groups = {snappy=3,not_in_creative_inventory=1},
|
groups = {snappy=3,not_in_creative_inventory=1},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
||||||
},
|
},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
|
||||||
},
|
},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
drop = 'computer:server',
|
drop = 'computer:server',
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:server";
|
node.name = "computer:server";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
@ -2,99 +2,99 @@
|
|||||||
computer = { };
|
computer = { };
|
||||||
|
|
||||||
computer.register = function ( name, def )
|
computer.register = function ( name, def )
|
||||||
local nodename = name;
|
local nodename = name;
|
||||||
if (name:sub(1, 1) == ":") then name = name:sub(2); end
|
if (name:sub(1, 1) == ":") then name = name:sub(2); end
|
||||||
local modname, basename = name:match("^([^:]+):(.*)");
|
local modname, basename = name:match("^([^:]+):(.*)");
|
||||||
local TEXPFX = modname.."_"..basename.."_";
|
local TEXPFX = modname.."_"..basename.."_";
|
||||||
local ONSTATE = modname..":"..basename;
|
local ONSTATE = modname..":"..basename;
|
||||||
local OFFSTATE = modname..":"..basename.."_off";
|
local OFFSTATE = modname..":"..basename.."_off";
|
||||||
local def = def;
|
local def = def;
|
||||||
minetest.register_node(ONSTATE, {
|
minetest.register_node(ONSTATE, {
|
||||||
drawtype = "nodebox";
|
drawtype = "nodebox";
|
||||||
paramtype = "light";
|
paramtype = "light";
|
||||||
paramtype2 = "facedir";
|
paramtype2 = "facedir";
|
||||||
description = def.description;
|
description = def.description;
|
||||||
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2 };
|
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2 };
|
||||||
tiles = {
|
tiles = {
|
||||||
TEXPFX.."tp.png",
|
TEXPFX.."tp.png",
|
||||||
TEXPFX.."bt.png",
|
TEXPFX.."bt.png",
|
||||||
TEXPFX.."rt.png",
|
TEXPFX.."rt.png",
|
||||||
TEXPFX.."lt.png",
|
TEXPFX.."lt.png",
|
||||||
TEXPFX.."bk.png",
|
TEXPFX.."bk.png",
|
||||||
TEXPFX.."ft.png",
|
TEXPFX.."ft.png",
|
||||||
};
|
};
|
||||||
node_box = def.node_box;
|
node_box = def.node_box;
|
||||||
selection_box = def.node_box;
|
selection_box = def.node_box;
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
if (def.on_turn_off) then
|
if (def.on_turn_off) then
|
||||||
if (def.on_turn_off(pos, node, clicker, itemstack)) then return; end
|
if (def.on_turn_off(pos, node, clicker, itemstack)) then return; end
|
||||||
end
|
end
|
||||||
node.name = OFFSTATE;
|
node.name = OFFSTATE;
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos);
|
nodeupdate(pos);
|
||||||
end;
|
end;
|
||||||
});
|
});
|
||||||
minetest.register_node(OFFSTATE, {
|
minetest.register_node(OFFSTATE, {
|
||||||
drawtype = "nodebox";
|
drawtype = "nodebox";
|
||||||
paramtype = "light";
|
paramtype = "light";
|
||||||
paramtype2 = "facedir";
|
paramtype2 = "facedir";
|
||||||
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2,
|
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2,
|
||||||
not_in_creative_inventory=1 };
|
not_in_creative_inventory=1 };
|
||||||
tiles = {
|
tiles = {
|
||||||
(TEXPFX.."tp"..(def.tiles_off.top and "_off" or "")..".png"),
|
(TEXPFX.."tp"..(def.tiles_off.top and "_off" or "")..".png"),
|
||||||
(TEXPFX.."bt"..(def.tiles_off.bottom and "_off" or "")..".png"),
|
(TEXPFX.."bt"..(def.tiles_off.bottom and "_off" or "")..".png"),
|
||||||
(TEXPFX.."rt"..(def.tiles_off.right and "_off" or "")..".png"),
|
(TEXPFX.."rt"..(def.tiles_off.right and "_off" or "")..".png"),
|
||||||
(TEXPFX.."lt"..(def.tiles_off.left and "_off" or "")..".png"),
|
(TEXPFX.."lt"..(def.tiles_off.left and "_off" or "")..".png"),
|
||||||
(TEXPFX.."bk"..(def.tiles_off.back and "_off" or "")..".png"),
|
(TEXPFX.."bk"..(def.tiles_off.back and "_off" or "")..".png"),
|
||||||
(TEXPFX.."ft"..(def.tiles_off.front and "_off" or "")..".png"),
|
(TEXPFX.."ft"..(def.tiles_off.front and "_off" or "")..".png"),
|
||||||
};
|
};
|
||||||
node_box = def.node_box_off or def.node_box;
|
node_box = def.node_box_off or def.node_box;
|
||||||
selection_box = def.node_box_off or def.node_box;
|
selection_box = def.node_box_off or def.node_box;
|
||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
if (def.on_turn_on) then
|
if (def.on_turn_on) then
|
||||||
if (def.on_turn_on(pos, node, clicker, itemstack)) then return; end
|
if (def.on_turn_on(pos, node, clicker, itemstack)) then return; end
|
||||||
end
|
end
|
||||||
node.name = ONSTATE;
|
node.name = ONSTATE;
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos);
|
nodeupdate(pos);
|
||||||
end;
|
end;
|
||||||
drop = ONSTATE;
|
drop = ONSTATE;
|
||||||
});
|
});
|
||||||
end
|
end
|
||||||
|
|
||||||
computer.register_handheld = function ( name, def )
|
computer.register_handheld = function ( name, def )
|
||||||
local nodename = name;
|
local nodename = name;
|
||||||
if (name:sub(1, 1) == ":") then name = name:sub(2); end
|
if (name:sub(1, 1) == ":") then name = name:sub(2); end
|
||||||
local modname, basename = name:match("^([^:]+):(.*)");
|
local modname, basename = name:match("^([^:]+):(.*)");
|
||||||
local TEXPFX = modname.."_"..basename.."_inv";
|
local TEXPFX = modname.."_"..basename.."_inv";
|
||||||
local ONSTATE = modname..":"..basename;
|
local ONSTATE = modname..":"..basename;
|
||||||
local OFFSTATE = modname..":"..basename.."_off";
|
local OFFSTATE = modname..":"..basename.."_off";
|
||||||
local on_use = def.on_use;
|
local on_use = def.on_use;
|
||||||
minetest.register_craftitem(ONSTATE, {
|
minetest.register_craftitem(ONSTATE, {
|
||||||
description = def.description;
|
description = def.description;
|
||||||
inventory_image = TEXPFX..".png";
|
inventory_image = TEXPFX..".png";
|
||||||
wield_image = TEXPFX..".png";
|
wield_image = TEXPFX..".png";
|
||||||
});
|
});
|
||||||
end
|
end
|
||||||
|
|
||||||
computer.pixelnodebox = function ( size, boxes )
|
computer.pixelnodebox = function ( size, boxes )
|
||||||
local fixed = { };
|
local fixed = { };
|
||||||
local i, box;
|
local i, box;
|
||||||
for i, box in ipairs(boxes) do
|
for i, box in ipairs(boxes) do
|
||||||
local x, y, z, w, h, l = unpack(box);
|
local x, y, z, w, h, l = unpack(box);
|
||||||
fixed[#fixed + 1] = {
|
fixed[#fixed + 1] = {
|
||||||
(x / size) - 0.5,
|
(x / size) - 0.5,
|
||||||
(y / size) - 0.5,
|
(y / size) - 0.5,
|
||||||
(z / size) - 0.5,
|
(z / size) - 0.5,
|
||||||
((x + w) / size) - 0.5,
|
((x + w) / size) - 0.5,
|
||||||
((y + h) / size) - 0.5,
|
((y + h) / size) - 0.5,
|
||||||
((z + l) / size) - 0.5,
|
((z + l) / size) - 0.5,
|
||||||
};
|
};
|
||||||
end
|
end
|
||||||
return {
|
return {
|
||||||
type = "fixed";
|
type = "fixed";
|
||||||
fixed = fixed;
|
fixed = fixed;
|
||||||
};
|
};
|
||||||
end
|
end
|
||||||
|
|
||||||
local MODPATH = minetest.get_modpath("computer");
|
local MODPATH = minetest.get_modpath("computer");
|
||||||
|
@ -14,63 +14,63 @@ end
|
|||||||
|
|
||||||
if (not minetest.get_modpath("homedecor")) then
|
if (not minetest.get_modpath("homedecor")) then
|
||||||
|
|
||||||
minetest.register_craftitem(":homedecor:plastic_sheeting", {
|
minetest.register_craftitem(":homedecor:plastic_sheeting", {
|
||||||
description = S("Plastic sheet"),
|
description = S("Plastic sheet"),
|
||||||
inventory_image = "homedecor_plastic_sheeting.png",
|
inventory_image = "homedecor_plastic_sheeting.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(":homedecor:plastic_base", {
|
minetest.register_craftitem(":homedecor:plastic_base", {
|
||||||
description = S("Unprocessed Plastic base"),
|
description = S("Unprocessed Plastic base"),
|
||||||
wield_image = "homedecor_plastic_base.png",
|
wield_image = "homedecor_plastic_base.png",
|
||||||
inventory_image = "homedecor_plastic_base_inv.png",
|
inventory_image = "homedecor_plastic_base_inv.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = 'homedecor:plastic_base 6',
|
output = 'homedecor:plastic_base 6',
|
||||||
recipe = { "default:junglegrass",
|
recipe = { "default:junglegrass",
|
||||||
"default:junglegrass",
|
"default:junglegrass",
|
||||||
"default:junglegrass"
|
"default:junglegrass"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = 'homedecor:plastic_base 3',
|
output = 'homedecor:plastic_base 3',
|
||||||
recipe = { "default:dry_shrub",
|
recipe = { "default:dry_shrub",
|
||||||
"default:dry_shrub",
|
"default:dry_shrub",
|
||||||
"default:dry_shrub"
|
"default:dry_shrub"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = 'homedecor:plastic_base 4',
|
output = 'homedecor:plastic_base 4',
|
||||||
recipe = { "default:leaves",
|
recipe = { "default:leaves",
|
||||||
"default:leaves",
|
"default:leaves",
|
||||||
"default:leaves",
|
"default:leaves",
|
||||||
"default:leaves",
|
"default:leaves",
|
||||||
"default:leaves",
|
"default:leaves",
|
||||||
"default:leaves"
|
"default:leaves"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "cooking",
|
type = "cooking",
|
||||||
output = "homedecor:plastic_sheeting",
|
output = "homedecor:plastic_sheeting",
|
||||||
recipe = "homedecor:plastic_base",
|
recipe = "homedecor:plastic_base",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = 'fuel',
|
type = 'fuel',
|
||||||
recipe = 'homedecor:plastic_base',
|
recipe = 'homedecor:plastic_base',
|
||||||
burntime = 30,
|
burntime = 30,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = 'fuel',
|
type = 'fuel',
|
||||||
recipe = 'homedecor:plastic_sheeting',
|
recipe = 'homedecor:plastic_sheeting',
|
||||||
burntime = 30,
|
burntime = 30,
|
||||||
})
|
})
|
||||||
|
|
||||||
end -- not homedecor
|
end -- not homedecor
|
||||||
|
@ -3,132 +3,132 @@
|
|||||||
-- License is WTFPL (see README.txt).
|
-- License is WTFPL (see README.txt).
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:shefriendSOO";
|
output = "computer:shefriendSOO";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:slaystation";
|
output = "computer:slaystation";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:vanio";
|
output = "computer:vanio";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "", "", },
|
{ "homedecor:plastic_sheeting", "", "", },
|
||||||
{ "default:glass", "", "" },
|
{ "default:glass", "", "" },
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:specter";
|
output = "computer:specter";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "", "", "homedecor:plastic_sheeting", },
|
{ "", "", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:slaystation2";
|
output = "computer:slaystation2";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:admiral64";
|
output = "computer:admiral64";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "default:wood", "default:wood", "default:wood", },
|
{ "default:wood", "default:wood", "default:wood", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:admiral128";
|
output = "computer:admiral128";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:wee";
|
output = "computer:wee";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:copper_ingot", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:copper_ingot", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:piepad";
|
output = "computer:piepad";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
--new stuff
|
--new stuff
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:monitor";
|
output = "computer:monitor";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "default:glass","", },
|
{ "homedecor:plastic_sheeting", "default:glass","", },
|
||||||
{ "homedecor:plastic_sheeting", "default:glass","", },
|
{ "homedecor:plastic_sheeting", "default:glass","", },
|
||||||
{ "homedecor:plastic_sheeting", "default:mese_crystal_fragment", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:mese_crystal_fragment", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:router";
|
output = "computer:router";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "default:steel_ingot","","", },
|
{ "default:steel_ingot","","", },
|
||||||
{ "default:steel_ingot" ,"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "default:steel_ingot" ,"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
{ "default:mese_crystal_fragment","homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
{ "default:mese_crystal_fragment","homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:tower";
|
output = "computer:tower";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:printer";
|
output = "computer:printer";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
|
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
|
||||||
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "default:coal_lump", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:coal_lump", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:printer";
|
output = "computer:printer";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
|
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
|
||||||
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
|
||||||
{ "homedecor:plastic_sheeting", "dye:black", "homedecor:plastic_sheeting", },
|
{ "homedecor:plastic_sheeting", "dye:black", "homedecor:plastic_sheeting", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "computer:server";
|
output = "computer:server";
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "computer:tower", "computer:tower", "computer:tower", },
|
{ "computer:tower", "computer:tower", "computer:tower", },
|
||||||
{ "computer:tower", "computer:tower", "computer:tower", },
|
{ "computer:tower", "computer:tower", "computer:tower", },
|
||||||
{ "computer:tower", "computer:tower", "computer:tower", },
|
{ "computer:tower", "computer:tower", "computer:tower", },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -1,37 +1,37 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
The 'Fake-Fire' mod was originally created by Semmett9.
|
The 'Fake-Fire' mod was originally created by Semmett9.
|
||||||
|
|
||||||
URL to the 'Fake-Fire' thread on Minetest.net:
|
URL to the 'Fake-Fire' thread on Minetest.net:
|
||||||
http://forum.minetest.net/viewtopic.php?id=6145
|
http://forum.minetest.net/viewtopic.php?id=6145
|
||||||
|
|
||||||
I've customized it a bit. Please see the changelog.txt file for more details.
|
I've customized it a bit. Please see the changelog.txt file for more details.
|
||||||
|
|
||||||
~ LazyJ, 2014_03_15
|
~ LazyJ, 2014_03_15
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
dofile(minetest.get_modpath("fake_fire").."/modfiles/nodes.lua")
|
dofile(minetest.get_modpath("fake_fire").."/modfiles/nodes.lua")
|
||||||
dofile(minetest.get_modpath("fake_fire").."/modfiles/crafts.lua")
|
dofile(minetest.get_modpath("fake_fire").."/modfiles/crafts.lua")
|
||||||
dofile(minetest.get_modpath("fake_fire").."/modfiles/abms.lua")
|
dofile(minetest.get_modpath("fake_fire").."/modfiles/abms.lua")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
The lines below, at the end, are from the original author, Semmett9.
|
The lines below, at the end, are from the original author, Semmett9.
|
||||||
|
|
||||||
Thanks for a nice mod, Semmett9. ;)
|
Thanks for a nice mod, Semmett9. ;)
|
||||||
|
|
||||||
~ LazyJ, 2014_03_14
|
~ LazyJ, 2014_03_14
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Thanks-
|
-- Thanks-
|
||||||
|
|
||||||
-- Many thanks for addi for his help in coding. --
|
-- Many thanks for addi for his help in coding. --
|
||||||
|
|
||||||
-- Many thanks for the players on the King Arthur's land server for giving --
|
-- Many thanks for the players on the King Arthur's land server for giving --
|
||||||
-- me support, ideas and allowing me to add the mod to the server itself. --
|
-- me support, ideas and allowing me to add the mod to the server itself. --
|
||||||
|
@ -88,7 +88,7 @@ minetest.register_node("homedecor:desk_fan", {
|
|||||||
speedy_meta:set_string("active", "no")
|
speedy_meta:set_string("active", "no")
|
||||||
print (speedy_meta:get_string("active"))
|
print (speedy_meta:get_string("active"))
|
||||||
end
|
end
|
||||||
|
|
||||||
if entity_anim[1] == nil then
|
if entity_anim[1] == nil then
|
||||||
minetest.add_entity({x=pos.x, y=pos.y, z=pos.z}, "homedecor:mesh_desk_fan") --+(0.0625*10)
|
minetest.add_entity({x=pos.x, y=pos.y, z=pos.z}, "homedecor:mesh_desk_fan") --+(0.0625*10)
|
||||||
local entity_remove = minetest.get_objects_inside_radius(pos, 0.1)
|
local entity_remove = minetest.get_objects_inside_radius(pos, 0.1)
|
||||||
|
@ -119,23 +119,23 @@ function homedecor.rotate_cobweb(pos)
|
|||||||
-- only xm+zp, or only xp+zm means on-floor torchlike
|
-- only xm+zp, or only xp+zm means on-floor torchlike
|
||||||
|
|
||||||
if (iswall_xm and iswall_zp and not iswall_xp and not iswall_zm)
|
if (iswall_xm and iswall_zp and not iswall_xp and not iswall_zm)
|
||||||
or (iswall_xp and iswall_zm and not iswall_xm and not iswall_zp) then
|
or (iswall_xp and iswall_zm and not iswall_xm and not iswall_zp) then
|
||||||
minetest.set_node(pos, {name = "homedecor:cobweb_corner", param2 = 1})
|
minetest.set_node(pos, {name = "homedecor:cobweb_corner", param2 = 1})
|
||||||
|
|
||||||
-- only xm+zm, or only xp+zp means on-ceiling torchlike
|
-- only xm+zm, or only xp+zp means on-ceiling torchlike
|
||||||
|
|
||||||
elseif (iswall_xm and iswall_zm and not iswall_xp and not iswall_zp)
|
elseif (iswall_xm and iswall_zm and not iswall_xp and not iswall_zp)
|
||||||
or (iswall_xp and iswall_zp and not iswall_xm and not iswall_zm) then
|
or (iswall_xp and iswall_zp and not iswall_xm and not iswall_zm) then
|
||||||
minetest.set_node(pos, {name = "homedecor:cobweb_corner", param2 = 0})
|
minetest.set_node(pos, {name = "homedecor:cobweb_corner", param2 = 0})
|
||||||
|
|
||||||
-- only xm+xp means nodebox (not rotated, 0 degrees)
|
-- only xm+xp means nodebox (not rotated, 0 degrees)
|
||||||
|
|
||||||
elseif iswall_xm and iswall_xp and not iswall_zm and not iswall_zp then
|
elseif iswall_xm and iswall_xp and not iswall_zm and not iswall_zp then
|
||||||
minetest.set_node(pos, {name = "homedecor:cobweb_centered", param2 = 0})
|
minetest.set_node(pos, {name = "homedecor:cobweb_centered", param2 = 0})
|
||||||
|
|
||||||
-- only zm+zp means nodebox rotated to 90 degrees
|
-- only zm+zp means nodebox rotated to 90 degrees
|
||||||
|
|
||||||
elseif iswall_zm and iswall_zp and not iswall_xm and not iswall_xp then
|
elseif iswall_zm and iswall_zp and not iswall_xm and not iswall_xp then
|
||||||
minetest.set_node(pos, {name = "homedecor:cobweb_centered", param2 = 1})
|
minetest.set_node(pos, {name = "homedecor:cobweb_centered", param2 = 1})
|
||||||
|
|
||||||
-- ok, there aren't any simple two-wall corners or opposing walls.
|
-- ok, there aren't any simple two-wall corners or opposing walls.
|
||||||
@ -152,7 +152,7 @@ function homedecor.rotate_cobweb(pos)
|
|||||||
|
|
||||||
elseif iswall_zp and not iswall_xm and not iswall_xp and not iswall_zm then
|
elseif iswall_zp and not iswall_xm and not iswall_xp and not iswall_zm then
|
||||||
minetest.set_node(pos, {name = "homedecor:cobweb_flat", param2 = 0})
|
minetest.set_node(pos, {name = "homedecor:cobweb_flat", param2 = 0})
|
||||||
|
|
||||||
-- if all else fails, place the plantlike version as a fallback.
|
-- if all else fails, place the plantlike version as a fallback.
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -406,7 +406,7 @@ minetest.register_craft( {
|
|||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "homedecor:glass_table_large_b 2",
|
output = "homedecor:glass_table_large_b 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:glass_table_small_square", "homedecor:glass_table_small_square" },
|
{ "homedecor:glass_table_small_square", "homedecor:glass_table_small_square" },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -424,14 +424,14 @@ minetest.register_craft( {
|
|||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "homedecor:wood_table_small_square_b 2",
|
output = "homedecor:wood_table_small_square_b 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:wood_table_small_round","homedecor:wood_table_small_round" },
|
{ "homedecor:wood_table_small_round","homedecor:wood_table_small_round" },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "homedecor:wood_table_large_b 2",
|
output = "homedecor:wood_table_large_b 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:wood_table_small_square", "homedecor:wood_table_small_square" },
|
{ "homedecor:wood_table_small_square", "homedecor:wood_table_small_square" },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -495,7 +495,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "homedecor:skylight 4",
|
output = "homedecor:skylight 4",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "homedecor:glass_table_large", "homedecor:glass_table_large" },
|
{ "homedecor:glass_table_large", "homedecor:glass_table_large" },
|
||||||
{ "homedecor:glass_table_large", "homedecor:glass_table_large" },
|
{ "homedecor:glass_table_large", "homedecor:glass_table_large" },
|
||||||
},
|
},
|
||||||
@ -1842,7 +1842,7 @@ minetest.register_craft( {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- woodglass door
|
-- woodglass door
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "homedecor:door_woodglass_bottom_left",
|
output = "homedecor:door_woodglass_bottom_left",
|
||||||
@ -2370,7 +2370,7 @@ minetest.register_craft( {
|
|||||||
|
|
||||||
-- bathroom/kitchen tiles
|
-- bathroom/kitchen tiles
|
||||||
|
|
||||||
local color_pairings = {
|
local color_pairings = {
|
||||||
{ "grey", "white", "1" },
|
{ "grey", "white", "1" },
|
||||||
{ "dark_grey", "white", "2" },
|
{ "dark_grey", "white", "2" },
|
||||||
{ "black", "white", "3" },
|
{ "black", "white", "3" },
|
||||||
@ -2917,7 +2917,7 @@ minetest.register_craft({
|
|||||||
"homedecor:bottle_brown",
|
"homedecor:bottle_brown",
|
||||||
"homedecor:bottle_brown",
|
"homedecor:bottle_brown",
|
||||||
"homedecor:bottle_brown",
|
"homedecor:bottle_brown",
|
||||||
"homedecor:bottle_brown"
|
"homedecor:bottle_brown"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -2928,7 +2928,7 @@ minetest.register_craft({
|
|||||||
"homedecor:bottle_green",
|
"homedecor:bottle_green",
|
||||||
"homedecor:bottle_green",
|
"homedecor:bottle_green",
|
||||||
"homedecor:bottle_green",
|
"homedecor:bottle_green",
|
||||||
"homedecor:bottle_green"
|
"homedecor:bottle_green"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ homedecor.door_models = {
|
|||||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||||
|
|
||||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||||
@ -54,7 +54,7 @@ homedecor.door_models = {
|
|||||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||||
|
|
||||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||||
@ -93,7 +93,7 @@ homedecor.door_models = {
|
|||||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||||
|
|
||||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||||
@ -125,7 +125,7 @@ homedecor.door_models = {
|
|||||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 },
|
||||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }},
|
||||||
|
|
||||||
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
{{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16},
|
||||||
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
{ -8/16, 10/32, 13/32, 8/16, 11/32, 15/32 },
|
||||||
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
{ -8/16, 8/32, 13/32, 8/16, 9/32, 15/32 },
|
||||||
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },
|
||||||
|
@ -21,8 +21,8 @@ local function countSolids(pos,node,level)
|
|||||||
for x = -1, 1 do
|
for x = -1, 1 do
|
||||||
for z = -1, 1 do
|
for z = -1, 1 do
|
||||||
local y = 0
|
local y = 0
|
||||||
if node.param2 == 5 then
|
if node.param2 == 5 then
|
||||||
y = -level
|
y = -level
|
||||||
else
|
else
|
||||||
y = level
|
y = level
|
||||||
end
|
end
|
||||||
@ -89,9 +89,9 @@ local function calculateClosed(pos)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
-- direction == 3 or 4
|
-- direction == 3 or 4
|
||||||
if isSolid(pos,{-1,0,0}) and isSolid(pos,{1,0,0}) then
|
if isSolid(pos,{-1,0,0}) and isSolid(pos,{1,0,0}) then
|
||||||
if string.find(node.name,'_bottom_') then
|
if string.find(node.name,'_bottom_') then
|
||||||
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
return calculateClosed({x=pos.x,y=pos.y+1,z=pos.z})
|
||||||
@ -229,7 +229,7 @@ for i in ipairs(sides) do
|
|||||||
})
|
})
|
||||||
|
|
||||||
local dgroups = {snappy=3, not_in_creative_inventory=1}
|
local dgroups = {snappy=3, not_in_creative_inventory=1}
|
||||||
if side == "left" then
|
if side == "left" then
|
||||||
dgroups = {snappy=3}
|
dgroups = {snappy=3}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ local gate_models_open = {
|
|||||||
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
||||||
|
|
||||||
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
{{ 0.498, -0.5, -0.5, 0.498, 0.5, 0.5 }},
|
||||||
|
|
||||||
{{ 6/16, -8/16, -8/16, 8/16, 8/16, -6/16 }, -- left post
|
{{ 6/16, -8/16, -8/16, 8/16, 8/16, -6/16 }, -- left post
|
||||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||||
{ 13/32, 7/16, -8/16, 15/32, 8/16, 8/16 }, -- top piece
|
{ 13/32, 7/16, -8/16, 15/32, 8/16, 8/16 }, -- top piece
|
||||||
@ -452,7 +452,7 @@ function homedecor.place_door(itemstack, placer, pointed_thing, name, forceright
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not homedecor.get_nodedef_field(node_bottom.name, "buildable_to")
|
if not homedecor.get_nodedef_field(node_bottom.name, "buildable_to")
|
||||||
or not homedecor.get_nodedef_field(node_top.name, "buildable_to") then
|
or not homedecor.get_nodedef_field(node_top.name, "buildable_to") then
|
||||||
minetest.chat_send_player( placer:get_player_name(), S('Not enough space above that spot to place a door!') )
|
minetest.chat_send_player( placer:get_player_name(), S('Not enough space above that spot to place a door!') )
|
||||||
else
|
else
|
||||||
@ -598,7 +598,7 @@ minetest.register_node("homedecor:japanese_wall_top", {
|
|||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ minetest.register_node("homedecor:japanese_wall_middle", {
|
|||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -669,7 +669,7 @@ minetest.register_node("homedecor:japanese_wall_bottom", {
|
|||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -710,7 +710,7 @@ minetest.register_node("homedecor:jpn_door_bottom", {
|
|||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, 0.03125, 0.5, 0.5, 0.03125}, -- NodeBox1
|
{-0.5, -0.5, 0.03125, 0.5, 0.5, 0.03125}, -- NodeBox1
|
||||||
{-0.5, -0.5, 0, -0.44, 0.5, 0.0625}, -- NodeBox2
|
{-0.5, -0.5, 0, -0.44, 0.5, 0.0625}, -- NodeBox2
|
||||||
{0.44, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox3
|
{0.44, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox3
|
||||||
@ -724,7 +724,7 @@ minetest.register_node("homedecor:jpn_door_bottom", {
|
|||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 1.5, 0.0625},
|
fixed = {-0.5, -0.5, 0, 0.5, 1.5, 0.0625},
|
||||||
},
|
},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
@ -768,7 +768,7 @@ minetest.register_node("homedecor:jpn_door_top", {
|
|||||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, 0.03125, 0.5, 0.5, 0.03125}, -- NodeBox1
|
{-0.5, -0.5, 0.03125, 0.5, 0.5, 0.03125}, -- NodeBox1
|
||||||
{-0.5, -0.5, 0, -0.44, 0.5, 0.0625}, -- NodeBox2
|
{-0.5, -0.5, 0, -0.44, 0.5, 0.0625}, -- NodeBox2
|
||||||
{0.44, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox3
|
{0.44, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox3
|
||||||
@ -800,7 +800,7 @@ minetest.register_node("homedecor:jpn_door_bottom_open", {
|
|||||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-1.5, -0.5, -0.03125, -0.5, 0.5, -0.03125}, -- NodeBox1
|
{-1.5, -0.5, -0.03125, -0.5, 0.5, -0.03125}, -- NodeBox1
|
||||||
{-1.5, -0.5, -0.0625, -1.44, 0.5, 0}, -- NodeBox2
|
{-1.5, -0.5, -0.0625, -1.44, 0.5, 0}, -- NodeBox2
|
||||||
{-0.5625, -0.5, -0.0625, -0.5, 0.5, 0}, -- NodeBox3
|
{-0.5625, -0.5, -0.0625, -0.5, 0.5, 0}, -- NodeBox3
|
||||||
@ -844,7 +844,7 @@ minetest.register_node("homedecor:jpn_door_top_open", {
|
|||||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-1.5, -0.5, -0.03125, -0.5, 0.5, -0.03125}, -- NodeBox1
|
{-1.5, -0.5, -0.03125, -0.5, 0.5, -0.03125}, -- NodeBox1
|
||||||
{-1.5, -0.5, -0.0625, -1.44, 0.5, 0}, -- NodeBox2
|
{-1.5, -0.5, -0.0625, -1.44, 0.5, 0}, -- NodeBox2
|
||||||
{-0.5625, -0.5, -0.0625, -0.5, 0.5, 0}, -- NodeBox3
|
{-0.5625, -0.5, -0.0625, -0.5, 0.5, 0}, -- NodeBox3
|
||||||
|
@ -280,7 +280,7 @@ minetest.register_node("homedecor:fence_privacy_corner", {
|
|||||||
fixed = {
|
fixed = {
|
||||||
{ -0.5, -0.5, 5/16, 0.5, 0.5, 0.5 },
|
{ -0.5, -0.5, 5/16, 0.5, 0.5, 0.5 },
|
||||||
{ -0.5, -0.5, -0.5, -5/16, 0.5, 5/16 },
|
{ -0.5, -0.5, -0.5, -5/16, 0.5, 5/16 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -318,7 +318,7 @@ minetest.register_node("homedecor:fence_barbed_wire", {
|
|||||||
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post
|
{ -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post
|
||||||
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
{ 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post
|
||||||
{ -6/16, -8/16, 7/16, 6/16, 8/16, 7/16 } -- the wire
|
{ -6/16, -8/16, 7/16, 6/16, 8/16, 7/16 } -- the wire
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ minetest.register_node("homedecor:fence_barbed_wire_corner", {
|
|||||||
|
|
||||||
{ -8/16, -8/16, -8/16, -6/16, 8/16, -6/16 }, -- front post
|
{ -8/16, -8/16, -8/16, -6/16, 8/16, -6/16 }, -- front post
|
||||||
{ -7/16, -8/16, -6/16, -7/16, 8/16, 6/16 } -- more wire
|
{ -7/16, -8/16, -6/16, -7/16, 8/16, 6/16 } -- more wire
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ minetest.register_node("homedecor:fence_chainlink", {
|
|||||||
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece
|
{ -8/16, 7/16, 13/32, 8/16, 8/16, 15/32 }, -- top piece
|
||||||
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece
|
{ -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece
|
||||||
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } -- the chainlink itself
|
{ -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } -- the chainlink itself
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ minetest.register_node("homedecor:fence_wrought_iron_2", {
|
|||||||
{ -0.015625, -8/16, 14.75/32, 0.015625, 8/16, 15.25/32 }, -- cross piece
|
{ -0.015625, -8/16, 14.75/32, 0.015625, 8/16, 15.25/32 }, -- cross piece
|
||||||
{ -8/16, -8/16, 14/32, 8/16, -7.75/16, 16/32 }, -- bottom piece
|
{ -8/16, -8/16, 14/32, 8/16, -7.75/16, 16/32 }, -- bottom piece
|
||||||
{ -8/16, -8/16, 15/32, 8/16, 8/16, 15/32 } -- the grid itself
|
{ -8/16, -8/16, 15/32, 8/16, 8/16, 15/32 } -- the grid itself
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -263,13 +263,13 @@ function homedecor.register_furnace(name, furnacedef)
|
|||||||
local srclist = inv:get_list("src")
|
local srclist = inv:get_list("src")
|
||||||
local cooked = nil
|
local cooked = nil
|
||||||
local aftercooked
|
local aftercooked
|
||||||
|
|
||||||
if srclist then
|
if srclist then
|
||||||
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||||
end
|
end
|
||||||
|
|
||||||
local was_active = false
|
local was_active = false
|
||||||
|
|
||||||
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
||||||
was_active = true
|
was_active = true
|
||||||
meta:set_float("fuel_time", meta:get_float("fuel_time") + 1)
|
meta:set_float("fuel_time", meta:get_float("fuel_time") + 1)
|
||||||
@ -306,7 +306,7 @@ function homedecor.register_furnace(name, furnacedef)
|
|||||||
local cooked = nil
|
local cooked = nil
|
||||||
local fuellist = inv:get_list("fuel")
|
local fuellist = inv:get_list("fuel")
|
||||||
local srclist = inv:get_list("src")
|
local srclist = inv:get_list("src")
|
||||||
|
|
||||||
if srclist then
|
if srclist then
|
||||||
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||||
end
|
end
|
||||||
|
@ -34,7 +34,7 @@ for _, i in ipairs(table_colors) do
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local chaircolors = {
|
local chaircolors = {
|
||||||
@ -52,7 +52,7 @@ for i in ipairs(chaircolors) do
|
|||||||
local color = "_"..chaircolors[i][1]
|
local color = "_"..chaircolors[i][1]
|
||||||
local color2 = chaircolors[i][1]
|
local color2 = chaircolors[i][1]
|
||||||
local name = S(chaircolors[i][2])
|
local name = S(chaircolors[i][2])
|
||||||
local chairtiles = {
|
local chairtiles = {
|
||||||
"forniture_kitchen_chair_top"..color..".png",
|
"forniture_kitchen_chair_top"..color..".png",
|
||||||
"forniture_wood.png",
|
"forniture_wood.png",
|
||||||
"forniture_kitchen_chair_sides"..color..".png",
|
"forniture_kitchen_chair_sides"..color..".png",
|
||||||
@ -60,7 +60,7 @@ for i in ipairs(chaircolors) do
|
|||||||
"forniture_kitchen_chair_back"..color..".png",
|
"forniture_kitchen_chair_back"..color..".png",
|
||||||
"forniture_kitchen_chair_front"..color..".png",
|
"forniture_kitchen_chair_front"..color..".png",
|
||||||
}
|
}
|
||||||
if chaircolors[i][1] == "" then
|
if chaircolors[i][1] == "" then
|
||||||
color = ""
|
color = ""
|
||||||
chairtiles = { "forniture_wood.png" }
|
chairtiles = { "forniture_wood.png" }
|
||||||
end
|
end
|
||||||
@ -89,7 +89,7 @@ for i in ipairs(chaircolors) do
|
|||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
})
|
})
|
||||||
|
|
||||||
if color ~= "" then
|
if color ~= "" then
|
||||||
minetest.register_node("homedecor:armchair"..color, {
|
minetest.register_node("homedecor:armchair"..color, {
|
||||||
description = S("Armchair (%s)"):format(name),
|
description = S("Armchair (%s)"):format(name),
|
||||||
tiles = { "forniture_armchair_top"..color..".png" },
|
tiles = { "forniture_armchair_top"..color..".png" },
|
||||||
@ -197,7 +197,7 @@ local function unextend_bed(pos, color)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for _, color in ipairs(bedcolors) do
|
for _, color in ipairs(bedcolors) do
|
||||||
|
|
||||||
minetest.register_node("homedecor:bed_"..color.."_head", {
|
minetest.register_node("homedecor:bed_"..color.."_head", {
|
||||||
tiles = {
|
tiles = {
|
||||||
"homedecor_bed_"..color.."_top1.png",
|
"homedecor_bed_"..color.."_top1.png",
|
||||||
@ -262,12 +262,12 @@ for _, color in ipairs(bedcolors) do
|
|||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
bed_extension(pos, color)
|
bed_extension(pos, color)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
|
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
|
||||||
"homedecor:bed_"..color.."_foot", "homedecor:bed_"..color.."_head", false)
|
"homedecor:bed_"..color.."_foot", "homedecor:bed_"..color.."_head", false)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
local fdir = oldnode.param2
|
local fdir = oldnode.param2
|
||||||
if not fdir or fdir > 3 then return end
|
if not fdir or fdir > 3 then return end
|
||||||
@ -278,7 +278,7 @@ for _, color in ipairs(bedcolors) do
|
|||||||
unextend_bed(pos, color)
|
unextend_bed(pos, color)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("homedecor:bed_"..color.."_footext", {
|
minetest.register_node("homedecor:bed_"..color.."_footext", {
|
||||||
tiles = {
|
tiles = {
|
||||||
"homedecor_bed_"..color.."_top2.png",
|
"homedecor_bed_"..color.."_top2.png",
|
||||||
@ -317,7 +317,7 @@ for _, color in ipairs(bedcolors) do
|
|||||||
end,
|
end,
|
||||||
drop = "homedecor:bed_"..color.."_foot"
|
drop = "homedecor:bed_"..color.."_foot"
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("homedecor:wardrobe_top", {
|
minetest.register_node("homedecor:wardrobe_top", {
|
||||||
|
@ -114,7 +114,7 @@ minetest.register_node("homedecor:chains", {
|
|||||||
fixed = {-1/2, -1/2, 1/4, 1/2, 1/2, 1/2},
|
fixed = {-1/2, -1/2, 1/4, 1/2, 1/2, 1/2},
|
||||||
},
|
},
|
||||||
groups = {cracky=1},
|
groups = {cracky=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("homedecor:torch_wall", {
|
minetest.register_node("homedecor:torch_wall", {
|
||||||
description = S("Wall Torch"),
|
description = S("Wall Torch"),
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
||||||
-- for helping me figure out the inventories used in the nightstands/dressers.
|
-- for helping me figure out the inventories used in the nightstands/dressers.
|
||||||
--
|
--
|
||||||
-- The code for ovens, nightstands, refrigerators are basically modified
|
-- The code for ovens, nightstands, refrigerators are basically modified
|
||||||
-- copies of the code for chests and furnaces.
|
-- copies of the code for chests and furnaces.
|
||||||
|
|
||||||
homedecor = {}
|
homedecor = {}
|
||||||
@ -57,7 +57,7 @@ function homedecor.table_copy(t)
|
|||||||
return nt
|
return nt
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
function homedecor.get_nodedef_field(nodename, fieldname)
|
function homedecor.get_nodedef_field(nodename, fieldname)
|
||||||
if not minetest.registered_nodes[nodename] then
|
if not minetest.registered_nodes[nodename] then
|
||||||
|
@ -64,7 +64,7 @@ for _, mat in ipairs(counter_materials) do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node('homedecor:kitchen_cabinet_half', {
|
minetest.register_node('homedecor:kitchen_cabinet_half', {
|
||||||
drawtype="nodebox",
|
drawtype="nodebox",
|
||||||
description = S('Half-height Kitchen Cabinet (on ceiling)'),
|
description = S('Half-height Kitchen Cabinet (on ceiling)'),
|
||||||
tiles = { 'homedecor_kitchen_cabinet_sides.png',
|
tiles = { 'homedecor_kitchen_cabinet_sides.png',
|
||||||
|
@ -278,17 +278,17 @@ minetest.register_node('homedecor:candle', {
|
|||||||
},
|
},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125 },
|
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125 },
|
||||||
{ -0.125, 0, 0, 0.125, 0.5, 0 },
|
{ -0.125, 0, 0, 0.125, 0.5, 0 },
|
||||||
{ 0, 0, -0.125, 0, 0.5, 0.125 }
|
{ 0, 0, -0.125, 0, 0.5, 0.125 }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 },
|
{ -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -308,9 +308,9 @@ minetest.register_node('homedecor:candle_thin', {
|
|||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 },
|
{ -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -331,9 +331,9 @@ minetest.register_node('homedecor:oil_lamp', {
|
|||||||
walkable = true,
|
walkable = true,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
|
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
light_source = LIGHT_MAX-4,
|
light_source = LIGHT_MAX-4,
|
||||||
@ -351,9 +351,9 @@ minetest.register_node('homedecor:wall_lantern', {
|
|||||||
walkable = true,
|
walkable = true,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
|
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
light_source = LIGHT_MAX-4,
|
light_source = LIGHT_MAX-4,
|
||||||
@ -471,7 +471,7 @@ local function reg_lamp(suffix, nxt, tilesuffix, light, color)
|
|||||||
minetest.register_alias("homedecor:standing_lamp_top"..lampcolor.."_"..suffix, "air")
|
minetest.register_alias("homedecor:standing_lamp_top"..lampcolor.."_"..suffix, "air")
|
||||||
|
|
||||||
-- for old maps that had 3dfornit`ure
|
-- for old maps that had 3dfornit`ure
|
||||||
if lampcolor == "" then
|
if lampcolor == "" then
|
||||||
minetest.register_alias("3dforniture:table_lamp_"..suffix, "homedecor:table_lamp_"..suffix)
|
minetest.register_alias("3dforniture:table_lamp_"..suffix, "homedecor:table_lamp_"..suffix)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -162,7 +162,7 @@ minetest.register_node("homedecor:toilet_paper", {
|
|||||||
inventory_image = "homedecor_toilet_paper_inv.png",
|
inventory_image = "homedecor_toilet_paper_inv.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -0.1875, 0.125, 0.0625, 0.25, 0.4375, 0.5 }
|
fixed = { -0.1875, 0.125, 0.0625, 0.25, 0.4375, 0.5 }
|
||||||
},
|
},
|
||||||
|
@ -143,7 +143,7 @@ minetest.register_node("homedecor:pole_brass", {
|
|||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
walkable = true,
|
walkable = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("homedecor:pole_wrought_iron", {
|
minetest.register_node("homedecor:pole_wrought_iron", {
|
||||||
description = S("Wrought Iron Pole"),
|
description = S("Wrought Iron Pole"),
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -967,7 +967,7 @@ minetest.register_node("homedecor:doorbell", {
|
|||||||
pos = pos,
|
pos = pos,
|
||||||
gain = 1.0,
|
gain = 1.0,
|
||||||
max_hear_distance = 15
|
max_hear_distance = 15
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1421,7 +1421,7 @@ minetest.register_node("homedecor:sportbench", {
|
|||||||
tiles = {
|
tiles = {
|
||||||
"homedecor_sportbench_top.png",
|
"homedecor_sportbench_top.png",
|
||||||
"wool_black.png",
|
"wool_black.png",
|
||||||
"homedecor_sportbench_left.png^[transformFX",
|
"homedecor_sportbench_left.png^[transformFX",
|
||||||
"homedecor_sportbench_left.png",
|
"homedecor_sportbench_left.png",
|
||||||
"homedecor_sportbench_bottom.png",
|
"homedecor_sportbench_bottom.png",
|
||||||
"homedecor_sportbench_front.png"
|
"homedecor_sportbench_front.png"
|
||||||
@ -1526,7 +1526,7 @@ minetest.register_node("homedecor:paper_towel", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = { snappy=3 },
|
groups = { snappy=3 },
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -0.4375, 0.125, 0.0625, 0.4375, 0.4375, 0.5 }
|
fixed = { -0.4375, 0.125, 0.0625, 0.4375, 0.4375, 0.5 }
|
||||||
},
|
},
|
||||||
@ -1673,7 +1673,7 @@ minetest.register_node("homedecor:beer_tap", {
|
|||||||
local inv = puncher:get_inventory()
|
local inv = puncher:get_inventory()
|
||||||
|
|
||||||
local wieldname = wielditem:get_name()
|
local wieldname = wielditem:get_name()
|
||||||
if wieldname == "vessels:drinking_glass" then
|
if wieldname == "vessels:drinking_glass" then
|
||||||
if inv:room_for_item("main", "homedecor:beer_mug 1") then
|
if inv:room_for_item("main", "homedecor:beer_mug 1") then
|
||||||
wielditem:take_item()
|
wielditem:take_item()
|
||||||
puncher:set_wielded_item(wielditem)
|
puncher:set_wielded_item(wielditem)
|
||||||
@ -1725,7 +1725,7 @@ minetest.register_node("homedecor:tool_cabinet_bottom", {
|
|||||||
"homedecor_tool_cabinet_bottom_sides.png",
|
"homedecor_tool_cabinet_bottom_sides.png",
|
||||||
"homedecor_tool_cabinet_bottom_sides.png",
|
"homedecor_tool_cabinet_bottom_sides.png",
|
||||||
"homedecor_tool_cabinet_bottom_sides.png",
|
"homedecor_tool_cabinet_bottom_sides.png",
|
||||||
"homedecor_tool_cabinet_bottom_sides.png",
|
"homedecor_tool_cabinet_bottom_sides.png",
|
||||||
"homedecor_tool_cabinet_bottom_front.png"
|
"homedecor_tool_cabinet_bottom_front.png"
|
||||||
},
|
},
|
||||||
inventory_image = "homedecor_tool_cabinet_inv.png",
|
inventory_image = "homedecor_tool_cabinet_inv.png",
|
||||||
|
@ -68,7 +68,7 @@ for i in ipairs(materials) do
|
|||||||
minetest.register_node('homedecor:'..m..'_table_large', {
|
minetest.register_node('homedecor:'..m..'_table_large', {
|
||||||
description = S(d.." Table Piece (large)"),
|
description = S(d.." Table Piece (large)"),
|
||||||
drawtype = 'nodebox',
|
drawtype = 'nodebox',
|
||||||
tiles = {
|
tiles = {
|
||||||
'homedecor_'..m..'_table_large_tb.png',
|
'homedecor_'..m..'_table_large_tb.png',
|
||||||
'homedecor_'..m..'_table_large_tb.png',
|
'homedecor_'..m..'_table_large_tb.png',
|
||||||
'homedecor_'..m..'_table_large_edges.png',
|
'homedecor_'..m..'_table_large_edges.png',
|
||||||
|
@ -184,7 +184,7 @@ for c in ipairs(curtaincolors) do
|
|||||||
-- Open the curtains
|
-- Open the curtains
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
on_rightclick = function(pos, node, clicker, itemstack)
|
||||||
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
||||||
if string.find(topnode.name, "homedecor:curtainrod") then
|
if string.find(topnode.name, "homedecor:curtainrod") then
|
||||||
local fdir = node.param2
|
local fdir = node.param2
|
||||||
minetest.set_node(pos, { name = "homedecor:curtain_open_"..color, param2 = fdir })
|
minetest.set_node(pos, { name = "homedecor:curtain_open_"..color, param2 = fdir })
|
||||||
end
|
end
|
||||||
@ -211,7 +211,7 @@ for c in ipairs(curtaincolors) do
|
|||||||
-- Close the curtains
|
-- Close the curtains
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
on_rightclick = function(pos, node, clicker, itemstack)
|
||||||
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
||||||
if string.find(topnode.name, "homedecor:curtainrod") then
|
if string.find(topnode.name, "homedecor:curtainrod") then
|
||||||
local fdir = node.param2
|
local fdir = node.param2
|
||||||
minetest.set_node(pos, { name = "homedecor:curtain_"..color, param2 = fdir })
|
minetest.set_node(pos, { name = "homedecor:curtain_"..color, param2 = fdir })
|
||||||
end
|
end
|
||||||
|
154
inbox/init.lua
154
inbox/init.lua
@ -6,86 +6,86 @@ TODO
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output ="inbox:empty",
|
output ="inbox:empty",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"","default:steel_ingot",""},
|
{"","default:steel_ingot",""},
|
||||||
{"default:steel_ingot","","default:steel_ingot"},
|
{"default:steel_ingot","","default:steel_ingot"},
|
||||||
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
|
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("inbox:empty", {
|
minetest.register_node("inbox:empty", {
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-4/12, -6/12, -6/12, 4/12, 0/12, 6/12},
|
{-4/12, -6/12, -6/12, 4/12, 0/12, 6/12},
|
||||||
{-3/12, 0/12, -6/12, 3/12, 2/12, 6/12},
|
{-3/12, 0/12, -6/12, 3/12, 2/12, 6/12},
|
||||||
{3/12, 0/12, -4/12, 4/12, 5/12, -2/12},
|
{3/12, 0/12, -4/12, 4/12, 5/12, -2/12},
|
||||||
{3/12, 3/12, -2/12, 4/12, 5/12, 0/12}
|
{3/12, 3/12, -2/12, 4/12, 5/12, 0/12}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
description = "Mailbox",
|
description = "Mailbox",
|
||||||
tiles = {"inbox_top.png", "inbox_bottom.png", "inbox_east.png",
|
tiles = {"inbox_top.png", "inbox_bottom.png", "inbox_east.png",
|
||||||
"inbox_west.png", "inbox_back.png", "inbox_front.png"},
|
"inbox_west.png", "inbox_back.png", "inbox_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {choppy=2,oddly_breakable_by_hand=2},
|
groups = {choppy=2,oddly_breakable_by_hand=2},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local owner = placer:get_player_name()
|
local owner = placer:get_player_name()
|
||||||
meta:set_string("owner", owner)
|
meta:set_string("owner", owner)
|
||||||
meta:set_string("infotext", owner.."'s Mailbox")
|
meta:set_string("infotext", owner.."'s Mailbox")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
inv:set_size("drop", 1)
|
inv:set_size("drop", 1)
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
on_rightclick = function(pos, node, clicker, itemstack)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local player = clicker:get_player_name()
|
local player = clicker:get_player_name()
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if owner == player then
|
if owner == player then
|
||||||
minetest.show_formspec(
|
minetest.show_formspec(
|
||||||
clicker:get_player_name(),
|
clicker:get_player_name(),
|
||||||
"default:chest_locked",
|
"default:chest_locked",
|
||||||
inbox.get_inbox_formspec(pos))
|
inbox.get_inbox_formspec(pos))
|
||||||
else
|
else
|
||||||
minetest.show_formspec(
|
minetest.show_formspec(
|
||||||
clicker:get_player_name(),
|
clicker:get_player_name(),
|
||||||
"default:chest_locked",
|
"default:chest_locked",
|
||||||
inbox.get_inbox_insert_formspec(pos))
|
inbox.get_inbox_insert_formspec(pos))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
local meta = minetest.get_meta(pos);
|
local meta = minetest.get_meta(pos);
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
return player:get_player_name() == owner and inv:is_empty("main")
|
return player:get_player_name() == owner and inv:is_empty("main")
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if listname == "drop" and inv:room_for_item("main", stack) then
|
if listname == "drop" and inv:room_for_item("main", stack) then
|
||||||
inv:remove_item("drop", stack)
|
inv:remove_item("drop", stack)
|
||||||
inv:add_item("main", stack)
|
inv:add_item("main", stack)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
if listname == "main" then
|
if listname == "main" then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
if listname == "drop" then
|
if listname == "drop" then
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if inv:room_for_item("main", stack) then
|
if inv:room_for_item("main", stack) then
|
||||||
return -1
|
return -1
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
function inbox.get_inbox_formspec(pos)
|
function inbox.get_inbox_formspec(pos)
|
||||||
|
@ -133,7 +133,7 @@ minetest.register_node("itemframes:frame",{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
|
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
return player:get_player_name() == meta:get_string("owner")
|
return player:get_player_name() == meta:get_string("owner")
|
||||||
end,
|
end,
|
||||||
@ -178,7 +178,7 @@ minetest.register_node("itemframes:pedestal",{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
|
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
return player:get_player_name() == meta:get_string("owner")
|
return player:get_player_name() == meta:get_string("owner")
|
||||||
end,
|
end,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local armchairs_list = {
|
local armchairs_list = {
|
||||||
{ "Red Armchair", "red"},
|
{ "Red Armchair", "red"},
|
||||||
{ "Orange Armchair", "orange"},
|
{ "Orange Armchair", "orange"},
|
||||||
{ "Yellow Armchair", "yellow"},
|
{ "Yellow Armchair", "yellow"},
|
||||||
{ "Green Armchair", "green"},
|
{ "Green Armchair", "green"},
|
||||||
{ "Blue Armchair", "blue"},
|
{ "Blue Armchair", "blue"},
|
||||||
@ -31,13 +31,13 @@ for i in ipairs(armchairs_list) do
|
|||||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||||
|
|
||||||
--base/cushion
|
--base/cushion
|
||||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||||
|
|
||||||
--back
|
--back
|
||||||
{-0.5, 0, 0.3125, 0.5, 0.5, 0.5},
|
{-0.5, 0, 0.3125, 0.5, 0.5, 0.5},
|
||||||
|
|
||||||
--arms
|
--arms
|
||||||
{-0.5, 0, -0.5, -0.3125, 0.25, 0.3125},
|
{-0.5, 0, -0.5, -0.3125, 0.25, 0.3125},
|
||||||
{0.3125, 0, -0.5, 0.5, 0.25, 0.3125},
|
{0.3125, 0, -0.5, 0.5, 0.25, 0.3125},
|
||||||
@ -59,7 +59,7 @@ for i in ipairs(armchairs_list) do
|
|||||||
clicker:set_hp(20)
|
clicker:set_hp(20)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "lrfurn:armchair_"..colour,
|
output = "lrfurn:armchair_"..colour,
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -68,7 +68,7 @@ for i in ipairs(armchairs_list) do
|
|||||||
{"group:stick", "", "", }
|
{"group:stick", "", "", }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "lrfurn:armchair_"..colour,
|
output = "lrfurn:armchair_"..colour,
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -13,9 +13,9 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||||||
--legs
|
--legs
|
||||||
{-0.375, -0.5, -0.375, -0.3125, -0.0625, -0.3125},
|
{-0.375, -0.5, -0.375, -0.3125, -0.0625, -0.3125},
|
||||||
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
||||||
|
|
||||||
--tabletop
|
--tabletop
|
||||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.5},
|
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.5},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -42,7 +42,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
@ -58,7 +58,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
||||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -76,7 +76,7 @@ minetest.register_node("lrfurn:coffeetable_front", {
|
|||||||
--legs
|
--legs
|
||||||
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
||||||
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
||||||
|
|
||||||
--tabletop
|
--tabletop
|
||||||
{-0.4375, -0.0625, -0.5, 0.4375, 0, 0.4375},
|
{-0.4375, -0.0625, -0.5, 0.4375, 0, 0.4375},
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,9 @@ minetest.register_node("lrfurn:endtable", {
|
|||||||
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
||||||
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
||||||
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
||||||
|
|
||||||
--tabletop
|
--tabletop
|
||||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.4375},
|
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.4375},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local longsofas_list = {
|
local longsofas_list = {
|
||||||
{ "Red Long Sofa", "red"},
|
{ "Red Long Sofa", "red"},
|
||||||
{ "Orange Long Sofa", "orange"},
|
{ "Orange Long Sofa", "orange"},
|
||||||
{ "Yellow Long Sofa", "yellow"},
|
{ "Yellow Long Sofa", "yellow"},
|
||||||
{ "Green Long Sofa", "green"},
|
{ "Green Long Sofa", "green"},
|
||||||
{ "Blue Long Sofa", "blue"},
|
{ "Blue Long Sofa", "blue"},
|
||||||
@ -29,13 +29,13 @@ for i in ipairs(longsofas_list) do
|
|||||||
--legs
|
--legs
|
||||||
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
||||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||||
|
|
||||||
--base/cushion
|
--base/cushion
|
||||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||||
|
|
||||||
--back
|
--back
|
||||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||||
|
|
||||||
--arm
|
--arm
|
||||||
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ for i in ipairs(longsofas_list) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
@ -105,12 +105,12 @@ for i in ipairs(longsofas_list) do
|
|||||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_left_"..colour ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_left_"..colour ) then
|
||||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
if not clicker:is_player() then
|
if not clicker:is_player() then
|
||||||
return
|
return
|
||||||
@ -134,10 +134,10 @@ for i in ipairs(longsofas_list) do
|
|||||||
--legs
|
--legs
|
||||||
{-0.4375, -0.5, -0.03125, -0.375, -0.375, 0.03125},
|
{-0.4375, -0.5, -0.03125, -0.375, -0.375, 0.03125},
|
||||||
{0.375, -0.5, -0.03125, 0.4375, -0.375, 0.03125},
|
{0.375, -0.5, -0.03125, 0.4375, -0.375, 0.03125},
|
||||||
|
|
||||||
--base/cushion
|
--base/cushion
|
||||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||||
|
|
||||||
--back
|
--back
|
||||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||||
}
|
}
|
||||||
@ -149,7 +149,7 @@ for i in ipairs(longsofas_list) do
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("lrfurn:longsofa_left_"..colour, {
|
minetest.register_node("lrfurn:longsofa_left_"..colour, {
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||||
@ -163,13 +163,13 @@ for i in ipairs(longsofas_list) do
|
|||||||
--legs
|
--legs
|
||||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||||
|
|
||||||
--base/cushion
|
--base/cushion
|
||||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||||
|
|
||||||
--back
|
--back
|
||||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||||
|
|
||||||
--arm
|
--arm
|
||||||
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
||||||
}
|
}
|
||||||
@ -181,9 +181,9 @@ for i in ipairs(longsofas_list) do
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("lrfurn:longsofa_"..colour, "lrfurn:longsofa_right_"..colour)
|
minetest.register_alias("lrfurn:longsofa_"..colour, "lrfurn:longsofa_right_"..colour)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "lrfurn:longsofa_"..colour,
|
output = "lrfurn:longsofa_"..colour,
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local sofas_list = {
|
local sofas_list = {
|
||||||
{ "Red Sofa", "red"},
|
{ "Red Sofa", "red"},
|
||||||
{ "Orange Sofa", "orange"},
|
{ "Orange Sofa", "orange"},
|
||||||
{ "Yellow Sofa", "yellow"},
|
{ "Yellow Sofa", "yellow"},
|
||||||
{ "Green Sofa", "green"},
|
{ "Green Sofa", "green"},
|
||||||
{ "Blue Sofa", "blue"},
|
{ "Blue Sofa", "blue"},
|
||||||
@ -29,13 +29,13 @@ for i in ipairs(sofas_list) do
|
|||||||
--legs
|
--legs
|
||||||
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
||||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||||
|
|
||||||
--base/cushion
|
--base/cushion
|
||||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||||
|
|
||||||
--back
|
--back
|
||||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||||
|
|
||||||
--arm
|
--arm
|
||||||
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ for i in ipairs(sofas_list) do
|
|||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
@ -80,10 +80,10 @@ for i in ipairs(sofas_list) do
|
|||||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:sofa_left_"..colour ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:sofa_left_"..colour ) then
|
||||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
if not clicker:is_player() then
|
if not clicker:is_player() then
|
||||||
return
|
return
|
||||||
@ -93,7 +93,7 @@ for i in ipairs(sofas_list) do
|
|||||||
clicker:set_hp(20)
|
clicker:set_hp(20)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("lrfurn:sofa_left_"..colour, {
|
minetest.register_node("lrfurn:sofa_left_"..colour, {
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||||
@ -107,13 +107,13 @@ for i in ipairs(sofas_list) do
|
|||||||
--legs
|
--legs
|
||||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||||
|
|
||||||
--base/cushion
|
--base/cushion
|
||||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||||
|
|
||||||
--back
|
--back
|
||||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||||
|
|
||||||
--arm
|
--arm
|
||||||
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ for i in ipairs(sofas_list) do
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("lrfurn:sofa_"..colour, "lrfurn:sofa_right_"..colour)
|
minetest.register_alias("lrfurn:sofa_"..colour, "lrfurn:sofa_right_"..colour)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -209,7 +209,7 @@ minetest.register_node("plasmascreen:screen5", {
|
|||||||
fixed = {-1.5050, -0.3125, 0.3700, 1.5050, 1.5050, 0.5050}
|
fixed = {-1.5050, -0.3125, 0.3700, 1.5050, 1.5050, 0.5050}
|
||||||
},
|
},
|
||||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
|
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
|
||||||
|
|
||||||
after_place_node = function(pos,placer,itemstack)
|
after_place_node = function(pos,placer,itemstack)
|
||||||
local param2 = minetest.get_node(pos).param2
|
local param2 = minetest.get_node(pos).param2
|
||||||
local p = {x=pos.x, y=pos.y, z=pos.z}
|
local p = {x=pos.x, y=pos.y, z=pos.z}
|
||||||
@ -359,7 +359,7 @@ after_place_node = function(pos,placer,itemstack)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
if oldnode.param2 == 0 then
|
if oldnode.param2 == 0 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
|
@ -382,7 +382,7 @@ local function make_line_texture(line, lineno)
|
|||||||
else
|
else
|
||||||
maxw = math_max(width, maxw)
|
maxw = math_max(width, maxw)
|
||||||
end
|
end
|
||||||
if #chars < MAX_INPUT_CHARS then
|
if #chars < MAX_INPUT_CHARS then
|
||||||
table.insert(chars, {
|
table.insert(chars, {
|
||||||
off=ch_offs,
|
off=ch_offs,
|
||||||
tex=FONT_FMT_SIMPLE:format(c:byte()),
|
tex=FONT_FMT_SIMPLE:format(c:byte()),
|
||||||
|
Loading…
Reference in New Issue
Block a user