whitespace cleanup:

* remove all trailing whitespaces
* make inbox and computer use the prevalent indentation rules
* CRLF->LF where found
This commit is contained in:
Tim 2015-01-20 23:59:50 +01:00
parent 29bf986ea8
commit be4ed12b6c
31 changed files with 691 additions and 691 deletions

View File

@ -107,7 +107,7 @@ minetest.register_craft({
output = 'chains:chain_top',
recipe = {
{'default:steel_ingot'},
{'glooptest:chainlink'},
{'glooptest:chainlink'},
},
})
@ -135,7 +135,7 @@ minetest.register_craft({
output = 'chains:chain_top_brass',
recipe = {
{'technic:brass_ingot'},
{'homedecor:chainlink_brass'},
{'homedecor:chainlink_brass'},
},
})

View File

@ -1,122 +1,122 @@
-- Amiga 500 lookalike
-- Amiga 500 lookalike
computer.register("computer:shefriendSOO", {
description = "SheFriendSOO";
tiles_off = { front=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 17, 32, 32, 12 }, -- Monitor Screen
{ 3, 3, 29, 26, 26, 3 }, -- Monitor Tube
{ 0, 0, 0, 32, 4, 17 }, -- Keyboard
});
description = "SheFriendSOO";
tiles_off = { front=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 17, 32, 32, 12 }, -- Monitor Screen
{ 3, 3, 29, 26, 26, 3 }, -- Monitor Tube
{ 0, 0, 0, 32, 4, 17 }, -- Keyboard
});
});
-- Some generic laptop
computer.register("computer:vanio", {
description = "Pony Vanio";
tiles_off = { front=true; top=true; left=true; right=true; back=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
{ 0, 3, 25, 32, 21, 3 }, -- Screen
});
node_box_off = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
{ 0, 3, 4, 32, 3, 24 }, -- Screen
});
description = "Pony Vanio";
tiles_off = { front=true; top=true; left=true; right=true; back=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
{ 0, 3, 25, 32, 21, 3 }, -- Screen
});
node_box_off = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
{ 0, 3, 4, 32, 3, 24 }, -- Screen
});
});
-- Sony PlayStation lookalike
computer.register("computer:slaystation", {
description = "Pony SlayStation";
tiles_off = { top=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 11, 32, 6, 21 }, -- Console
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
{ 5, 0, 4, 5, 2, 5 }, -- Controller 1 Center
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
{ 22, 0, 4, 5, 2, 5 }, -- Controller 2 Center
});
description = "Pony SlayStation";
tiles_off = { top=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 11, 32, 6, 21 }, -- Console
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
{ 5, 0, 4, 5, 2, 5 }, -- Controller 1 Center
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
{ 22, 0, 4, 5, 2, 5 }, -- Controller 2 Center
});
});
-- Sony PlayStation 2 lookalike
computer.register("computer:slaystation2", {
description = "Pony SlayStation 2";
tiles_off = { front=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 2, 2, 11, 28, 3, 19 }, -- Console (Upper part)
{ 2, 0, 11, 26, 2, 19 }, -- Console (Lower part)
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
{ 5, 0, 1, 5, 2, 8 }, -- Controller 1 Center
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
{ 22, 0, 1, 5, 2, 8 }, -- Controller 2 Center
});
description = "Pony SlayStation 2";
tiles_off = { front=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 2, 2, 11, 28, 3, 19 }, -- Console (Upper part)
{ 2, 0, 11, 26, 2, 19 }, -- Console (Lower part)
{ 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip
{ 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip
{ 5, 0, 1, 5, 2, 8 }, -- Controller 1 Center
{ 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip
{ 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip
{ 22, 0, 1, 5, 2, 8 }, -- Controller 2 Center
});
});
-- Sinclair ZX Spectrum lookalike
computer.register("computer:specter", {
description = "SX Specter";
tiles_off = { };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 3, 0, 0, 26, 4, 17 }, -- Keyboard
{ 18, 0, 18, 12, 6, 14 }, -- Tape Player
});
description = "SX Specter";
tiles_off = { };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 3, 0, 0, 26, 4, 17 }, -- Keyboard
{ 18, 0, 18, 12, 6, 14 }, -- Tape Player
});
});
-- Nintendo Wii lookalike
computer.register("computer:wee", {
description = "Nientiendo Wee";
tiles_off = { front=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 11, 0, 3, 10, 6, 26 }, -- Base
{ 12, 6, 4, 8, 22, 24 }, -- Top
});
description = "Nientiendo Wee";
tiles_off = { front=true; };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 11, 0, 3, 10, 6, 26 }, -- Base
{ 12, 6, 4, 8, 22, 24 }, -- Top
});
});
-- Apple iPad lookalike
minetest.register_node("computer:piepad", {
description = "Snapple Piepad",
drawtype = "signlike",
tiles = {"computer_piepad_inv.png"},
inventory_image = "computer_piepad_inv.png",
wield_image = "computer_piepad_inv.png",
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "wallmounted",
light_source = 10,
walkable = false,
groups = { snappy=3, cracky=3, choppy=3, oddly_breakable_by_hand=3},
selection_box = {type = "wallmounted"},
sounds = default.node_sound_wood_defaults()
description = "Snapple Piepad",
drawtype = "signlike",
tiles = {"computer_piepad_inv.png"},
inventory_image = "computer_piepad_inv.png",
wield_image = "computer_piepad_inv.png",
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "wallmounted",
light_source = 10,
walkable = false,
groups = { snappy=3, cracky=3, choppy=3, oddly_breakable_by_hand=3},
selection_box = {type = "wallmounted"},
sounds = default.node_sound_wood_defaults()
})
-- Commodore 64 lookalike
computer.register("computer:admiral64", {
description = "Admiral64";
tiles_off = { };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 0, 32, 4, 18 }, -- Keyboard
});
description = "Admiral64";
tiles_off = { };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 0, 32, 4, 18 }, -- Keyboard
});
});
-- Commodore 128 lookalike
computer.register("computer:admiral128", {
description = "Admiral128";
tiles_off = { };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 0, 32, 4, 27 }, -- Keyboard
});
description = "Admiral128";
tiles_off = { };
node_box = computer.pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 0, 32, 4, 27 }, -- Keyboard
});
});
---------------------------------------------------------------------------------
@ -127,8 +127,8 @@ computer.register("computer:admiral128", {
minetest.register_node("computer:monitor_on", {
description = "Monitor and keyboard",
tiles = {"computer_monitor_t.png","computer_monitor_bt.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_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
paramtype = "light",
light_source = 4,
paramtype2 = "facedir",
@ -140,26 +140,26 @@ minetest.register_node("computer:monitor_on", {
node_box = {
type = "fixed",
fixed = {
{-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.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
{-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.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
{-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.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
drop = 'computer:monitor',
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "computer:monitor";
minetest.set_node(pos, node);
nodeupdate(pos)
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "computer:monitor";
minetest.set_node(pos, node);
nodeupdate(pos)
end
})
minetest.register_node("computer:monitor_bios", {
description = "Monitor and keyboard",
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",
light_source = 4,
paramtype2 = "facedir",
@ -171,17 +171,17 @@ minetest.register_node("computer:monitor_bios", {
node_box = {
type = "fixed",
fixed = {
{-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.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
{-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.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
{-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.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
drop = 'computer:monitor',
})
})
minetest.register_node("computer:monitor_loading", {
description = "Monitor and keyboard",
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 = {
type = "fixed",
fixed = {
{-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.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
{-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.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
{-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.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
drop = 'computer:monitor',
})
})
minetest.register_node("computer:monitor_login", {
description = "Monitor and keyboard",
@ -223,11 +223,11 @@ minetest.register_node("computer:monitor_login", {
node_box = {
type = "fixed",
fixed = {
{-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.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
{-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.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
{-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.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
@ -249,11 +249,11 @@ minetest.register_node("computer:monitor_desktop", {
node_box = {
type = "fixed",
fixed = {
{-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.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
{-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.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
{-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.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
{-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", {
description = "Monitor and keyboard",
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",
light_source = 4,
paramtype2 = "facedir",
@ -275,18 +275,18 @@ minetest.register_node("computer:monitor", {
node_box = {
type = "fixed",
fixed = {
{-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.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698},
{-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.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116},
{-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.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125},
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125},
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "computer:monitor_on";
minetest.set_node(pos, node);
nodeupdate(pos)
node.name = "computer:monitor_on";
minetest.set_node(pos, node);
nodeupdate(pos)
end
})
@ -305,10 +305,10 @@ minetest.register_node("computer:router", {
node_box = {
type = "fixed",
fixed = {
{-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.125, -0.4375, 0.3125, 0.1875, -0.1875, 0.375},
{-0.0625, -0.4375, 0.3125, 0.0625, -0.25, 0.375},
{-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.125, -0.4375, 0.3125, 0.1875, -0.1875, 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", {
description = "Computer Tower",
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",
paramtype2 = "facedir",
walkable = true,
@ -328,22 +328,22 @@ minetest.register_node("computer:tower_on", {
node_box = {
type = "fixed",
fixed = {
{-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.247641, -0.353774, 0.1875, 0.3125, 0.1875},
{-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.247641, -0.353774, 0.1875, 0.3125, 0.1875},
},
},
selection_box = {
type = "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',
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "computer:tower";
minetest.set_node(pos, node);
nodeupdate(pos)
node.name = "computer:tower";
minetest.set_node(pos, node);
nodeupdate(pos)
end
})
@ -361,21 +361,21 @@ minetest.register_node("computer:tower", {
node_box = {
type = "fixed",
fixed = {
{-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.247641, -0.353774, 0.1875, 0.3125, 0.1875},
{-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.247641, -0.353774, 0.1875, 0.3125, 0.1875},
},
},
selection_box = {
type = "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)
node.name = "computer:tower_on";
minetest.set_node(pos, node);
nodeupdate(pos)
node.name = "computer:tower_on";
minetest.set_node(pos, node);
nodeupdate(pos)
end
})
@ -395,89 +395,89 @@ minetest.register_node("computer:printer", {
type = "fixed",
fixed = {
{-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.25, -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.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.481132, -0.3125, 0.25, -0.4375, 0},
{-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.25, -0.5, -0.125, 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.25, -0.25, 0.4375, 0.25, 0.0625, 0.5},
{-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0},
},
},
})
--Rack Server
minetest.register_node("computer:server", {
drawtype = "nodebox",
description = "Rack Server",
tiles = {
'computer_server_t.png',
'computer_server_bt.png',
'computer_server_l.png',
'computer_server_r.png',
'computer_server_bt.png',
'computer_server_f_off.png'
},
inventory_image = "computer_server_inv.png",
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
groups = {snappy=3},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
sounds = default.node_sound_wood_defaults(),
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "computer:server_on";
minetest.set_node(pos, node);
nodeupdate(pos)
drawtype = "nodebox",
description = "Rack Server",
tiles = {
'computer_server_t.png',
'computer_server_bt.png',
'computer_server_l.png',
'computer_server_r.png',
'computer_server_bt.png',
'computer_server_f_off.png'
},
inventory_image = "computer_server_inv.png",
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
groups = {snappy=3},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
sounds = default.node_sound_wood_defaults(),
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "computer:server_on";
minetest.set_node(pos, node);
nodeupdate(pos)
end,
on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.above
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then
minetest.chat_send_player( placer:get_player_name(), "Not enough vertical space to place a server!" )
return
end
return minetest.item_place(itemstack, placer, pointed_thing)
end
on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.above
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then
minetest.chat_send_player( placer:get_player_name(), "Not enough vertical space to place a server!" )
return
end
return minetest.item_place(itemstack, placer, pointed_thing)
end
})
minetest.register_node("computer:server_on", {
drawtype = "nodebox",
description = "Rack Server",
tiles = {
'computer_server_t.png',
'computer_server_bt.png',
'computer_server_r.png',
'computer_server_l.png',
'computer_server_bt.png',
'computer_server_f_on.png',
},
inventory_image = "computer_server_inv.png",
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
groups = {snappy=3,not_in_creative_inventory=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox",
description = "Rack Server",
tiles = {
'computer_server_t.png',
'computer_server_bt.png',
'computer_server_r.png',
'computer_server_l.png',
'computer_server_bt.png',
'computer_server_f_on.png',
},
inventory_image = "computer_server_inv.png",
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
groups = {snappy=3,not_in_creative_inventory=1},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375},
},
sounds = default.node_sound_wood_defaults(),
drop = 'computer:server',
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "computer:server";
minetest.set_node(pos, node);
nodeupdate(pos)
end
node.name = "computer:server";
minetest.set_node(pos, node);
nodeupdate(pos)
end
})

View File

@ -2,99 +2,99 @@
computer = { };
computer.register = function ( name, def )
local nodename = name;
if (name:sub(1, 1) == ":") then name = name:sub(2); end
local modname, basename = name:match("^([^:]+):(.*)");
local TEXPFX = modname.."_"..basename.."_";
local ONSTATE = modname..":"..basename;
local OFFSTATE = modname..":"..basename.."_off";
local def = def;
minetest.register_node(ONSTATE, {
drawtype = "nodebox";
paramtype = "light";
paramtype2 = "facedir";
description = def.description;
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2 };
tiles = {
TEXPFX.."tp.png",
TEXPFX.."bt.png",
TEXPFX.."rt.png",
TEXPFX.."lt.png",
TEXPFX.."bk.png",
TEXPFX.."ft.png",
};
node_box = def.node_box;
selection_box = def.node_box;
on_rightclick = function ( pos, node, clicker, itemstack)
if (def.on_turn_off) then
if (def.on_turn_off(pos, node, clicker, itemstack)) then return; end
end
node.name = OFFSTATE;
minetest.set_node(pos, node);
nodeupdate(pos);
end;
});
minetest.register_node(OFFSTATE, {
drawtype = "nodebox";
paramtype = "light";
paramtype2 = "facedir";
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2,
not_in_creative_inventory=1 };
tiles = {
(TEXPFX.."tp"..(def.tiles_off.top 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.."lt"..(def.tiles_off.left and "_off" or "")..".png"),
(TEXPFX.."bk"..(def.tiles_off.back and "_off" or "")..".png"),
(TEXPFX.."ft"..(def.tiles_off.front and "_off" or "")..".png"),
};
node_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)
if (def.on_turn_on) then
if (def.on_turn_on(pos, node, clicker, itemstack)) then return; end
end
node.name = ONSTATE;
minetest.set_node(pos, node);
nodeupdate(pos);
end;
drop = ONSTATE;
});
local nodename = name;
if (name:sub(1, 1) == ":") then name = name:sub(2); end
local modname, basename = name:match("^([^:]+):(.*)");
local TEXPFX = modname.."_"..basename.."_";
local ONSTATE = modname..":"..basename;
local OFFSTATE = modname..":"..basename.."_off";
local def = def;
minetest.register_node(ONSTATE, {
drawtype = "nodebox";
paramtype = "light";
paramtype2 = "facedir";
description = def.description;
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2 };
tiles = {
TEXPFX.."tp.png",
TEXPFX.."bt.png",
TEXPFX.."rt.png",
TEXPFX.."lt.png",
TEXPFX.."bk.png",
TEXPFX.."ft.png",
};
node_box = def.node_box;
selection_box = def.node_box;
on_rightclick = function ( pos, node, clicker, itemstack)
if (def.on_turn_off) then
if (def.on_turn_off(pos, node, clicker, itemstack)) then return; end
end
node.name = OFFSTATE;
minetest.set_node(pos, node);
nodeupdate(pos);
end;
});
minetest.register_node(OFFSTATE, {
drawtype = "nodebox";
paramtype = "light";
paramtype2 = "facedir";
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2,
not_in_creative_inventory=1 };
tiles = {
(TEXPFX.."tp"..(def.tiles_off.top 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.."lt"..(def.tiles_off.left and "_off" or "")..".png"),
(TEXPFX.."bk"..(def.tiles_off.back and "_off" or "")..".png"),
(TEXPFX.."ft"..(def.tiles_off.front and "_off" or "")..".png"),
};
node_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)
if (def.on_turn_on) then
if (def.on_turn_on(pos, node, clicker, itemstack)) then return; end
end
node.name = ONSTATE;
minetest.set_node(pos, node);
nodeupdate(pos);
end;
drop = ONSTATE;
});
end
computer.register_handheld = function ( name, def )
local nodename = name;
if (name:sub(1, 1) == ":") then name = name:sub(2); end
local modname, basename = name:match("^([^:]+):(.*)");
local TEXPFX = modname.."_"..basename.."_inv";
local ONSTATE = modname..":"..basename;
local OFFSTATE = modname..":"..basename.."_off";
local on_use = def.on_use;
minetest.register_craftitem(ONSTATE, {
description = def.description;
inventory_image = TEXPFX..".png";
wield_image = TEXPFX..".png";
});
local nodename = name;
if (name:sub(1, 1) == ":") then name = name:sub(2); end
local modname, basename = name:match("^([^:]+):(.*)");
local TEXPFX = modname.."_"..basename.."_inv";
local ONSTATE = modname..":"..basename;
local OFFSTATE = modname..":"..basename.."_off";
local on_use = def.on_use;
minetest.register_craftitem(ONSTATE, {
description = def.description;
inventory_image = TEXPFX..".png";
wield_image = TEXPFX..".png";
});
end
computer.pixelnodebox = function ( size, boxes )
local fixed = { };
local i, box;
for i, box in ipairs(boxes) do
local x, y, z, w, h, l = unpack(box);
fixed[#fixed + 1] = {
(x / size) - 0.5,
(y / size) - 0.5,
(z / size) - 0.5,
((x + w) / size) - 0.5,
((y + h) / size) - 0.5,
((z + l) / size) - 0.5,
};
end
return {
type = "fixed";
fixed = fixed;
};
local fixed = { };
local i, box;
for i, box in ipairs(boxes) do
local x, y, z, w, h, l = unpack(box);
fixed[#fixed + 1] = {
(x / size) - 0.5,
(y / size) - 0.5,
(z / size) - 0.5,
((x + w) / size) - 0.5,
((y + h) / size) - 0.5,
((z + l) / size) - 0.5,
};
end
return {
type = "fixed";
fixed = fixed;
};
end
local MODPATH = minetest.get_modpath("computer");

View File

@ -14,63 +14,63 @@ end
if (not minetest.get_modpath("homedecor")) then
minetest.register_craftitem(":homedecor:plastic_sheeting", {
description = S("Plastic sheet"),
inventory_image = "homedecor_plastic_sheeting.png",
})
minetest.register_craftitem(":homedecor:plastic_sheeting", {
description = S("Plastic sheet"),
inventory_image = "homedecor_plastic_sheeting.png",
})
minetest.register_craftitem(":homedecor:plastic_base", {
description = S("Unprocessed Plastic base"),
wield_image = "homedecor_plastic_base.png",
inventory_image = "homedecor_plastic_base_inv.png",
})
minetest.register_craftitem(":homedecor:plastic_base", {
description = S("Unprocessed Plastic base"),
wield_image = "homedecor_plastic_base.png",
inventory_image = "homedecor_plastic_base_inv.png",
})
minetest.register_craft({
type = "shapeless",
output = 'homedecor:plastic_base 6',
recipe = { "default:junglegrass",
"default:junglegrass",
"default:junglegrass"
}
})
minetest.register_craft({
type = "shapeless",
output = 'homedecor:plastic_base 3',
recipe = { "default:dry_shrub",
"default:dry_shrub",
"default:dry_shrub"
},
})
minetest.register_craft({
type = "shapeless",
output = 'homedecor:plastic_base 4',
recipe = { "default:leaves",
"default:leaves",
"default:leaves",
"default:leaves",
"default:leaves",
"default:leaves"
}
})
minetest.register_craft({
type = "cooking",
output = "homedecor:plastic_sheeting",
recipe = "homedecor:plastic_base",
})
minetest.register_craft({
type = 'fuel',
recipe = 'homedecor:plastic_base',
burntime = 30,
})
minetest.register_craft({
type = 'fuel',
recipe = 'homedecor:plastic_sheeting',
burntime = 30,
})
minetest.register_craft({
type = "shapeless",
output = 'homedecor:plastic_base 6',
recipe = { "default:junglegrass",
"default:junglegrass",
"default:junglegrass"
}
})
minetest.register_craft({
type = "shapeless",
output = 'homedecor:plastic_base 3',
recipe = { "default:dry_shrub",
"default:dry_shrub",
"default:dry_shrub"
},
})
minetest.register_craft({
type = "shapeless",
output = 'homedecor:plastic_base 4',
recipe = { "default:leaves",
"default:leaves",
"default:leaves",
"default:leaves",
"default:leaves",
"default:leaves"
}
})
minetest.register_craft({
type = "cooking",
output = "homedecor:plastic_sheeting",
recipe = "homedecor:plastic_base",
})
minetest.register_craft({
type = 'fuel',
recipe = 'homedecor:plastic_base',
burntime = 30,
})
minetest.register_craft({
type = 'fuel',
recipe = 'homedecor:plastic_sheeting',
burntime = 30,
})
end -- not homedecor

View File

@ -3,132 +3,132 @@
-- License is WTFPL (see README.txt).
minetest.register_craft({
output = "computer:shefriendSOO";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
};
output = "computer:shefriendSOO";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:slaystation";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
};
output = "computer:slaystation";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:vanio";
recipe = {
{ "homedecor:plastic_sheeting", "", "", },
{ "default:glass", "", "" },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
};
output = "computer:vanio";
recipe = {
{ "homedecor:plastic_sheeting", "", "", },
{ "default:glass", "", "" },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:specter";
recipe = {
{ "", "", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
};
output = "computer:specter";
recipe = {
{ "", "", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:slaystation2";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
};
output = "computer:slaystation2";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:admiral64";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "default:wood", "default:wood", "default:wood", },
};
output = "computer:admiral64";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "default:wood", "default:wood", "default:wood", },
};
});
minetest.register_craft({
output = "computer:admiral128";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
};
output = "computer:admiral128";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
};
});
minetest.register_craft({
output = "computer:wee";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:copper_ingot", "homedecor:plastic_sheeting", },
};
output = "computer:wee";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:copper_ingot", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:piepad";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
};
output = "computer:piepad";
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
};
});
--new stuff
minetest.register_craft({
output = "computer:monitor";
recipe = {
{ "homedecor:plastic_sheeting", "default:glass","", },
{ "homedecor:plastic_sheeting", "default:glass","", },
{ "homedecor:plastic_sheeting", "default:mese_crystal_fragment", "homedecor:plastic_sheeting", },
};
output = "computer:monitor";
recipe = {
{ "homedecor:plastic_sheeting", "default:glass","", },
{ "homedecor:plastic_sheeting", "default:glass","", },
{ "homedecor:plastic_sheeting", "default:mese_crystal_fragment", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:router";
recipe = {
{ "default:steel_ingot","","", },
{ "default:steel_ingot" ,"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "default:mese_crystal_fragment","homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
};
output = "computer:router";
recipe = {
{ "default:steel_ingot","","", },
{ "default:steel_ingot" ,"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
{ "default:mese_crystal_fragment","homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:tower";
recipe = {
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
};
output = "computer:tower";
recipe = {
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:printer";
recipe = {
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:coal_lump", "homedecor:plastic_sheeting", },
};
output = "computer:printer";
recipe = {
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "default:coal_lump", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:printer";
recipe = {
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "dye:black", "homedecor:plastic_sheeting", },
};
output = "computer:printer";
recipe = {
{ "homedecor:plastic_sheeting", "default:steel_ingot","", },
{ "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", },
{ "homedecor:plastic_sheeting", "dye:black", "homedecor:plastic_sheeting", },
};
});
minetest.register_craft({
output = "computer:server";
recipe = {
{ "computer:tower", "computer:tower", "computer:tower", },
{ "computer:tower", "computer:tower", "computer:tower", },
{ "computer:tower", "computer:tower", "computer:tower", },
};
output = "computer:server";
recipe = {
{ "computer:tower", "computer:tower", "computer:tower", },
{ "computer:tower", "computer:tower", "computer:tower", },
{ "computer:tower", "computer:tower", "computer:tower", },
};
});

View File

@ -1,37 +1,37 @@
--[[
The 'Fake-Fire' mod was originally created by Semmett9.
URL to the 'Fake-Fire' thread on Minetest.net:
http://forum.minetest.net/viewtopic.php?id=6145
I've customized it a bit. Please see the changelog.txt file for more details.
~ LazyJ, 2014_03_15
--]]
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/abms.lua")
--[[
The lines below, at the end, are from the original author, Semmett9.
Thanks for a nice mod, Semmett9. ;)
~ LazyJ, 2014_03_14
--]]
-- Thanks-
-- Many thanks for addi for his help in coding. --
-- 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. --
--[[
The 'Fake-Fire' mod was originally created by Semmett9.
URL to the 'Fake-Fire' thread on Minetest.net:
http://forum.minetest.net/viewtopic.php?id=6145
I've customized it a bit. Please see the changelog.txt file for more details.
~ LazyJ, 2014_03_15
--]]
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/abms.lua")
--[[
The lines below, at the end, are from the original author, Semmett9.
Thanks for a nice mod, Semmett9. ;)
~ LazyJ, 2014_03_14
--]]
-- Thanks-
-- Many thanks for addi for his help in coding. --
-- 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. --

View File

@ -88,7 +88,7 @@ minetest.register_node("homedecor:desk_fan", {
speedy_meta:set_string("active", "no")
print (speedy_meta:get_string("active"))
end
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)
local entity_remove = minetest.get_objects_inside_radius(pos, 0.1)

View File

@ -119,23 +119,23 @@ function homedecor.rotate_cobweb(pos)
-- 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)
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})
-- 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)
or (iswall_xp and iswall_zp and not iswall_xm and not iswall_zm) then
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
minetest.set_node(pos, {name = "homedecor:cobweb_corner", param2 = 0})
-- 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})
-- 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})
-- 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
minetest.set_node(pos, {name = "homedecor:cobweb_flat", param2 = 0})
-- if all else fails, place the plantlike version as a fallback.
else

View File

@ -406,7 +406,7 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:glass_table_large_b 2",
recipe = {
recipe = {
{ "homedecor:glass_table_small_square", "homedecor:glass_table_small_square" },
}
})
@ -424,14 +424,14 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:wood_table_small_square_b 2",
recipe = {
recipe = {
{ "homedecor:wood_table_small_round","homedecor:wood_table_small_round" },
}
})
minetest.register_craft( {
output = "homedecor:wood_table_large_b 2",
recipe = {
recipe = {
{ "homedecor:wood_table_small_square", "homedecor:wood_table_small_square" },
}
})
@ -495,7 +495,7 @@ minetest.register_craft({
minetest.register_craft( {
output = "homedecor:skylight 4",
recipe = {
recipe = {
{ "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( {
output = "homedecor:door_woodglass_bottom_left",
@ -2370,7 +2370,7 @@ minetest.register_craft( {
-- bathroom/kitchen tiles
local color_pairings = {
local color_pairings = {
{ "grey", "white", "1" },
{ "dark_grey", "white", "2" },
{ "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"
},
})
@ -2928,7 +2928,7 @@ minetest.register_craft({
"homedecor:bottle_green",
"homedecor:bottle_green",
"homedecor:bottle_green",
"homedecor:bottle_green"
"homedecor:bottle_green"
},
})

View File

@ -22,7 +22,7 @@ homedecor.door_models = {
{ -8/16, -8/16, 6/16, -6/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, 8/32, 13/32, 8/16, 9/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 },
{ 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, 8/32, 13/32, 8/16, 9/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 },
{ 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, 8/32, 13/32, 8/16, 9/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 },
{ 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, 8/32, 13/32, 8/16, 9/32, 15/32 },
{ -8/16, 6/32, 13/32, 8/16, 7/32, 15/32 },

View File

@ -21,8 +21,8 @@ local function countSolids(pos,node,level)
for x = -1, 1 do
for z = -1, 1 do
local y = 0
if node.param2 == 5 then
y = -level
if node.param2 == 5 then
y = -level
else
y = level
end
@ -89,9 +89,9 @@ local function calculateClosed(pos)
return true
end
end
return false
return false
else
-- direction == 3 or 4
-- direction == 3 or 4
if isSolid(pos,{-1,0,0}) and isSolid(pos,{1,0,0}) then
if string.find(node.name,'_bottom_') then
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}
if side == "left" then
if side == "left" then
dgroups = {snappy=3}
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 }},
{{ 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
{ 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
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
minetest.chat_send_player( placer:get_player_name(), S('Not enough space above that spot to place a door!') )
else
@ -598,7 +598,7 @@ minetest.register_node("homedecor:japanese_wall_top", {
},
selection_box = {
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 = {
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 = {
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 },
node_box = {
type = "fixed",
fixed = {
fixed = {
{-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.44, -0.5, 0, 0.5, 0.5, 0.0625}, -- NodeBox3
@ -724,7 +724,7 @@ minetest.register_node("homedecor:jpn_door_bottom", {
},
selection_box = {
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)
@ -768,7 +768,7 @@ minetest.register_node("homedecor:jpn_door_top", {
groups = { snappy = 3, not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
fixed = {
{-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.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 },
node_box = {
type = "fixed",
fixed = {
fixed = {
{-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
{-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 },
node_box = {
type = "fixed",
fixed = {
fixed = {
{-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
{-0.5625, -0.5, -0.0625, -0.5, 0.5, 0}, -- NodeBox3

View File

@ -280,7 +280,7 @@ minetest.register_node("homedecor:fence_privacy_corner", {
fixed = {
{ -0.5, -0.5, 5/16, 0.5, 0.5, 0.5 },
{ -0.5, -0.5, -0.5, -5/16, 0.5, 5/16 },
}
}
},
node_box = {
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
{ 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
}
}
},
})
@ -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
{ -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, -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
}
}
},
})
@ -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
{ -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
}
}
},
})

View File

@ -263,13 +263,13 @@ function homedecor.register_furnace(name, furnacedef)
local srclist = inv:get_list("src")
local cooked = nil
local aftercooked
if srclist then
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
end
local was_active = false
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
was_active = true
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 fuellist = inv:get_list("fuel")
local srclist = inv:get_list("src")
if srclist then
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
end

View File

@ -34,7 +34,7 @@ for _, i in ipairs(table_colors) do
},
},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
})
})
end
local chaircolors = {
@ -52,7 +52,7 @@ for i in ipairs(chaircolors) do
local color = "_"..chaircolors[i][1]
local color2 = chaircolors[i][1]
local name = S(chaircolors[i][2])
local chairtiles = {
local chairtiles = {
"forniture_kitchen_chair_top"..color..".png",
"forniture_wood.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_front"..color..".png",
}
if chaircolors[i][1] == "" then
if chaircolors[i][1] == "" then
color = ""
chairtiles = { "forniture_wood.png" }
end
@ -89,7 +89,7 @@ for i in ipairs(chaircolors) do
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
})
if color ~= "" then
if color ~= "" then
minetest.register_node("homedecor:armchair"..color, {
description = S("Armchair (%s)"):format(name),
tiles = { "forniture_armchair_top"..color..".png" },
@ -197,7 +197,7 @@ local function unextend_bed(pos, color)
end
for _, color in ipairs(bedcolors) do
minetest.register_node("homedecor:bed_"..color.."_head", {
tiles = {
"homedecor_bed_"..color.."_top1.png",
@ -262,12 +262,12 @@ for _, color in ipairs(bedcolors) do
on_construct = function(pos)
bed_extension(pos, color)
end,
on_place = function(itemstack, placer, pointed_thing)
return homedecor.stack_sideways(itemstack, placer, pointed_thing,
"homedecor:bed_"..color.."_foot", "homedecor:bed_"..color.."_head", false)
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local fdir = oldnode.param2
if not fdir or fdir > 3 then return end
@ -278,7 +278,7 @@ for _, color in ipairs(bedcolors) do
unextend_bed(pos, color)
end
})
minetest.register_node("homedecor:bed_"..color.."_footext", {
tiles = {
"homedecor_bed_"..color.."_top2.png",
@ -317,7 +317,7 @@ for _, color in ipairs(bedcolors) do
end,
drop = "homedecor:bed_"..color.."_foot"
})
end
minetest.register_node("homedecor:wardrobe_top", {

View File

@ -114,7 +114,7 @@ minetest.register_node("homedecor:chains", {
fixed = {-1/2, -1/2, 1/4, 1/2, 1/2, 1/2},
},
groups = {cracky=1},
})
})
minetest.register_node("homedecor:torch_wall", {
description = S("Wall Torch"),

View File

@ -4,7 +4,7 @@
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
-- 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.
homedecor = {}
@ -57,7 +57,7 @@ function homedecor.table_copy(t)
return nt
end
--
--
function homedecor.get_nodedef_field(nodename, fieldname)
if not minetest.registered_nodes[nodename] then

View File

@ -64,7 +64,7 @@ for _, mat in ipairs(counter_materials) do
})
end
minetest.register_node('homedecor:kitchen_cabinet_half', {
minetest.register_node('homedecor:kitchen_cabinet_half', {
drawtype="nodebox",
description = S('Half-height Kitchen Cabinet (on ceiling)'),
tiles = { 'homedecor_kitchen_cabinet_sides.png',

View File

@ -278,17 +278,17 @@ minetest.register_node('homedecor:candle', {
},
node_box = {
type = "fixed",
fixed = {
fixed = {
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125 },
{ -0.125, 0, 0, 0.125, 0.5, 0 },
{ 0, 0, -0.125, 0, 0.5, 0.125 }
}
}
},
selection_box = {
type = "fixed",
fixed = {
fixed = {
{ -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 },
}
}
},
sunlight_propagates = true,
paramtype = "light",
@ -308,9 +308,9 @@ minetest.register_node('homedecor:candle_thin', {
},
selection_box = {
type = "fixed",
fixed = {
fixed = {
{ -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 },
}
}
},
sunlight_propagates = true,
paramtype = "light",
@ -331,9 +331,9 @@ minetest.register_node('homedecor:oil_lamp', {
walkable = true,
selection_box = {
type = "fixed",
fixed = {
fixed = {
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
}
}
},
groups = { snappy = 3 },
light_source = LIGHT_MAX-4,
@ -351,9 +351,9 @@ minetest.register_node('homedecor:wall_lantern', {
walkable = true,
selection_box = {
type = "fixed",
fixed = {
fixed = {
{ -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
}
}
},
groups = { snappy = 3 },
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")
-- for old maps that had 3dfornit`ure
if lampcolor == "" then
if lampcolor == "" then
minetest.register_alias("3dforniture:table_lamp_"..suffix, "homedecor:table_lamp_"..suffix)
end
end

View File

@ -162,7 +162,7 @@ minetest.register_node("homedecor:toilet_paper", {
inventory_image = "homedecor_toilet_paper_inv.png",
paramtype = "light",
paramtype2 = "facedir",
selection_box = {
selection_box = {
type = "fixed",
fixed = { -0.1875, 0.125, 0.0625, 0.25, 0.4375, 0.5 }
},

View File

@ -143,7 +143,7 @@ minetest.register_node("homedecor:pole_brass", {
sounds = default.node_sound_wood_defaults(),
walkable = true,
})
minetest.register_node("homedecor:pole_wrought_iron", {
description = S("Wrought Iron Pole"),
drawtype = "nodebox",
@ -967,7 +967,7 @@ minetest.register_node("homedecor:doorbell", {
pos = pos,
gain = 1.0,
max_hear_distance = 15
})
})
end
})
@ -1421,7 +1421,7 @@ minetest.register_node("homedecor:sportbench", {
tiles = {
"homedecor_sportbench_top.png",
"wool_black.png",
"homedecor_sportbench_left.png^[transformFX",
"homedecor_sportbench_left.png^[transformFX",
"homedecor_sportbench_left.png",
"homedecor_sportbench_bottom.png",
"homedecor_sportbench_front.png"
@ -1526,7 +1526,7 @@ minetest.register_node("homedecor:paper_towel", {
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy=3 },
selection_box = {
selection_box = {
type = "fixed",
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 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
wielditem:take_item()
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_front.png"
},
inventory_image = "homedecor_tool_cabinet_inv.png",

View File

@ -68,7 +68,7 @@ for i in ipairs(materials) do
minetest.register_node('homedecor:'..m..'_table_large', {
description = S(d.." Table Piece (large)"),
drawtype = 'nodebox',
tiles = {
tiles = {
'homedecor_'..m..'_table_large_tb.png',
'homedecor_'..m..'_table_large_tb.png',
'homedecor_'..m..'_table_large_edges.png',

View File

@ -184,7 +184,7 @@ for c in ipairs(curtaincolors) do
-- Open the curtains
on_rightclick = function(pos, node, clicker, itemstack)
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
minetest.set_node(pos, { name = "homedecor:curtain_open_"..color, param2 = fdir })
end
@ -211,7 +211,7 @@ for c in ipairs(curtaincolors) do
-- Close the curtains
on_rightclick = function(pos, node, clicker, itemstack)
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
minetest.set_node(pos, { name = "homedecor:curtain_"..color, param2 = fdir })
end

View File

@ -6,86 +6,86 @@ TODO
]]
minetest.register_craft({
output ="inbox:empty",
recipe = {
{"","default:steel_ingot",""},
{"default:steel_ingot","","default:steel_ingot"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
}
output ="inbox:empty",
recipe = {
{"","default:steel_ingot",""},
{"default:steel_ingot","","default:steel_ingot"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
}
})
minetest.register_node("inbox:empty", {
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-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, -4/12, 4/12, 5/12, -2/12},
{3/12, 3/12, -2/12, 4/12, 5/12, 0/12}
}
},
description = "Mailbox",
tiles = {"inbox_top.png", "inbox_bottom.png", "inbox_east.png",
"inbox_west.png", "inbox_back.png", "inbox_front.png"},
paramtype2 = "facedir",
groups = {choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos)
local owner = placer:get_player_name()
meta:set_string("owner", owner)
meta:set_string("infotext", owner.."'s Mailbox")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
inv:set_size("drop", 1)
end,
on_rightclick = function(pos, node, clicker, itemstack)
local meta = minetest.get_meta(pos)
local player = clicker:get_player_name()
local owner = meta:get_string("owner")
local meta = minetest.get_meta(pos)
if owner == player then
minetest.show_formspec(
clicker:get_player_name(),
"default:chest_locked",
inbox.get_inbox_formspec(pos))
else
minetest.show_formspec(
clicker:get_player_name(),
"default:chest_locked",
inbox.get_inbox_insert_formspec(pos))
end
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local owner = meta:get_string("owner")
local inv = meta:get_inventory()
return player:get_player_name() == owner and inv:is_empty("main")
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if listname == "drop" and inv:room_for_item("main", stack) then
inv:remove_item("drop", stack)
inv:add_item("main", stack)
end
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if listname == "main" then
return 0
end
if listname == "drop" then
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if inv:room_for_item("main", stack) then
return -1
else
return 0
end
end
end,
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-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, -4/12, 4/12, 5/12, -2/12},
{3/12, 3/12, -2/12, 4/12, 5/12, 0/12}
}
},
description = "Mailbox",
tiles = {"inbox_top.png", "inbox_bottom.png", "inbox_east.png",
"inbox_west.png", "inbox_back.png", "inbox_front.png"},
paramtype2 = "facedir",
groups = {choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos)
local owner = placer:get_player_name()
meta:set_string("owner", owner)
meta:set_string("infotext", owner.."'s Mailbox")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
inv:set_size("drop", 1)
end,
on_rightclick = function(pos, node, clicker, itemstack)
local meta = minetest.get_meta(pos)
local player = clicker:get_player_name()
local owner = meta:get_string("owner")
local meta = minetest.get_meta(pos)
if owner == player then
minetest.show_formspec(
clicker:get_player_name(),
"default:chest_locked",
inbox.get_inbox_formspec(pos))
else
minetest.show_formspec(
clicker:get_player_name(),
"default:chest_locked",
inbox.get_inbox_insert_formspec(pos))
end
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local owner = meta:get_string("owner")
local inv = meta:get_inventory()
return player:get_player_name() == owner and inv:is_empty("main")
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if listname == "drop" and inv:room_for_item("main", stack) then
inv:remove_item("drop", stack)
inv:add_item("main", stack)
end
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if listname == "main" then
return 0
end
if listname == "drop" then
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if inv:room_for_item("main", stack) then
return -1
else
return 0
end
end
end,
})
function inbox.get_inbox_formspec(pos)

View File

@ -133,7 +133,7 @@ minetest.register_node("itemframes:frame",{
end
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos)
return player:get_player_name() == meta:get_string("owner")
end,
@ -178,7 +178,7 @@ minetest.register_node("itemframes:pedestal",{
end
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos)
return player:get_player_name() == meta:get_string("owner")
end,

View File

@ -1,6 +1,6 @@
local armchairs_list = {
{ "Red Armchair", "red"},
{ "Orange Armchair", "orange"},
{ "Orange Armchair", "orange"},
{ "Yellow Armchair", "yellow"},
{ "Green Armchair", "green"},
{ "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.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
--base/cushion
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
--back
{-0.5, 0, 0.3125, 0.5, 0.5, 0.5},
--arms
{-0.5, 0, -0.5, -0.3125, 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)
end
})
minetest.register_craft({
output = "lrfurn:armchair_"..colour,
recipe = {
@ -68,7 +68,7 @@ for i in ipairs(armchairs_list) do
{"group:stick", "", "", }
}
})
minetest.register_craft({
output = "lrfurn:armchair_"..colour,
recipe = {

View File

@ -13,9 +13,9 @@ minetest.register_node("lrfurn:coffeetable_back", {
--legs
{-0.375, -0.5, -0.375, -0.3125, -0.0625, -0.3125},
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
--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 = {
@ -42,7 +42,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
minetest.set_node(pos, node)
end
end,
on_destruct = function(pos)
local node = minetest.get_node(pos)
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}).param2 == param2 ) then
minetest.remove_node(pos)
end
end
end
end,
})
@ -76,7 +76,7 @@ minetest.register_node("lrfurn:coffeetable_front", {
--legs
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
--tabletop
{-0.4375, -0.0625, -0.5, 0.4375, 0, 0.4375},
}

View File

@ -15,9 +15,9 @@ minetest.register_node("lrfurn:endtable", {
{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.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
--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 = {

View File

@ -1,6 +1,6 @@
local longsofas_list = {
{ "Red Long Sofa", "red"},
{ "Orange Long Sofa", "orange"},
{ "Orange Long Sofa", "orange"},
{ "Yellow Long Sofa", "yellow"},
{ "Green Long Sofa", "green"},
{ "Blue Long Sofa", "blue"},
@ -29,13 +29,13 @@ for i in ipairs(longsofas_list) do
--legs
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
--base/cushion
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
--back
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
--arm
{-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,
on_destruct = function(pos)
local node = minetest.get_node(pos)
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}).param2 == param2 ) then
minetest.remove_node(pos)
end
end
end
end
end
end
end,
on_rightclick = function(pos, node, clicker)
if not clicker:is_player() then
return
@ -134,10 +134,10 @@ for i in ipairs(longsofas_list) do
--legs
{-0.4375, -0.5, -0.03125, -0.375, -0.375, 0.03125},
{0.375, -0.5, -0.03125, 0.4375, -0.375, 0.03125},
--base/cushion
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
--back
{-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, {
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"},
@ -163,13 +163,13 @@ for i in ipairs(longsofas_list) do
--legs
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
--base/cushion
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
--back
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
--arm
{-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_craft({
output = "lrfurn:longsofa_"..colour,
recipe = {

View File

@ -1,6 +1,6 @@
local sofas_list = {
{ "Red Sofa", "red"},
{ "Orange Sofa", "orange"},
{ "Orange Sofa", "orange"},
{ "Yellow Sofa", "yellow"},
{ "Green Sofa", "green"},
{ "Blue Sofa", "blue"},
@ -29,13 +29,13 @@ for i in ipairs(sofas_list) do
--legs
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
--base/cushion
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
--back
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
--arm
{-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)
end
end,
on_destruct = function(pos)
local node = minetest.get_node(pos)
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}).param2 == param2 ) then
minetest.remove_node(pos)
end
end
end
end,
on_rightclick = function(pos, node, clicker)
if not clicker:is_player() then
return
@ -93,7 +93,7 @@ for i in ipairs(sofas_list) do
clicker:set_hp(20)
end
})
minetest.register_node("lrfurn:sofa_left_"..colour, {
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"},
@ -107,13 +107,13 @@ for i in ipairs(sofas_list) do
--legs
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
--base/cushion
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
--back
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
--arm
{-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_craft({

View File

@ -209,7 +209,7 @@ minetest.register_node("plasmascreen:screen5", {
fixed = {-1.5050, -0.3125, 0.3700, 1.5050, 1.5050, 0.5050}
},
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
after_place_node = function(pos,placer,itemstack)
local param2 = minetest.get_node(pos).param2
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,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
if oldnode.param2 == 0 then
pos.x = pos.x-1

View File

@ -382,7 +382,7 @@ local function make_line_texture(line, lineno)
else
maxw = math_max(width, maxw)
end
if #chars < MAX_INPUT_CHARS then
if #chars < MAX_INPUT_CHARS then
table.insert(chars, {
off=ch_offs,
tex=FONT_FMT_SIMPLE:format(c:byte()),