Added support to define handhelds; added Snapple Piepad and Nientiendo Wee; renamed textures
@ -78,3 +78,19 @@ computer.register("computer:specter", {
|
||||
{ 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";
|
||||
});
|
||||
|
15
init.lua
@ -62,6 +62,21 @@ computer.register = function ( name, def )
|
||||
});
|
||||
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;
|
||||
|
BIN
textures/computer_piepad_inv.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
textures/computer_piepad_inv_off.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
textures/computer_slaystation2_bk.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
textures/computer_slaystation2_bt.png
Normal file
After Width: | Height: | Size: 494 B |
BIN
textures/computer_slaystation2_ft.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
textures/computer_slaystation2_ft_off.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
textures/computer_slaystation2_lt.png
Normal file
After Width: | Height: | Size: 549 B |
BIN
textures/computer_slaystation2_rt.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
textures/computer_slaystation2_tp.png
Normal file
After Width: | Height: | Size: 523 B |
BIN
textures/computer_slaystation_bk.png
Normal file
After Width: | Height: | Size: 559 B |
BIN
textures/computer_slaystation_bt.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/computer_slaystation_ft.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
textures/computer_slaystation_lt.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
textures/computer_slaystation_rt.png
Normal file
After Width: | Height: | Size: 311 B |
BIN
textures/computer_slaystation_tp.png
Normal file
After Width: | Height: | Size: 452 B |
BIN
textures/computer_slaystation_tp_off.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
textures/computer_specter_bk.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
textures/computer_specter_bt.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/computer_specter_ft.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
textures/computer_specter_lt.png
Normal file
After Width: | Height: | Size: 416 B |
BIN
textures/computer_specter_rt.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
textures/computer_specter_tp.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
textures/computer_wee_bk.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/computer_wee_bt.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/computer_wee_ft.png
Normal file
After Width: | Height: | Size: 274 B |
BIN
textures/computer_wee_ft_off.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
textures/computer_wee_lt.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
textures/computer_wee_rt.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
textures/computer_wee_tp.png
Normal file
After Width: | Height: | Size: 165 B |