2017-02-05 07:08:38 +01:00
|
|
|
-- internationalization boilerplate
|
|
|
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
local S, NS = dofile(MP.."/intllib.lua")
|
|
|
|
|
2016-12-31 07:38:18 +01:00
|
|
|
-- A do-nothing "structural" node, to ensure all digtron nodes that are supposed to be connected to each other can be connected to each other.
|
|
|
|
minetest.register_node("digtron:structure", {
|
2017-02-05 07:08:38 +01:00
|
|
|
description = S("Digtron Structure"),
|
2017-01-18 03:57:20 +01:00
|
|
|
_doc_items_longdesc = digtron.doc.structure_longdesc,
|
|
|
|
_doc_items_usagehelp = digtron.doc.structure_usagehelp,
|
2017-01-03 04:07:15 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
|
2017-01-04 03:43:32 +01:00
|
|
|
drop = "digtron:structure",
|
2016-12-31 07:38:18 +01:00
|
|
|
tiles = {"digtron_plate.png"},
|
|
|
|
drawtype = "nodebox",
|
2017-01-04 07:56:34 +01:00
|
|
|
sounds = digtron.metal_sounds,
|
2017-01-01 05:19:52 +01:00
|
|
|
climbable = true,
|
|
|
|
walkable = false,
|
2016-12-31 07:38:18 +01:00
|
|
|
paramtype = "light",
|
2017-01-06 07:52:09 +01:00
|
|
|
is_ground_content = false,
|
2016-12-31 07:38:18 +01:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{0.3125, 0.3125, -0.5, 0.5, 0.5, 0.5},
|
|
|
|
{0.3125, -0.5, -0.5, 0.5, -0.3125, 0.5},
|
|
|
|
{-0.5, 0.3125, -0.5, -0.3125, 0.5, 0.5},
|
|
|
|
{-0.5, -0.5, -0.5, -0.3125, -0.3125, 0.5},
|
|
|
|
{-0.3125, 0.3125, 0.3125, 0.3125, 0.5, 0.5},
|
|
|
|
{-0.3125, -0.5, 0.3125, 0.3125, -0.3125, 0.5},
|
|
|
|
{-0.5, -0.3125, 0.3125, -0.3125, 0.3125, 0.5},
|
|
|
|
{0.3125, -0.3125, 0.3125, 0.5, 0.3125, 0.5},
|
|
|
|
{-0.5, -0.3125, -0.5, -0.3125, 0.3125, -0.3125},
|
|
|
|
{0.3125, -0.3125, -0.5, 0.5, 0.3125, -0.3125},
|
|
|
|
{-0.3125, 0.3125, -0.5, 0.3125, 0.5, -0.3125},
|
|
|
|
{-0.3125, -0.5, -0.5, 0.3125, -0.3125, -0.3125},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- A modest light source that will move with the digtron, handy for working in a tunnel you aren't bothering to install permanent lights in.
|
|
|
|
minetest.register_node("digtron:light", {
|
2017-02-05 07:08:38 +01:00
|
|
|
description = S("Digtron Light"),
|
2017-01-18 03:57:20 +01:00
|
|
|
_doc_items_longdesc = digtron.doc.light_longdesc,
|
|
|
|
_doc_items_usagehelp = digtron.doc.light_usagehelp,
|
2017-01-03 04:07:15 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
|
2017-01-04 03:43:32 +01:00
|
|
|
drop = "digtron:light",
|
2017-01-11 06:59:11 +01:00
|
|
|
tiles = {"digtron_plate.png^digtron_light.png"},
|
2016-12-31 07:38:18 +01:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
2017-01-06 07:52:09 +01:00
|
|
|
is_ground_content = false,
|
2016-12-31 07:38:18 +01:00
|
|
|
light_source = 10,
|
2017-01-02 05:17:52 +01:00
|
|
|
sounds = default.node_sound_glass_defaults(),
|
2016-12-31 07:38:18 +01:00
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
node_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
wall_top = {-0.25, 0.3125, -0.25, 0.25, 0.5, 0.25},
|
2017-10-14 22:55:39 +02:00
|
|
|
wall_bottom = {-0.25, -0.5, -0.25, 0.25, -0.3125, 0.25},
|
2016-12-31 07:38:18 +01:00
|
|
|
wall_side = {-0.5, -0.25, -0.25, -0.1875, 0.25, 0.25},
|
|
|
|
},
|
|
|
|
})
|
2017-01-07 03:34:51 +01:00
|
|
|
|
|
|
|
-- A simple structural panel
|
|
|
|
minetest.register_node("digtron:panel", {
|
2017-02-05 07:08:38 +01:00
|
|
|
description = S("Digtron Panel"),
|
2017-01-18 03:57:20 +01:00
|
|
|
_doc_items_longdesc = digtron.doc.panel_longdesc,
|
|
|
|
_doc_items_usagehelp = digtron.doc.panel_usagehelp,
|
2017-01-07 03:34:51 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
|
|
|
|
drop = "digtron:panel",
|
|
|
|
tiles = {"digtron_plate.png"},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
is_ground_content = false,
|
|
|
|
sounds = digtron.metal_sounds,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- A simple structural panel
|
|
|
|
minetest.register_node("digtron:edge_panel", {
|
2017-02-05 07:08:38 +01:00
|
|
|
description = S("Digtron Edge Panel"),
|
2017-01-18 03:57:20 +01:00
|
|
|
_doc_items_longdesc = digtron.doc.edge_panel_longdesc,
|
|
|
|
_doc_items_usagehelp = digtron.doc.edge_panel_usagehelp,
|
2017-01-07 03:34:51 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
|
|
|
|
drop = "digtron:edge_panel",
|
|
|
|
tiles = {"digtron_plate.png"},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
is_ground_content = false,
|
|
|
|
sounds = digtron.metal_sounds,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5},
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.375}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5},
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.4375}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("digtron:corner_panel", {
|
2017-02-05 07:08:38 +01:00
|
|
|
description = S("Digtron Corner Panel"),
|
2017-01-18 03:57:20 +01:00
|
|
|
_doc_items_longdesc = digtron.doc.corner_panel_longdesc,
|
|
|
|
_doc_items_usagehelp = digtron.doc.corner_panel_usagehelp,
|
2017-01-07 03:34:51 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
|
|
|
|
drop = "digtron:corner_panel",
|
|
|
|
tiles = {"digtron_plate.png"},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
is_ground_content = false,
|
|
|
|
sounds = digtron.metal_sounds,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5},
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.375},
|
|
|
|
{-0.5, -0.375, -0.5, -0.375, 0.5, 0.375},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5},
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.4375},
|
|
|
|
{-0.5, -0.4375, -0.5, -0.4375, 0.5, 0.4375},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|