Make many nodes floodable
[minetest_hades/hades_revisited.git] / mods / glowcrystals / init.lua
blobe7aa7eae7a779ac5e1ee91207256d3c6079147ed
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 floodable = true,
49 light_source = minetest.LIGHT_MAX-1,
50 selection_box = {
51 type = "wallmounted",
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(),
59 on_rotate = false,
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" },
66 paramtype = "light",
67 sunlight_propagates = true,
68 light_source = 11,
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",
79 light_source = 11,
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',
88 recipe = {
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'},
94 end
96 --///////
97 -- Items
98 --///////
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,
112 --//////////
113 -- Crafting
114 --//////////
116 minetest.register_craft( {
117 output = 'glowcrystals:glowcrystal_block',
118 recipe = {
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',
127 recipe = {
128 {'glowcrystals:glowcrystal_block'},
132 minetest.register_craft({
133 output = 'glowcrystals:glowdust 4',
134 recipe = {
135 {'glowcrystals:glowcrystal'},
139 minetest.register_craft({
140 output = 'glowcrystals:glowcrystal_torch 4',
141 recipe = {
142 {'glowcrystals:glowcrystal'},
143 {'group:stick'},
147 minetest.register_craft({
148 output = 'glowcrystals:glowglass',
149 recipe = {
150 {'glowcrystals:glowdust'},
151 {'hades_core:glass'},
155 minetest.register_craft({
156 output = 'hades_core:glowing_cactus_block',
157 recipe = {
158 {'glowcrystals:glowdust'},
159 {'hades_core:cactus_block'},
163 --/////////
164 -- Aliases
165 --/////////
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")