Disable rotation for 3 torches
[minetest_hades/hades_revisited.git] / mods / glowcrystals / init.lua
blob62187f748386527e7e69b1905f72ec25a00eadef
1 local S = minetest.get_translator("glowcrystals")
3 --[[
4 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.
8 --]]
11 --///////////////
12 -- Ores & Blocks
13 --///////////////
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,
19 paramtype = "light",
20 sunlight_propagates = true,
21 light_source = 10,
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,
31 paramtype = "light",
32 sunlight_propagates = true,
33 light_source = 14,
34 groups = {cracky=3},
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",
44 paramtype = "light",
45 paramtype2 = "wallmounted",
46 sunlight_propagates = true,
47 walkable = false,
48 light_source = minetest.LIGHT_MAX-1,
49 selection_box = {
50 type = "wallmounted",
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(),
58 on_rotate = false,
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" },
65 paramtype = "light",
66 sunlight_propagates = true,
67 light_source = 11,
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",
78 light_source = 11,
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',
87 recipe = {
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'},
93 end
95 --///////
96 -- Items
97 --///////
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,
111 --//////////
112 -- Crafting
113 --//////////
115 minetest.register_craft( {
116 output = 'glowcrystals:glowcrystal_block',
117 recipe = {
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',
126 recipe = {
127 {'glowcrystals:glowcrystal_block'},
131 minetest.register_craft({
132 output = 'glowcrystals:glowdust 4',
133 recipe = {
134 {'glowcrystals:glowcrystal'},
138 minetest.register_craft({
139 output = 'glowcrystals:glowcrystal_torch 4',
140 recipe = {
141 {'glowcrystals:glowcrystal'},
142 {'group:stick'},
146 minetest.register_craft({
147 output = 'glowcrystals:glowglass',
148 recipe = {
149 {'glowcrystals:glowdust'},
150 {'hades_core:glass'},
154 minetest.register_craft({
155 output = 'hades_core:glowing_cactus_block',
156 recipe = {
157 {'glowcrystals:glowdust'},
158 {'hades_core:cactus_block'},
162 --/////////
163 -- Aliases
164 --/////////
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")