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,
49 light_source
= minetest
.LIGHT_MAX
-1,
52 wall_top
= {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
53 wall_bottom
= {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
54 wall_side
= {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
56 groups
= {choppy
=2,dig_immediate
=3,attached_node
=1},
57 legacy_wallmounted
= true,
58 sounds
= hades_sounds
.node_sound_defaults(),
62 minetest
.register_node("glowcrystals:glowglass", {
63 description
= S("Glow Glass"),
64 drawtype
= "glasslike_framed_optional",
65 tiles
= {"glowcrystals_glowglass.png", "glowcrystals_glowglass_detail.png" },
67 sunlight_propagates
= true,
69 is_ground_content
= false,
70 groups
= {cracky
=3,oddly_breakable_by_hand
=3},
71 sounds
= hades_sounds
.node_sound_glass_defaults(),
74 if minetest
.get_modpath("windows") then
75 windows
.register_window("glowcrystals:windows_glow", {
76 description
= S("Glowing Window"),
77 texture_seam
= "glowcrystals_windows_glow_seam.png",
78 texture_front
= "glowcrystals_windows_glow_front.png",
80 groups
= {cracky
=3,oddly_breakable_by_hand
=3},
81 sounds
= hades_sounds
.node_sound_glass_defaults({
82 footstep
= hades_sounds
.node_sound_stone_defaults().footstep
,
86 minetest
.register_craft({
87 output
= 'glowcrystals:windows_glow 4',
89 {'hades_core:obsidian_shard', 'glowcrystals:glowglass', 'hades_core:obsidian_shard'},
90 {'glowcrystals:glowglass', 'glowcrystals:glowglass', 'glowcrystals:glowglass'},
91 {'hades_core:obsidian_shard', 'glowcrystals:glowglass', 'hades_core:obsidian_shard'},
100 minetest
.register_craftitem( "glowcrystals:glowcrystal", {
101 description
= S("Glowing Crystal"),
102 inventory_image
= "glowcrystals_item_glowcrystal.png",
103 on_place_on_ground
= minetest
.craftitem_place_item
,
106 minetest
.register_craftitem( "glowcrystals:glowdust", {
107 description
= S("Glow Dust"),
108 inventory_image
= "glowcrystals_item_dust.png",
109 on_place_on_ground
= minetest
.craftitem_place_item
,
116 minetest
.register_craft( {
117 output
= 'glowcrystals:glowcrystal_block',
119 { 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal' },
120 { 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal' },
121 { 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal', 'glowcrystals:glowcrystal' },
125 minetest
.register_craft({
126 output
= 'glowcrystals:glowcrystal 9',
128 {'glowcrystals:glowcrystal_block'},
132 minetest
.register_craft({
133 output
= 'glowcrystals:glowdust 4',
135 {'glowcrystals:glowcrystal'},
139 minetest
.register_craft({
140 output
= 'glowcrystals:glowcrystal_torch 4',
142 {'glowcrystals:glowcrystal'},
147 minetest
.register_craft({
148 output
= 'glowcrystals:glowglass',
150 {'glowcrystals:glowdust'},
151 {'hades_core:glass'},
155 minetest
.register_craft({
156 output
= 'hades_core:glowing_cactus_block',
158 {'glowcrystals:glowdust'},
159 {'hades_core:cactus_block'},
167 minetest
.register_alias("glowcrystal", "glowcrystals:glowcrystal")
168 minetest
.register_alias("glowcrystal_torch", "glowcrystals:glowcrystal_torch")
169 minetest
.register_alias("glowcrystal_block", "glowcrystals:glowcrystal_block")