split printer into separate file

This commit is contained in:
Vanessa Dannenberg 2019-08-21 06:36:19 -04:00
parent f90834ff06
commit 67f2065408
3 changed files with 29 additions and 27 deletions

View File

@ -258,33 +258,6 @@ minetest.register_node("computer:tower", {
minetest.register_alias("computer:tower_on", "computer:tower") minetest.register_alias("computer:tower_on", "computer:tower")
-- Printer/scaner combo
minetest.register_node("computer:printer", {
description = S("Printer-Scanner Combo"),
inventory_image = "computer_printer_inv.png",
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"},
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
groups = {snappy=3},
sound = default.node_sound_wood_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}
},
},
})
--Rack Server --Rack Server
minetest.register_node("computer:server", { minetest.register_node("computer:server", {
drawtype = "nodebox", drawtype = "nodebox",

View File

@ -94,5 +94,6 @@ end
local MODPATH = minetest.get_modpath("computer") local MODPATH = minetest.get_modpath("computer")
dofile(MODPATH.."/computers.lua") dofile(MODPATH.."/computers.lua")
dofile(MODPATH.."/printers.lua")
dofile(MODPATH.."/recipes.lua") dofile(MODPATH.."/recipes.lua")
dofile(MODPATH.."/tetris.lua") dofile(MODPATH.."/tetris.lua")

28
computer/printers.lua Normal file
View File

@ -0,0 +1,28 @@
-- Printers of some kind or another
minetest.register_node("computer:printer", {
description = S("Printer-Scanner Combo"),
inventory_image = "computer_printer_inv.png",
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"},
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
groups = {snappy=3},
sound = default.node_sound_wood_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}
},
},
})