import kaeza's computer mod
38
computer/CHANGES.txt
Normal file
|
@ -0,0 +1,38 @@
|
|||
version 0.2.3:
|
||||
- Added animated router front
|
||||
- Added all crafts for new items
|
||||
|
||||
version 0.2.2:
|
||||
- Added printer
|
||||
- Added server
|
||||
|
||||
version 0.2.1:
|
||||
- Added modern tower pc
|
||||
- Added wifi router
|
||||
- Added flatscreen LCD and keyboard
|
||||
|
||||
Version 0.2.0:
|
||||
- Added recipes.
|
||||
- Partly re-written.
|
||||
- Removed original baby tower (seemed out of place).
|
||||
- You can now turn devices on and off by right-clicking.
|
||||
- Mod is now on github.
|
||||
|
||||
Version 0.1.4:
|
||||
- Added Admiral 64 & 128 (Commodore 64 & 128 lookalikes)
|
||||
|
||||
Version 0.1.3:
|
||||
- Added SX Spectre (Sinclair ZX Spectrum lookalike)
|
||||
- Added Pony SlayStation 2 (Sony PlayStation lookalike)
|
||||
- Minor fixes to textures.
|
||||
|
||||
Version 0.1.2:
|
||||
- Nodes now use the node box as selection box.
|
||||
- Added Pony SlayStation (Sony PlayStation lookalike)
|
||||
- Added Pony Vanio (Sony VAIO lookalike...err...just a generic laptop)
|
||||
|
||||
Version 0.1.1:
|
||||
- Added SheFriend SOO (Amiga 500 lookalike)
|
||||
|
||||
Version 0.1.0:
|
||||
- Initial Version only a baby tower.
|
15
computer/LICENSE.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2012 Diego Martínez <lkaezadl3@gmail.com>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
|
61
computer/README.txt
Normal file
|
@ -0,0 +1,61 @@
|
|||
|
||||
Decorative Computers Mod for Minetest
|
||||
by Diego Martínez <kaeza@users.sf.net>
|
||||
|
||||
How to install:
|
||||
Unzip the archive an place it in minetest-base-directory/mods/minetest/
|
||||
if you have a windows client or a linux run-in-place client. If you have
|
||||
a linux system-wide instalation place it in ~/.minetest/mods/minetest/.
|
||||
If you want to install this mod only in one world create the folder
|
||||
worldmods/ in your worlddirectory.
|
||||
For further information or help see:
|
||||
http://wiki.minetest.com/wiki/Installing_Mods
|
||||
|
||||
How to use the mod:
|
||||
For now just use creative mode or the `/give' or `/giveme' chat commands
|
||||
to get the items.
|
||||
|
||||
These are the items currently defined by this mod:
|
||||
|
||||
computer:printer (printer scanner combo)
|
||||
computer:server (rack server)
|
||||
computer:tower (modern type)
|
||||
computer:monitor (LCD with keyboard)
|
||||
computer:router (wifi type)
|
||||
computer:babytower
|
||||
computer:shefriendSOO
|
||||
computer:slaystation
|
||||
computer:vanio
|
||||
computer:spectre
|
||||
computer:slaystation2
|
||||
computer:admiral64
|
||||
computer:admiral128
|
||||
|
||||
There's also a `computer:computer' alias to `computer:babytower'.
|
||||
|
||||
License:
|
||||
Sourcecode: WTFPL (see below)
|
||||
Graphics: WTFPL (see below)
|
||||
|
||||
Thanks to all the people in the forums and the #minetest IRC channel for
|
||||
their support and suggestions; in no particular order:
|
||||
OldCoder, Josh, tonyka, VanessaE, davidpace, Jordach, and all the other
|
||||
sirs/madammes that I forgot to mention (sorry, please remind me if it
|
||||
was you ;) ).
|
||||
|
||||
See also:
|
||||
http://minetest.net/
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2012 Diego Martínez <lkaezadl3@gmail.com>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
29
computer/TODO.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
TO-DO List:
|
||||
|
||||
- New Nodes:
|
||||
|
||||
- Computers:
|
||||
- Mainframe (well me have a rackserver now)
|
||||
- My Computer :P
|
||||
|
||||
- Peripherals:
|
||||
- Scanner ( well we have a printer/scanner combo now)
|
||||
|
||||
- Consoles:
|
||||
- NES
|
||||
- SNES
|
||||
- DC
|
||||
|
||||
- Handhelds
|
||||
- GB/C
|
||||
- GBA
|
||||
- Calculator
|
||||
- Smartphone
|
||||
|
||||
- Animated screens
|
||||
|
||||
- Implement some kind of games (take code from `tetris' mod?). [It would be
|
||||
nice if Minetest provided a "canvas" GUI widget :)].
|
||||
|
||||
- Get more suggestions :)
|
590
computer/computers.lua
Normal file
|
@ -0,0 +1,590 @@
|
|||
|
||||
-- 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", {
|
||||
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. Sony VAIO came to mind when thinking about a name :)
|
||||
-- Fun fact: "Vanio" sounds like "baño" ("bathroom" in spanish, pronounced
|
||||
-- as something like "bah-nee-oh")
|
||||
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
|
||||
});
|
||||
});
|
||||
|
||||
-- Sony PlayStation lookalike
|
||||
-- Fun fact: Swapping the first letters gives valid words :)
|
||||
-- Pony SureiSutteshun!!!
|
||||
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
|
||||
});
|
||||
});
|
||||
|
||||
-- Sony PlayStation 2 lookalike
|
||||
-- Fun fact: Swapping the first letters gives valid words :)
|
||||
-- Pony SureiSutteshun!!!
|
||||
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
|
||||
});
|
||||
});
|
||||
|
||||
-- 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
|
||||
});
|
||||
});
|
||||
|
||||
-- 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
|
||||
});
|
||||
});
|
||||
|
||||
-- Apple iPad lookalike.
|
||||
computer.register_handheld("computer:piepad", {
|
||||
description = "Snapple Piepad";
|
||||
});
|
||||
|
||||
-- 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
|
||||
});
|
||||
});
|
||||
|
||||
-- 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
|
||||
});
|
||||
});
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
----------------------------added by crazyginger72-------------------------------
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
-- Generic Flat Screen LCD (16x9) with keyboard
|
||||
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
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
light_source = 4,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,not_in_creative_inventory=1},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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.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)
|
||||
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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
light_source = 4,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,not_in_creative_inventory=1},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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.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' ,
|
||||
})
|
||||
|
||||
minetest.register_node("computer:monitor_loading", {
|
||||
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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
light_source = 4,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,not_in_creative_inventory=1},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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.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' ,
|
||||
})
|
||||
|
||||
minetest.register_node("computer:monitor_login", {
|
||||
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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
light_source = 4,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,not_in_creative_inventory=1},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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.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' ,
|
||||
})
|
||||
|
||||
minetest.register_node("computer:monitor_desktop", {
|
||||
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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
light_source = 4,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,not_in_creative_inventory=1},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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.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' ,
|
||||
})
|
||||
|
||||
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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
light_source = 4,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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.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)
|
||||
node.name = "computer:monitor_on";
|
||||
minetest.set_node(pos, node);
|
||||
nodeupdate(pos)
|
||||
end
|
||||
|
||||
})
|
||||
|
||||
--WIFI Router (linksys look-a-like)
|
||||
|
||||
minetest.register_node("computer: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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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},
|
||||
},
|
||||
},
|
||||
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
|
||||
|
||||
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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,not_in_creative_inventory=1},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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},
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-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)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
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},
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-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)
|
||||
end
|
||||
})
|
||||
|
||||
-- Printer/scaner combo
|
||||
|
||||
minetest.register_node("computer:printer", {
|
||||
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"},
|
||||
--inventory_image =
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
--sounds = default.node_sound_dirt_defaults(),
|
||||
drawtype = "nodebox",
|
||||
node_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},
|
||||
},
|
||||
},
|
||||
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
|
||||
|
||||
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},
|
||||
},
|
||||
--drop = 'computer:server',
|
||||
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,
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
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(),
|
||||
drop = 'computer:server',
|
||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||
node.name = "computer:server";
|
||||
minetest.set_node(pos, node);
|
||||
nodeupdate(pos)
|
||||
end ,
|
||||
|
||||
})
|
||||
|
||||
|
1
computer/depends.txt
Normal file
|
@ -0,0 +1 @@
|
|||
default
|
4
computer/fusrodah/_.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
local name = "foo:bar"
|
||||
local modname = name:gsub(":.*", "")
|
||||
print(modname)
|
BIN
computer/fusrodah/craft-grid.png
Normal file
After Width: | Height: | Size: 20 KiB |
83
computer/fusrodah/init.lua.old
Normal file
|
@ -0,0 +1,83 @@
|
|||
|
||||
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
|
||||
-- License is WTFPL (see README.txt).
|
||||
|
||||
local MODNAME = "computer";
|
||||
|
||||
if (computer ~= nil) then
|
||||
error("some other mod defined computer");
|
||||
end
|
||||
|
||||
computer = { };
|
||||
|
||||
--[[ computer.pixelnodebox:
|
||||
|
|
||||
| Helper to create node boxes.
|
||||
|
|
||||
| Parameters:
|
||||
| size Resolution of the `boxes'.
|
||||
| boxes The shape of the object.
|
||||
|
|
||||
| Return Value:
|
||||
| The new nodebox, ready to be assigned to `nodedef.node_box'.
|
||||
]]
|
||||
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;
|
||||
};
|
||||
end
|
||||
|
||||
--[[ computer.register:
|
||||
|
|
||||
| Helper to register a new computer node.
|
||||
|
|
||||
| Parameters:
|
||||
| name Short ID string used as the object name.
|
||||
| desc Description of the object for the inventory.
|
||||
| nodebox The shape of the object. Also used as selection.
|
||||
|
|
||||
| Return Value:
|
||||
| None.
|
||||
]]
|
||||
computer.register = function ( name, desc, nodebox )
|
||||
|
||||
local TEXPFX = MODNAME.."_"..name.."_";
|
||||
|
||||
minetest.register_node(MODNAME..":"..name, {
|
||||
drawtype = "nodebox";
|
||||
paramtype = "light";
|
||||
paramtype2 = "facedir";
|
||||
description = desc;
|
||||
groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2 };
|
||||
tiles = {
|
||||
TEXPFX.."top.png",
|
||||
TEXPFX.."bottom.png",
|
||||
TEXPFX.."right.png",
|
||||
TEXPFX.."left.png",
|
||||
TEXPFX.."back.png",
|
||||
TEXPFX.."front.png"
|
||||
};
|
||||
node_box = nodebox;
|
||||
selection_box = nodebox;
|
||||
});
|
||||
|
||||
end
|
||||
|
||||
local MODPATH = minetest.get_modpath(MODNAME);
|
||||
dofile(MODPATH.."/nodes.lua");
|
||||
dofile(MODPATH.."/miscitems.lua");
|
||||
dofile(MODPATH.."/recipes.lua");
|
99
computer/fusrodah/nodes.lua
Normal file
|
@ -0,0 +1,99 @@
|
|||
|
||||
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
|
||||
-- License is WTFPL (see README.txt).
|
||||
|
||||
-- Just a generic Baby Tower, modeled somewhat after my old Dell cabinet
|
||||
-- (an Intel Celeron @ 233MHz, with 160MB of ram and 4GB of disk; good
|
||||
-- old times).
|
||||
computer.register("babytower", "Baby Tower",
|
||||
computer.pixelnodebox(16, {
|
||||
-- X Y Z W H L
|
||||
{ 1, 5, 6, 14, 11, 6 }, -- Monitor Screen
|
||||
{ 3, 7, 12, 10, 7, 4 }, -- Monitor Tube
|
||||
{ 0, 0, 6, 16, 5, 10 }, -- CPU
|
||||
{ 0, 0, 0, 12, 1, 5 }, -- Keyboard
|
||||
{ 13, 0, 0, 3, 3, 5 }, -- Mouse
|
||||
})
|
||||
);
|
||||
|
||||
-- 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("shefriendSOO", "SheFriend SOO",
|
||||
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
|
||||
})
|
||||
);
|
||||
|
||||
-- Sony PlayStation lookalike
|
||||
-- Fun fact: Swapping the first letters gives valid words :)
|
||||
-- Pony SureiSutteshun!!!
|
||||
computer.register("slaystation", "Pony SlayStation",
|
||||
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
|
||||
})
|
||||
);
|
||||
|
||||
-- Some generic laptop. Sony VAIO came to mind when thinking about a name :)
|
||||
-- Fun fact: "Vanio" sounds like "baño" ("bathroom" in spanish, pronounced
|
||||
-- as something like "bah-nee-oh")
|
||||
computer.register("vanio", "Pony Vanio",
|
||||
computer.pixelnodebox(32, {
|
||||
-- X Y Z W H L
|
||||
{ 0, 0, 4, 32, 3, 24 }, -- Keyboard
|
||||
{ 0, 3, 25, 32, 21, 3 }, -- Screen
|
||||
})
|
||||
);
|
||||
|
||||
-- Sinclair ZX Spectrum lookalike
|
||||
computer.register("spectre", "SX Spectre",
|
||||
computer.pixelnodebox(32, {
|
||||
-- X Y Z W H L
|
||||
{ 3, 0, 0, 26, 4, 17 }, -- Keyboard
|
||||
{ 18, 0, 18, 12, 6, 14 }, -- Tape Player
|
||||
})
|
||||
);
|
||||
|
||||
-- Sony PlayStation 2 lookalike
|
||||
computer.register("slaystation2", "Pony SlayStation 2",
|
||||
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
|
||||
})
|
||||
);
|
||||
|
||||
-- Commodore 64 lookalike
|
||||
computer.register("admiral64", "Admiral 64",
|
||||
computer.pixelnodebox(32, {
|
||||
-- X Y Z W H L
|
||||
{ 0, 0, 0, 32, 4, 18 }, -- Keyboard
|
||||
})
|
||||
);
|
||||
|
||||
-- Commodore 128 lookalike
|
||||
computer.register("admiral128", "Admiral 128",
|
||||
computer.pixelnodebox(32, {
|
||||
-- X Y Z W H L
|
||||
{ 0, 0, 0, 32, 4, 27 }, -- Keyboard
|
||||
})
|
||||
);
|
||||
|
||||
-- Old node name
|
||||
minetest.register_alias("computer:computer", "computer:babytower");
|
105
computer/init.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
|
||||
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.env: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.env: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";
|
||||
});
|
||||
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;
|
||||
};
|
||||
end
|
||||
|
||||
local MODPATH = minetest.get_modpath("computer");
|
||||
dofile(MODPATH.."/computers.lua");
|
||||
dofile(MODPATH.."/miscitems.lua");
|
||||
dofile(MODPATH.."/recipes.lua");
|
||||
|
||||
|
6
computer/locale/es.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
# Language: Español
|
||||
# Author: Diego Martínez <lkaezadl3@gmail.com>
|
||||
|
||||
Plastic sheet = Placa de Plastico
|
||||
Unprocessed Plastic base = Base de Plastico No Procesada
|
77
computer/miscitems.lua
Normal file
|
@ -0,0 +1,77 @@
|
|||
|
||||
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
|
||||
-- License is WTFPL (see README.txt).
|
||||
|
||||
-- This file defines some items in order to not have to depend on other mods.
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S;
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
dofile(minetest.get_modpath("intllib").."/intllib.lua");
|
||||
S = intllib.Getter(minetest.get_current_modname());
|
||||
else
|
||||
S = function ( s ) return s; end
|
||||
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_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,
|
||||
})
|
||||
|
||||
end -- not homedecor
|
127
computer/recipes.lua
Normal file
|
@ -0,0 +1,127 @@
|
|||
|
||||
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
|
||||
-- License is WTFPL (see README.txt).
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:babytower";
|
||||
recipe = {
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||
{ "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", },
|
||||
};
|
||||
});
|
||||
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
minetest.register_craft({
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
minetest.register_craft({
|
||||
output = "computer:spectre";
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
minetest.register_craft({
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
--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", },
|
||||
};
|
||||
});
|
||||
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
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", },
|
||||
};
|
||||
});
|
||||
|
||||
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", },
|
||||
};
|
||||
});
|
BIN
computer/textures/computer_admiral128_bk.png
Normal file
After Width: | Height: | Size: 313 B |
BIN
computer/textures/computer_admiral128_bt.png
Normal file
After Width: | Height: | Size: 313 B |
BIN
computer/textures/computer_admiral128_ft.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
computer/textures/computer_admiral128_lt.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
computer/textures/computer_admiral128_rt.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
computer/textures/computer_admiral128_tp.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
computer/textures/computer_admiral64_bk.png
Normal file
After Width: | Height: | Size: 321 B |
BIN
computer/textures/computer_admiral64_bt.png
Normal file
After Width: | Height: | Size: 313 B |
BIN
computer/textures/computer_admiral64_ft.png
Normal file
After Width: | Height: | Size: 415 B |
BIN
computer/textures/computer_admiral64_lt.png
Normal file
After Width: | Height: | Size: 331 B |
BIN
computer/textures/computer_admiral64_rt.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
computer/textures/computer_admiral64_tp.png
Normal file
After Width: | Height: | Size: 461 B |
BIN
computer/textures/computer_monitor_b.png
Normal file
After Width: | Height: | Size: 245 B |
BIN
computer/textures/computer_monitor_bt.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
computer/textures/computer_monitor_btdl.png
Normal file
After Width: | Height: | Size: 203 B |
BIN
computer/textures/computer_monitor_f_bios.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
computer/textures/computer_monitor_f_desktop.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
computer/textures/computer_monitor_f_dl.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
computer/textures/computer_monitor_f_loading.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
computer/textures/computer_monitor_f_login.png
Normal file
After Width: | Height: | Size: 933 B |
BIN
computer/textures/computer_monitor_f_off.png
Normal file
After Width: | Height: | Size: 218 B |
BIN
computer/textures/computer_monitor_f_on.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
computer/textures/computer_monitor_l.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
computer/textures/computer_monitor_r.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
computer/textures/computer_monitor_t.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
computer/textures/computer_monitor_t_off.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
computer/textures/computer_monitor_tdl.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
computer/textures/computer_piepad_inv.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
computer/textures/computer_piepad_inv_off.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
computer/textures/computer_printer_b.png
Normal file
After Width: | Height: | Size: 298 B |
BIN
computer/textures/computer_printer_bt.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
computer/textures/computer_printer_f.png
Normal file
After Width: | Height: | Size: 259 B |
BIN
computer/textures/computer_printer_l.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
computer/textures/computer_printer_r.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
computer/textures/computer_printer_t.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
computer/textures/computer_router_b.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
computer/textures/computer_router_bt.png
Normal file
After Width: | Height: | Size: 279 B |
BIN
computer/textures/computer_router_f.png
Normal file
After Width: | Height: | Size: 447 B |
BIN
computer/textures/computer_router_f_animated.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
computer/textures/computer_router_l.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
computer/textures/computer_router_r.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
computer/textures/computer_router_t.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
computer/textures/computer_server_bt.png
Normal file
After Width: | Height: | Size: 152 B |
BIN
computer/textures/computer_server_f_off.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
computer/textures/computer_server_f_on.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
computer/textures/computer_server_l.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
computer/textures/computer_server_r.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
computer/textures/computer_server_t.png
Normal file
After Width: | Height: | Size: 152 B |
BIN
computer/textures/computer_shefriendSOO_bk.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
computer/textures/computer_shefriendSOO_bt.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
computer/textures/computer_shefriendSOO_ft.png
Normal file
After Width: | Height: | Size: 935 B |
BIN
computer/textures/computer_shefriendSOO_ft_off.png
Normal file
After Width: | Height: | Size: 897 B |
BIN
computer/textures/computer_shefriendSOO_lt.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
computer/textures/computer_shefriendSOO_rt.png
Normal file
After Width: | Height: | Size: 370 B |
BIN
computer/textures/computer_shefriendSOO_tp.png
Normal file
After Width: | Height: | Size: 491 B |
BIN
computer/textures/computer_slaystation2_bk.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
computer/textures/computer_slaystation2_bt.png
Normal file
After Width: | Height: | Size: 494 B |
BIN
computer/textures/computer_slaystation2_ft.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
computer/textures/computer_slaystation2_ft_off.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
computer/textures/computer_slaystation2_lt.png
Normal file
After Width: | Height: | Size: 549 B |
BIN
computer/textures/computer_slaystation2_rt.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
computer/textures/computer_slaystation2_tp.png
Normal file
After Width: | Height: | Size: 523 B |
BIN
computer/textures/computer_slaystation_bk.png
Normal file
After Width: | Height: | Size: 559 B |
BIN
computer/textures/computer_slaystation_bt.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
computer/textures/computer_slaystation_ft.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
computer/textures/computer_slaystation_lt.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
computer/textures/computer_slaystation_rt.png
Normal file
After Width: | Height: | Size: 311 B |
BIN
computer/textures/computer_slaystation_tp.png
Normal file
After Width: | Height: | Size: 452 B |
BIN
computer/textures/computer_slaystation_tp_off.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
computer/textures/computer_specter_bk.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
computer/textures/computer_specter_bt.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
computer/textures/computer_specter_ft.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
computer/textures/computer_specter_lt.png
Normal file
After Width: | Height: | Size: 416 B |
BIN
computer/textures/computer_specter_rt.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
computer/textures/computer_specter_tp.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
computer/textures/computer_tower_b.png
Normal file
After Width: | Height: | Size: 687 B |
BIN
computer/textures/computer_tower_bt.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
computer/textures/computer_tower_f_off.png
Normal file
After Width: | Height: | Size: 436 B |
BIN
computer/textures/computer_tower_f_on.png
Normal file
After Width: | Height: | Size: 447 B |
BIN
computer/textures/computer_tower_l.png
Normal file
After Width: | Height: | Size: 243 B |
BIN
computer/textures/computer_tower_r.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
computer/textures/computer_tower_t.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
computer/textures/computer_vanio_bk.png
Normal file
After Width: | Height: | Size: 907 B |
BIN
computer/textures/computer_vanio_bk_off.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
computer/textures/computer_vanio_bt.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
computer/textures/computer_vanio_ft.png
Normal file
After Width: | Height: | Size: 1.8 KiB |