1 local S
= minetest
.get_translator("glowcrystals")
5 A Minetest mod by SegFault22
7 Details: Adds several items for lighting, made out of glowing crystals - a better alternative to those ugly infini-torches.
15 minetest
.register_node( "glowcrystals:glowcrystal_ore", {
16 description
= S("Glowing Crystal Ore"),
17 tiles
= { "default_essexite.png^glowcrystals_ore_glowcrystal.png" },
18 is_ground_content
= true,
20 sunlight_propagates
= true,
22 groups
= {cracky
=3, ore
=1},
23 sounds
= hades_sounds
.node_sound_stone_defaults(),
24 drop
= 'glowcrystals:glowcrystal',
27 minetest
.register_node( "glowcrystals:glowcrystal_block", {
28 description
= S("Glowing Crystal Block"),
29 tiles
= { "glowcrystals_block_glowcrystal.png" },
30 is_ground_content
= true,
32 sunlight_propagates
= true,
35 sounds
= hades_sounds
.node_sound_stone_defaults(),
38 minetest
.register_node("glowcrystals:glowcrystal_torch", {
39 description
= S("Glowing Crystal Torch"),
40 drawtype
= "torchlike",
41 tiles
= {"glowcrystals_glowtorch_on_floor.png", "glowcrystals_glowtorch_on_ceiling.png", "glowcrystals_glowtorch.png"},
42 inventory_image
= "glowcrystals_glowtorch_on_floor.png",
43 wield_image
= "glowcrystals_glowtorch_on_floor.png",
45 paramtype2
= "wallmounted",
46 sunlight_propagates
= true,
48 light_source
= minetest
.LIGHT_MAX
-1,
51 wall_top
= {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
52 wall_bottom
= {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
53 wall_side
= {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
55 groups
= {choppy
=2,dig_immediate
=3,attached_node
=1},
56 legacy_wallmounted
= true,
57 sounds
= hades_sounds
.node_sound_defaults(),
61 minetest
.register_node("glowcrystals:glowglass", {
62 description
= S("Glow Glass"),
63 drawtype
= "glasslike_framed_optional",
64 tiles
= {"glowcrystals_glowglass.png", "glowcrystals_glowglass_detail.png" },
66 sunlight_propagates
= true,
68 is_ground_content
= false,
69 groups
= {cracky
=3,oddly_breakable_by_hand
=3},
70 sounds
= hades_sounds
.node_sound_glass_defaults(),
73 if minetest
.get_modpath("windows") then
74 windows
.register_window("glowcrystals:windows_glow", {
75 description
= S("Glowing Window"),
76 texture_seam
= "glowcrystals_windows_glow_seam.png",
77 texture_front
= "glowcrystals_windows_glow_front.png",
79 groups
= {cracky
=3,oddly_breakable_by_hand
=3},
80 sounds
= hades_sounds
.node_sound_glass_defaults({
81 footstep
= hades_sounds
.node_sound_stone_defaults().footstep
,
85 minetest
.register_craft({
86 output
= 'glowcrystals:windows_glow 4',
88 {'hades_core:obsidian_shard', 'glowcrystals:glowglass', 'hades_core:obsidian_shard'},
89 {'glowcrystals:glowglass', 'glowcrystals:glowglass', 'glowcrystals:glowglass'},
90 {'hades_core:obsidian_shard', 'glowcrystals:glowglass', 'hades_core:obsidian_shard'},
99 minetest
.register_craftitem( "glowcrystals:glowcrystal", {
100 description
= S("Glowing Crystal"),
101 inventory_image
= "glowcrystals_item_glowcrystal.png",
102 on_place_on_ground
= minetest
.craftitem_place_item
,
105 minetest
.register_craftitem( "glowcrystals:glowdust", {
106 description
= S("Glow Dust"),
107 inventory_image
= "glowcrystals_item_dust.png",
108 on_place_on_ground
= minetest
.craftitem_place_item
,
115 minetest
.register_craft( {
116 output
= 'glowcrystals:glowcrystal_block',
118 { 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal' },
119 { 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal' },
120 { 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal' },
124 minetest
.register_craft({
125 output
= 'glowcrystals:glowcrystal 9',
127 {'glowcrystals:glowcrystal_block'},
131 minetest
.register_craft({
132 output
= 'glowcrystals:glowdust 4',
134 {'glowcrystals:glowcrystal'},
138 minetest
.register_craft({
139 output
= 'glowcrystals:glowcrystal_torch 4',
141 {'glowcrystals:glowcrystal'},
146 minetest
.register_craft({
147 output
= 'glowcrystals:glowglass',
149 {'glowcrystals:glowdust'},
150 {'hades_core:glass'},
154 minetest
.register_craft({
155 output
= 'hades_core:glowing_cactus_block',
157 {'glowcrystals:glowdust'},
158 {'hades_core:cactus_block'},
166 minetest
.register_alias("glowcrystal", "glowcrystals:glowcrystal")
167 minetest
.register_alias("glowcrystal_torch", "glowcrystals:glowcrystal_torch")
168 minetest
.register_alias("glowcrystal_block", "glowcrystals:glowcrystal_block")