homedecor_modpack/computers/printers.lua
Vanessa Dannenberg 9cc6f90778 rename computer mod to "computers"
and fix all the image and model filenames that didn't conform before.
aliases are provided for the old nodes
2021-03-02 03:03:12 -05:00

91 lines
2.8 KiB
Lua

-- Printers of some kind or another
local S = minetest.get_translator("computers")
minetest.register_node("computers:printer", {
description = S("Printer-Scanner Combo"),
inventory_image = "computers_printer_inv.png",
tiles = {"computers_printer_t.png","computers_printer_bt.png","computers_printer_l.png",
"computers_printer_r.png","computers_printer_b.png","computers_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}
},
},
})
-- "bedflinger" style 3D Printer (Prusa i3 or equivalent)
local cbox = {
type = "fixed",
fixed = {-0.25, -0.25, -0.5, 0.3, 0.3, 0.25 }
}
minetest.register_node("computers:3dprinter_bedflinger", {
description = S('3D Printer ("bedflinger" design)'),
inventory_image = "computers_3dprinter_bedflinger_inv.png",
tiles = {
{ name = "computers_3dprinter.png", color = 0xffffffff },
"computers_3dprinter_filament.png"
},
paramtype = "light",
walkable = true,
groups = {snappy=3, ud_param2_colorable = 1},
sound = default.node_sound_wood_defaults(),
drawtype = "mesh",
mesh = "computers_3dprinter_bedflinger.obj",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = cbox,
collision_box = cbox,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
})
-- COreXY style printer (Hypercube or similar)
cbox = {
type = "fixed",
fixed = {-0.4375, -0.5, -0.5, 0.4375, 0.5, 0.375 }
}
minetest.register_node("computers:3dprinter_corexy", {
description = S('3D Printer (CoreXY design)'),
tiles = {
{ name = "computers_3dprinter.png", color = 0xffffffff },
"computers_3dprinter_filament.png"
},
paramtype = "light",
walkable = true,
groups = {snappy=3, ud_param2_colorable = 1},
sound = default.node_sound_wood_defaults(),
drawtype = "mesh",
mesh = "computers_3dprinter_corexy.obj",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = cbox,
collision_box = cbox,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
})