From 67f2065408a98414a5f16eab456640b26b12589c Mon Sep 17 00:00:00 2001
From: Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com>
Date: Wed, 21 Aug 2019 06:36:19 -0400
Subject: [PATCH] split printer into separate file

---
 computer/computers.lua | 27 ---------------------------
 computer/init.lua      |  1 +
 computer/printers.lua  | 28 ++++++++++++++++++++++++++++
 3 files changed, 29 insertions(+), 27 deletions(-)
 create mode 100644 computer/printers.lua

diff --git a/computer/computers.lua b/computer/computers.lua
index 06b04a93..5a81e916 100644
--- a/computer/computers.lua
+++ b/computer/computers.lua
@@ -258,33 +258,6 @@ minetest.register_node("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
 minetest.register_node("computer:server", {
 	drawtype = "nodebox",
diff --git a/computer/init.lua b/computer/init.lua
index 25e6185e..ffae5583 100644
--- a/computer/init.lua
+++ b/computer/init.lua
@@ -94,5 +94,6 @@ end
 
 local MODPATH = minetest.get_modpath("computer")
 dofile(MODPATH.."/computers.lua")
+dofile(MODPATH.."/printers.lua")
 dofile(MODPATH.."/recipes.lua")
 dofile(MODPATH.."/tetris.lua")
diff --git a/computer/printers.lua b/computer/printers.lua
new file mode 100644
index 00000000..4af3d107
--- /dev/null
+++ b/computer/printers.lua
@@ -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}
+		},
+	},
+})
+
-- 
GitLab