Added support to define handhelds; added Snapple Piepad and Nientiendo Wee; renamed textures

This commit is contained in:
Diego Martínez 2013-04-03 09:50:52 -03:00
parent 361374e25b
commit f48ab1c081
31 changed files with 31 additions and 0 deletions

View File

@ -78,3 +78,19 @@ computer.register("computer:specter", {
{ 18, 0, 18, 12, 6, 14 }, -- Tape Player { 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";
});

View File

@ -62,6 +62,21 @@ computer.register = function ( name, def )
}); });
end 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 ) computer.pixelnodebox = function ( size, boxes )
local fixed = { }; local fixed = { };
local i, box; local i, box;

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B