Cleaning cg72's code

This commit is contained in:
jp 2015-01-20 12:13:45 +01:00
parent 3c765e3de7
commit f136b92018
2 changed files with 84 additions and 242 deletions

View File

@ -1,7 +1,5 @@
-- Amiga 500 lookalike -- Amiga 500 lookalike
-- Fun fact: "Amiga" is spanish for "female friend" ("Amigo" is for male);
-- that's why this computer was named "She Friend".
computer.register("computer:shefriendSOO", { computer.register("computer:shefriendSOO", {
description = "SheFriendSOO"; description = "SheFriendSOO";
tiles_off = { front=true; }; tiles_off = { front=true; };
@ -13,9 +11,7 @@ computer.register("computer:shefriendSOO", {
}); });
}); });
-- Some generic laptop. Sony VAIO came to mind when thinking about a name :) -- Some generic laptop
-- Fun fact: "Vanio" sounds like "baño" ("bathroom" in spanish, pronounced
-- as something like "bah-nee-oh")
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; };
@ -32,8 +28,6 @@ computer.register("computer:vanio", {
}); });
-- Sony PlayStation lookalike -- Sony PlayStation lookalike
-- Fun fact: Swapping the first letters gives valid words :)
-- Pony SureiSutteshun!!!
computer.register("computer:slaystation", { computer.register("computer:slaystation", {
description = "Pony SlayStation"; description = "Pony SlayStation";
tiles_off = { top=true; }; tiles_off = { top=true; };
@ -50,8 +44,6 @@ computer.register("computer:slaystation", {
}); });
-- Sony PlayStation 2 lookalike -- Sony PlayStation 2 lookalike
-- Fun fact: Swapping the first letters gives valid words :)
-- Pony SureiSutteshun!!!
computer.register("computer:slaystation2", { computer.register("computer:slaystation2", {
description = "Pony SlayStation 2"; description = "Pony SlayStation 2";
tiles_off = { front=true; }; tiles_off = { front=true; };
@ -79,7 +71,7 @@ computer.register("computer:specter", {
}); });
}); });
-- 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; };
@ -90,7 +82,7 @@ computer.register("computer:wee", {
}); });
}); });
-- 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",
@ -131,22 +123,19 @@ computer.register("computer:admiral128", {
----------------------------added by crazyginger72------------------------------- ----------------------------added by crazyginger72-------------------------------
--------------------------------------------------------------------------------- ---------------------------------------------------------------------------------
-- Generic Flat Screen LCD (16x9) with keyboard -- Generic Flat Screen LCD (16x9) with keyboard
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
--inventory_image =
paramtype = "light", paramtype = "light",
light_source = 4, light_source = 4,
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,not_in_creative_inventory=1}, groups = {snappy=3,not_in_creative_inventory=1},
--sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -159,18 +148,7 @@ computer.register("computer:admiral128", {
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
}, },
}, },
selection_box = { drop = 'computer:monitor',
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.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
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);
@ -178,17 +156,17 @@ computer.register("computer:admiral128", {
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","computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_bios.png"}, tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
--inventory_image = "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",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,not_in_creative_inventory=1}, groups = {snappy=3,not_in_creative_inventory=1},
--sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -201,31 +179,20 @@ computer.register("computer:admiral128", {
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
}, },
}, },
selection_box = { drop = 'computer:monitor',
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.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
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","computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_loading.png"}, tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
--inventory_image = "computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_loading.png"},
paramtype = "light", paramtype = "light",
light_source = 4, light_source = 4,
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,not_in_creative_inventory=1}, groups = {snappy=3,not_in_creative_inventory=1},
--sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -238,31 +205,20 @@ computer.register("computer:admiral128", {
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
}, },
}, },
selection_box = { drop = 'computer:monitor',
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.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
drop = 'computer:monitor' ,
}) })
minetest.register_node("computer:monitor_login", { minetest.register_node("computer:monitor_login", {
description = "Monitor and keyboard", 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_login.png"}, tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
--inventory_image = "computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_login.png"},
paramtype = "light", paramtype = "light",
light_source = 4, light_source = 4,
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,not_in_creative_inventory=1}, groups = {snappy=3,not_in_creative_inventory=1},
--sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -275,31 +231,20 @@ computer.register("computer:admiral128", {
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
}, },
}, },
selection_box = { drop = 'computer:monitor',
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.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
drop = 'computer:monitor' ,
}) })
minetest.register_node("computer:monitor_desktop", { minetest.register_node("computer:monitor_desktop", {
description = "Monitor and keyboard", 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"}, tiles = {"computer_monitor_t.png","computer_monitor_bt.png","computer_monitor_l.png",
--inventory_image = "computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_desktop.png"},
paramtype = "light", paramtype = "light",
light_source = 4, light_source = 4,
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,not_in_creative_inventory=1}, groups = {snappy=3,not_in_creative_inventory=1},
--sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -312,31 +257,20 @@ computer.register("computer:admiral128", {
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
}, },
}, },
selection_box = { drop = 'computer:monitor',
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.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
drop = 'computer:monitor' ,
}) })
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","computer_monitor_r.png","computer_monitor_b.png","computer_monitor_f_off.png"}, tiles = {"computer_monitor_t_off.png","computer_monitor_bt.png","computer_monitor_l.png",
--inventory_image = "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",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {snappy=3},
--sounds = default.node_sound_dirt_defaults(), sound = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -349,39 +283,24 @@ computer.register("computer:admiral128", {
{-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
}, },
}, },
selection_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.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375},
},
},
drop = 'computer:monitor' ,
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
}) })
--WIFI Router (linksys look-a-like) --WIFI Router (linksys look-a-like)
minetest.register_node("computer:router", {
minetest.register_node("computer:router", {
description = "WIFI Router", description = "WIFI Router",
tiles = {"computer_router_t.png","computer_router_bt.png","computer_router_l.png","computer_router_r.png","computer_router_b.png",{name="computer_router_f_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}},}, --"computer_router_f.png"}, tiles = {"computer_router_t.png","computer_router_bt.png","computer_router_l.png","computer_router_r.png","computer_router_b.png",
--inventory_image = {name="computer_router_f_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}},}, --"computer_router_f.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {snappy=3},
--sounds = default.node_sound_dirt_defaults(), sound = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -392,29 +311,19 @@ computer.register("computer:admiral128", {
{-0.0625, -0.4375, 0.3125, 0.0625, -0.25, 0.375}, {-0.0625, -0.4375, 0.3125, 0.0625, -0.25, 0.375},
}, },
}, },
selection_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},
},
},
}) })
--Modern PC Tower --Modern PC Tower
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","computer_tower_r.png","computer_tower_b.png","computer_tower_f_on.png"}, tiles = {"computer_tower_t.png","computer_tower_bt.png","computer_tower_l.png",
--inventory_image = "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,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,not_in_creative_inventory=1}, groups = {snappy=3,not_in_creative_inventory=1},
--sounds = default.node_sound_dirt_defaults(), sound = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -430,25 +339,24 @@ computer.register("computer:admiral128", {
{-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
}) })
minetest.register_node("computer:tower", { minetest.register_node("computer:tower", {
description = "Computer Tower", 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_off.png"}, tiles = {"computer_tower_t.png","computer_tower_bt.png","computer_tower_l.png","computer_tower_r.png",
--inventory_image = "computer_tower_b.png","computer_tower_f_off.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {snappy=3},
--sounds = default.node_sound_dirt_defaults(), sound = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -468,21 +376,20 @@ computer.register("computer:admiral128", {
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
}) })
-- Printer/scaner combo -- Printer/scaner combo
minetest.register_node("computer:printer", { minetest.register_node("computer:printer", {
description = "Printer Scaner Combo", description = "Printer Scaner Combo",
tiles = {"computer_printer_t.png","computer_printer_bt.png","computer_printer_l.png","computer_printer_r.png","computer_printer_b.png","computer_printer_f.png"}, tiles = {"computer_printer_t.png","computer_printer_bt.png","computer_printer_l.png",
--inventory_image = "computer_printer_r.png","computer_printer_b.png","computer_printer_f.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {snappy=3},
--sounds = default.node_sound_dirt_defaults(), sound = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -497,23 +404,9 @@ minetest.register_node("computer:printer", {
{-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0}, {-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0},
}, },
}, },
selection_box = {
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},
},
},
}) })
--Rack Server --Rack Server
minetest.register_node("computer:server", { minetest.register_node("computer:server", {
drawtype = "nodebox", drawtype = "nodebox",
description = "Rack Server", description = "Rack Server",
@ -530,8 +423,7 @@ minetest.register_node("computer:server", {
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},
@ -540,13 +432,12 @@ minetest.register_node("computer:server", {
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},
}, },
--drop = 'computer:server',
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
@ -554,10 +445,7 @@ minetest.register_node("computer: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", {
@ -576,8 +464,7 @@ minetest.register_node("computer:server_on", {
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},
@ -586,15 +473,11 @@ minetest.register_node("computer:server_on", {
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
}) })

View File

@ -2,7 +2,7 @@
local S = homedecor.gettext local S = homedecor.gettext
minetest.register_node("homedecor:window_quartered", { minetest.register_node("homedecor:window_quartered", {
description = "Window", description = "Window (quartered)",
tiles = { tiles = {
"homedecor_window_sides.png", "homedecor_window_sides.png",
"homedecor_window_sides.png", "homedecor_window_sides.png",
@ -14,8 +14,8 @@ minetest.register_node("homedecor:window_quartered", {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
use_texture_alpha = true, use_texture_alpha = true,
is_ground_content = true, groups = {snappy=3},
groups = {crumbly=3}, sounds = default.node_sound_glass_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -23,26 +23,22 @@ minetest.register_node("homedecor:window_quartered", {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1 {-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2 {-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3 {-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{-0.5, 0, -0.0625, 0.5, 0.0625, 0.0625}, -- NodeBox4 {-0.5, -0.0625, -0.025, 0.5, 0.0625, 0.025}, -- NodeBox4
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5 {0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6 {-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
{0, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox7 {-0.0625, -0.5, -0.025, 0.0625, 0.5, 0.025}, -- NodeBox7
}, },
}, },
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1 {-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
},
}, },
},
}) })
minetest.register_node("homedecor:window_plain", { minetest.register_node("homedecor:window_plain", {
description = "Window", description = "Window (plain)",
tiles = { tiles = {
"homedecor_window_sides.png", "homedecor_window_sides.png",
"homedecor_window_sides.png", "homedecor_window_sides.png",
@ -54,8 +50,8 @@ minetest.register_node("homedecor:window_plain", {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
use_texture_alpha = true, use_texture_alpha = true,
is_ground_content = true, groups = {snappy=3},
groups = {crumbly=3}, sounds = default.node_sound_glass_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -63,18 +59,14 @@ minetest.register_node("homedecor:window_plain", {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1 {-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2 {-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3 {-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5 {0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox4
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6 {-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox5
}, },
}, },
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1 {-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
}, },
}, },
}) })
@ -84,10 +76,9 @@ minetest.register_node("homedecor:blinds_thick", {
tiles = { "homedecor_windowblinds.png" }, tiles = { "homedecor_windowblinds.png" },
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = false, walkable = false,
is_ground_content = true, groups = {snappy=3},
groups = {crumbly=3}, sounds = default.node_sound_glass_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -115,22 +106,7 @@ minetest.register_node("homedecor:blinds_thick", {
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
{-0.527123, 0.375, 0.3125, 0.523585, 0.5, 0.5}, -- NodeBox1 {-0.527123, -0.5, 0.25, 0.523585, 0.5, 0.5}
{-0.5, 0.304245, 0.3125, 0.5, 0.3125, 0.5}, -- NodeBox2
{-0.5, 0.244104, 0.3125, 0.5, 0.25, 0.5}, -- NodeBox3
{-0.5, 0.180424, 0.3125, 0.5, 0.1875, 0.5}, -- NodeBox4
{-0.5, 0.116745, 0.3125, 0.5, 0.125, 0.5}, -- NodeBox5
{-0.5, 0.0566037, 0.3125, 0.5, 0.0625, 0.5}, -- NodeBox6
{-0.5, -0.00707551, 0.3125, 0.5, 0, 0.5}, -- NodeBox7
{-0.5, -0.0707547, 0.3125, 0.5, -0.0625, 0.5}, -- NodeBox8
{-0.5, -0.130896, 0.3125, 0.5, -0.125, 0.5}, -- NodeBox9
{-0.5, -0.194576, 0.3125, 0.5, -0.1875, 0.5}, -- NodeBox10
{-0.5, -0.258255, 0.3125, 0.5, -0.25, 0.5}, -- NodeBox11
{-0.5, -0.318396, 0.3125, 0.5, -0.3125, 0.5}, -- NodeBox12
{-0.5, -0.5, 0.3125, 0.5, -0.4375, 0.5}, -- NodeBox13
{-0.5, -0.378538, 0.3125, 0.5, -0.375, 0.5}, -- NodeBox14
{-0.375, -0.5, 0.367925, -0.367925, 0.4375, 0.445755}, -- NodeBox15
{0.367924, -0.5, 0.367925, 0.375, 0.5, 0.445755}, -- NodeBox16
}, },
}, },
}) })
@ -140,10 +116,9 @@ minetest.register_node("homedecor:blinds_thin", {
tiles = { "homedecor_windowblinds.png" }, tiles = { "homedecor_windowblinds.png" },
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = false, walkable = false,
is_ground_content = true, groups = {snappy=3},
groups = {crumbly=3}, sounds = default.node_sound_glass_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -171,22 +146,7 @@ minetest.register_node("homedecor:blinds_thin", {
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
{-0.52, 0.375, 0.4375, 0.52, 0.5, 0.5}, -- NodeBox1 {-0.52, -0.5, 0.375, 0.52, 0.5, 0.5}
{-0.5, 0.304245, 0.4375, 0.5, 0.3125, 0.5}, -- NodeBox2
{-0.5, 0.244104, 0.4375, 0.5, 0.25, 0.5}, -- NodeBox3
{-0.5, 0.180424, 0.43755, 0.5, 0.1875, 0.5}, -- NodeBox4
{-0.5, 0.116745, 0.4375, 0.5, 0.125, 0.5}, -- NodeBox5
{-0.5, 0.0566037, 0.4375, 0.5, 0.0625, 0.5}, -- NodeBox6
{-0.5, -0.00707551, 0.4375, 0.5, 0, 0.5}, -- NodeBox7
{-0.5, -0.0707547, 0.4375, 0.5, -0.0625, 0.5}, -- NodeBox8
{-0.5, -0.130896, 0.4375, 0.5, -0.125, 0.5}, -- NodeBox9
{-0.5, -0.194576, 0.4375, 0.5, -0.1875, 0.5}, -- NodeBox10
{-0.5, -0.258255, 0.4375, 0.5, -0.25, 0.5}, -- NodeBox11
{-0.5, -0.318396, 0.4375, 0.5, -0.3125, 0.5}, -- NodeBox12
{-0.5, -0.5, 0.4375, 0.5, -0.4375, 0.5}, -- NodeBox13
{-0.5, -0.378538, 0.4375, 0.5, -0.375, 0.5}, -- NodeBox14
{-0.375, -0.49, 0.4575, -0.367925, 0.4375, 0.48}, -- NodeBox15
{0.367924, -0.49, 0.4575, 0.375, 0.49, 0.48}, -- NodeBox16
}, },
}, },
}) })
@ -311,4 +271,3 @@ minetest.register_node("homedecor:window_flowerbox", {
} }
} }
}) })