KaylebJay
2020-06-24 438c0877f6ed03a25211ce70e2edd26b01703a8c
commit | author | age
37d9d9 1 -- NOTE: The code is takes directly from VanessaE's homedecor mod.
K 2 -- I just made it the lights into indictive appliances for this mod.
3
4 -- This file supplies electric powered glowlights
5
6 -- Boilerplate to support localized strings if intllib mod is installed.
7 local S
8 if (minetest.get_modpath("intllib")) then
ee0765 9     dofile(minetest.get_modpath("intllib").."/intllib.lua")
S 10     S = intllib.Getter(minetest.get_current_modname())
37d9d9 11 else
ee0765 12     S = function (s) return s end
37d9d9 13 end
K 14
15 function technic_homedecor_node_is_owned(pos, placer)
16         local ownername = false
ee0765 17         if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
S 18                 if HasOwner(pos, placer) then
37d9d9 19                         if not IsPlayerNodeOwner(pos, placer:get_player_name()) then
ee0765 20                                 if type(getLastOwner) == "function" then -- ...is an old version
37d9d9 21                                         ownername = getLastOwner(pos)
ee0765 22                                 elseif type(GetNodeOwnerName) == "function" then -- ...is a recent version
37d9d9 23                                         ownername = GetNodeOwnerName(pos)
K 24                                 else
25                                         ownername = S("someone")
26                                 end
27                         end
28                 end
29
ee0765 30         elseif type(isprotect) == "function" then -- glomie's protection mod
37d9d9 31                 if not isprotect(5, pos, placer) then
K 32                         ownername = S("someone")
33                 end
ee0765 34         elseif type(protector) == "table" and type(protector.can_dig) == "function" then -- Zeg9's protection mod
37d9d9 35                 if not protector.can_dig(5, pos, placer) then
K 36                         ownername = S("someone")
37                 end
38         end
39
40         if ownername ~= false then
ee0765 41                 minetest.chat_send_player(placer:get_player_name(), S("Sorry, %s owns that spot."):format(ownername) )
37d9d9 42                 return true
K 43         else
44                 return false
45         end
46 end
47
ee0765 48 local dirs2 = {9,  18,  7, 12}
37d9d9 49
ee5c6c 50 local technic_homedecor_rotate_and_place = function(itemstack, placer, pointed_thing)
4f78a6 51     if not technic_homedecor_node_is_owned(pointed_thing.under, placer)
37d9d9 52        and not technic_homedecor_node_is_owned(pointed_thing.above, placer) then
ee0765 53         local node = minetest.get_node(pointed_thing.under)
37d9d9 54         if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then
K 55
56             local above = pointed_thing.above
57             local under = pointed_thing.under
58             local pitch = placer:get_look_pitch()
ee0765 59             local pname = minetest.get_node(under).name
37d9d9 60             local fdir = minetest.dir_to_facedir(placer:get_look_dir())
K 61             local wield_name = itemstack:get_name()
62
63             if not minetest.registered_nodes[pname]
64                 or not minetest.registered_nodes[pname].on_rightclick then
65
66                 local iswall = (above.x ~= under.x) or (above.z ~= under.z)
67                 local isceiling = (above.x == under.x) and (above.z == under.z) and (pitch > 0)
68                 local pos1 = above
69
70                 if minetest.registered_nodes[pname]["buildable_to"] then
71                     pos1 = under
72                     iswall = false
73                 end
74
ee0765 75                 if not minetest.registered_nodes[minetest.get_node(pos1).name]["buildable_to"] then return end
37d9d9 76
4f78a6 77                 if iswall then
ee0765 78                     minetest.add_node(pos1, {name = wield_name, param2 = dirs2[fdir+1] }) -- place wall variant
37d9d9 79                 elseif isceiling then
ee0765 80                     minetest.add_node(pos1, {name = wield_name, param2 = 20 }) -- place upside down variant
37d9d9 81                 else
ee0765 82                     minetest.add_node(pos1, {name = wield_name, param2 = 0 }) -- place right side up
37d9d9 83                 end
K 84
85                 if not homedecor_expect_infinite_stacks then
86                     itemstack:take_item()
87                     return itemstack
88                 end
89             end
90         else
91             minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack)
92         end
93     end
94 end
95
96 -- Yellow -- Half node
97 minetest.register_node('technic:homedecor_glowlight_half_yellow', {
98     description = S("Yellow Glowlight (thick)"),
99     drawtype = "nodebox",
100     tiles = {
101         'technic_homedecor_glowlight_yellow_tb.png',
102         'technic_homedecor_glowlight_yellow_tb.png',
103         'technic_homedecor_glowlight_thick_yellow_sides.png',
104         'technic_homedecor_glowlight_thick_yellow_sides.png',
105         'technic_homedecor_glowlight_thick_yellow_sides.png',
106         'technic_homedecor_glowlight_thick_yellow_sides.png'
107     },
108         selection_box = {
109                 type = "fixed",
110                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
111         },
112         node_box = {
113                 type = "fixed",
114                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
115         },
116
117     sunlight_propagates = false,
118     paramtype = "light",
119     paramtype2 = "facedir",
120     walkable = true,
121     sounds = default.node_sound_wood_defaults(),
122
123     groups = { snappy = 3 },
124     on_place = function(itemstack, placer, pointed_thing)
125         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
126         return itemstack
127          end,
128     on_construct = function(pos)
ee5c6c 129               technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thick)")
37d9d9 130                end,
K 131     on_punch = function(pos, node, puncher)
ee5c6c 132               technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_half_yellow_active")
37d9d9 133            end
K 134 })
135
136 minetest.register_node('technic:homedecor_glowlight_half_yellow_active', {
137     description = S("Yellow Glowlight (thick)"),
138     drawtype = "nodebox",
139     tiles = {
140         'technic_homedecor_glowlight_yellow_tb.png',
141         'technic_homedecor_glowlight_yellow_tb.png',
142         'technic_homedecor_glowlight_thick_yellow_sides.png',
143         'technic_homedecor_glowlight_thick_yellow_sides.png',
144         'technic_homedecor_glowlight_thick_yellow_sides.png',
145         'technic_homedecor_glowlight_thick_yellow_sides.png'
146     },
147         selection_box = {
148                 type = "fixed",
149                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
150         },
151         node_box = {
152                 type = "fixed",
153                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
154         },
155
156     sunlight_propagates = false,
157     paramtype = "light",
158     paramtype2 = "facedir",
159     walkable = true,
a8daa4 160     light_source = minetest.LIGHT_MAX,
37d9d9 161     sounds = default.node_sound_wood_defaults(),
K 162
163     groups = { snappy = 3, not_in_creative_inventory=1},
164     drop="technic:homedecor_glowlight_half_yellow",
165     on_place = function(itemstack, placer, pointed_thing)
166         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
167         return itemstack
168          end,
169     on_construct = function(pos)
ee5c6c 170               technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thick)")
37d9d9 171                end,
K 172     on_punch = function(pos, node, puncher)
ee5c6c 173               technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_half_yellow")
37d9d9 174            end
K 175 })
176
177 -- Yellow -- Quarter node
178 minetest.register_node('technic:homedecor_glowlight_quarter_yellow', {
179     description = S("Yellow Glowlight (thin)"),
180     drawtype = "nodebox",
181     tiles = {
182         'technic_homedecor_glowlight_yellow_tb.png',
183         'technic_homedecor_glowlight_yellow_tb.png',
184         'technic_homedecor_glowlight_thin_yellow_sides.png',
185         'technic_homedecor_glowlight_thin_yellow_sides.png',
186         'technic_homedecor_glowlight_thin_yellow_sides.png',
187         'technic_homedecor_glowlight_thin_yellow_sides.png'
188     },
189         selection_box = {
190                 type = "fixed",
191                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
192         },
193         node_box = {
194                 type = "fixed",
195                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
196         },
197
198     sunlight_propagates = false,
199     paramtype = "light",
200     paramtype2 = "facedir",
201     walkable = true,
202     sounds = default.node_sound_wood_defaults(),
203
204     groups = { snappy = 3 },
205     on_place = function(itemstack, placer, pointed_thing)
206         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
207         return itemstack
208          end,
209     on_construct = function(pos)
ee5c6c 210               technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thin)")
37d9d9 211                end,
K 212     on_punch = function(pos, node, puncher)
ee5c6c 213               technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_quarter_yellow_active")
37d9d9 214            end
K 215 })
216
217 minetest.register_node('technic:homedecor_glowlight_quarter_yellow_active', {
218     description = S("Yellow Glowlight (thin)"),
219     drawtype = "nodebox",
220     tiles = {
221         'technic_homedecor_glowlight_yellow_tb.png',
222         'technic_homedecor_glowlight_yellow_tb.png',
223         'technic_homedecor_glowlight_thin_yellow_sides.png',
224         'technic_homedecor_glowlight_thin_yellow_sides.png',
225         'technic_homedecor_glowlight_thin_yellow_sides.png',
226         'technic_homedecor_glowlight_thin_yellow_sides.png'
227     },
228         selection_box = {
229                 type = "fixed",
230                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
231         },
232         node_box = {
233                 type = "fixed",
234                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
235         },
236
237     sunlight_propagates = false,
238     paramtype = "light",
239     paramtype2 = "facedir",
240     walkable = true,
a8daa4 241     light_source = minetest.LIGHT_MAX-1,
37d9d9 242     sounds = default.node_sound_wood_defaults(),
K 243
244     groups = { snappy = 3, not_in_creative_inventory=1},
245     drop="technic:homedecor_glowlight_quarter_yellow",
246     on_place = function(itemstack, placer, pointed_thing)
247         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
248         return itemstack
249          end,
250     on_construct = function(pos)
ee5c6c 251               technic.inductive_on_construct(pos, 100, "Yellow Glowlight (thin)")
37d9d9 252                end,
K 253     on_punch = function(pos, node, puncher)
ee5c6c 254               technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_quarter_yellow")
37d9d9 255            end
K 256 })
257
258
259 -- White -- half node
260 minetest.register_node('technic:homedecor_glowlight_half_white', {
261     description = S("White Glowlight (thick)"),
262     drawtype = "nodebox",
263     tiles = {
264         'technic_homedecor_glowlight_white_tb.png',
265         'technic_homedecor_glowlight_white_tb.png',
266         'technic_homedecor_glowlight_thick_white_sides.png',
267         'technic_homedecor_glowlight_thick_white_sides.png',
268         'technic_homedecor_glowlight_thick_white_sides.png',
269         'technic_homedecor_glowlight_thick_white_sides.png'
270     },
271         selection_box = {
272                 type = "fixed",
273                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
274         },
275         node_box = {
276                 type = "fixed",
277                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
278         },
279
280     sunlight_propagates = false,
281     paramtype = "light",
282     paramtype2 = "facedir",
283     walkable = true,
284     sounds = default.node_sound_wood_defaults(),
285
286     groups = { snappy = 3 },
287     on_place = function(itemstack, placer, pointed_thing)
288         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
289         return itemstack
290          end,
291     on_construct = function(pos)
ee5c6c 292               technic.inductive_on_construct(pos, 100, "White Glowlight (thick)")
37d9d9 293                end,
K 294     on_punch = function(pos, node, puncher)
ee5c6c 295               technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_half_white_active")
37d9d9 296            end
K 297 })
298
299 minetest.register_node('technic:homedecor_glowlight_half_white_active', {
300     description = S("White Glowlight (thick)"),
301     drawtype = "nodebox",
302     tiles = {
303         'technic_homedecor_glowlight_white_tb.png',
304         'technic_homedecor_glowlight_white_tb.png',
305         'technic_homedecor_glowlight_thick_white_sides.png',
306         'technic_homedecor_glowlight_thick_white_sides.png',
307         'technic_homedecor_glowlight_thick_white_sides.png',
308         'technic_homedecor_glowlight_thick_white_sides.png'
309     },
310         selection_box = {
311                 type = "fixed",
312                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
313         },
314         node_box = {
315                 type = "fixed",
316                 fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
317         },
318
319     sunlight_propagates = false,
320     paramtype = "light",
321     paramtype2 = "facedir",
322     walkable = true,
a8daa4 323     light_source = minetest.LIGHT_MAX,
37d9d9 324     sounds = default.node_sound_wood_defaults(),
K 325
326     groups = { snappy = 3, not_in_creative_inventory=1},
327     drop="technic:homedecor_glowlight_half_white",
328     on_place = function(itemstack, placer, pointed_thing)
329         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
330         return itemstack
331          end,
332     on_construct = function(pos)
ee5c6c 333               technic.inductive_on_construct(pos, 100, "White Glowlight (thick)")
37d9d9 334                end,
K 335     on_punch = function(pos, node, puncher)
ee5c6c 336               technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_half_white")
37d9d9 337            end
K 338 })
339
340 -- White -- Quarter node
341 minetest.register_node('technic:homedecor_glowlight_quarter_white', {
342     description = S("White Glowlight (thin)"),
343     drawtype = "nodebox",
344     tiles = {
345         'technic_homedecor_glowlight_white_tb.png',
346         'technic_homedecor_glowlight_white_tb.png',
347         'technic_homedecor_glowlight_thin_white_sides.png',
348         'technic_homedecor_glowlight_thin_white_sides.png',
349         'technic_homedecor_glowlight_thin_white_sides.png',
350         'technic_homedecor_glowlight_thin_white_sides.png'
351     },
352         selection_box = {
353                 type = "fixed",
354                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
355         },
356         node_box = {
357                 type = "fixed",
358                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
359         },
360
361     sunlight_propagates = false,
362     paramtype = "light",
363     paramtype2 = "facedir",
364     walkable = true,
365     sounds = default.node_sound_wood_defaults(),
366
367     groups = { snappy = 3 },
368     on_place = function(itemstack, placer, pointed_thing)
369         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
370         return itemstack
371          end,
372     on_construct = function(pos)
ee5c6c 373               technic.inductive_on_construct(pos, 100, "White Glowlight (thin)")
37d9d9 374                end,
K 375     on_punch = function(pos, node, puncher)
ee5c6c 376               technic.inductive_on_punch_off(pos, 100, "technic:homedecor_glowlight_quarter_white_active")
37d9d9 377            end
K 378 })
379
380 minetest.register_node('technic:homedecor_glowlight_quarter_white_active', {
381     description = S("White Glowlight (thin)"),
382     drawtype = "nodebox",
383     tiles = {
384         'technic_homedecor_glowlight_white_tb.png',
385         'technic_homedecor_glowlight_white_tb.png',
386         'technic_homedecor_glowlight_thin_white_sides.png',
387         'technic_homedecor_glowlight_thin_white_sides.png',
388         'technic_homedecor_glowlight_thin_white_sides.png',
389         'technic_homedecor_glowlight_thin_white_sides.png'
390     },
391         selection_box = {
392                 type = "fixed",
393                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
394         },
395         node_box = {
396                 type = "fixed",
397                 fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
398         },
399
400     sunlight_propagates = false,
401     paramtype = "light",
402     paramtype2 = "facedir",
403     walkable = true,
a8daa4 404     light_source = minetest.LIGHT_MAX-1,
37d9d9 405     sounds = default.node_sound_wood_defaults(),
K 406
407     groups = { snappy = 3, not_in_creative_inventory=1},
408     drop="technic:homedecor_glowlight_quarter_white",
409     on_place = function(itemstack, placer, pointed_thing)
410         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
411         return itemstack
412          end,
413     on_construct = function(pos)
ee5c6c 414               technic.inductive_on_construct(pos, 100, "White Glowlight (thin)")
37d9d9 415                end,
K 416     on_punch = function(pos, node, puncher)
ee5c6c 417               technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_quarter_white")
37d9d9 418            end
K 419 })
420
421 -- Glowlight "cubes" - yellow
422 minetest.register_node('technic:homedecor_glowlight_small_cube_yellow', {
423     description = S("Yellow Glowlight (small cube)"),
424     drawtype = "nodebox",
425     tiles = {
426         'technic_homedecor_glowlight_cube_yellow_tb.png',
427         'technic_homedecor_glowlight_cube_yellow_tb.png',
428         'technic_homedecor_glowlight_cube_yellow_sides.png',
429         'technic_homedecor_glowlight_cube_yellow_sides.png',
430         'technic_homedecor_glowlight_cube_yellow_sides.png',
431         'technic_homedecor_glowlight_cube_yellow_sides.png'
432     },
433         selection_box = {
434                 type = "fixed",
435                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
436         },
437         node_box = {
438                 type = "fixed",
439                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
440         },
441
442     sunlight_propagates = false,
443     paramtype = "light",
444     paramtype2 = "facedir",
445     walkable = true,
446     sounds = default.node_sound_wood_defaults(),
447
448     groups = { snappy = 3 },
449     on_place = function(itemstack, placer, pointed_thing)
450         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
451         return itemstack
452          end,
453     on_construct = function(pos)
ee5c6c 454               technic.inductive_on_construct(pos, 50, "Yellow Glowlight (small cube)")
37d9d9 455                end,
K 456     on_punch = function(pos, node, puncher)
ee5c6c 457               technic.inductive_on_punch_off(pos, 50, "technic:homedecor_glowlight_small_cube_yellow_active")
37d9d9 458            end
K 459 })
460
461 minetest.register_node('technic:homedecor_glowlight_small_cube_yellow_active', {
462     description = S("Yellow Glowlight (small cube)"),
463     drawtype = "nodebox",
464     tiles = {
465         'technic_homedecor_glowlight_cube_yellow_tb.png',
466         'technic_homedecor_glowlight_cube_yellow_tb.png',
467         'technic_homedecor_glowlight_cube_yellow_sides.png',
468         'technic_homedecor_glowlight_cube_yellow_sides.png',
469         'technic_homedecor_glowlight_cube_yellow_sides.png',
470         'technic_homedecor_glowlight_cube_yellow_sides.png'
471     },
472         selection_box = {
473                 type = "fixed",
474                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
475         },
476         node_box = {
477                 type = "fixed",
478                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
479         },
480
481     sunlight_propagates = false,
482     paramtype = "light",
483     paramtype2 = "facedir",
484     walkable = true,
a8daa4 485     light_source = minetest.LIGHT_MAX-1,
37d9d9 486     sounds = default.node_sound_wood_defaults(),
K 487
488     groups = { snappy = 3, not_in_creative_inventory=1},
e64994 489     drop="technic:homedecor_glowlight_small_cube_yellow",
37d9d9 490     on_place = function(itemstack, placer, pointed_thing)
K 491         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
492         return itemstack
493          end,
494     on_construct = function(pos)
ee5c6c 495               technic.inductive_on_construct(pos, 50, "Yellow Glowlight (small cube)")
37d9d9 496                end,
K 497     on_punch = function(pos, node, puncher)
ee5c6c 498               technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_small_cube_yellow")
37d9d9 499            end
K 500 })
501
502 -- Glowlight "cubes" - white
503 minetest.register_node('technic:homedecor_glowlight_small_cube_white', {
504     description = S("White Glowlight (small cube)"),
505     drawtype = "nodebox",
506     tiles = {
507         'technic_homedecor_glowlight_cube_white_tb.png',
508         'technic_homedecor_glowlight_cube_white_tb.png',
509         'technic_homedecor_glowlight_cube_white_sides.png',
510         'technic_homedecor_glowlight_cube_white_sides.png',
511         'technic_homedecor_glowlight_cube_white_sides.png',
512         'technic_homedecor_glowlight_cube_white_sides.png'
513     },
514         selection_box = {
515                 type = "fixed",
516                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
517         },
518         node_box = {
519                 type = "fixed",
520                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
521         },
522
523     sunlight_propagates = false,
524     paramtype = "light",
525     paramtype2 = "facedir",
526     walkable = true,
527     sounds = default.node_sound_wood_defaults(),
528
529     groups = { snappy = 3 },
530     on_place = function(itemstack, placer, pointed_thing)
531         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
532         return itemstack
533          end,
534     on_construct = function(pos)
ee5c6c 535               technic.inductive_on_construct(pos, 50, "White Glowlight (small cube)")
37d9d9 536                end,
K 537     on_punch = function(pos, node, puncher)
ee5c6c 538               technic.inductive_on_punch_off(pos, 50, "technic:homedecor_glowlight_small_cube_white_active")
37d9d9 539            end
K 540 })
541
542 minetest.register_node('technic:homedecor_glowlight_small_cube_white_active', {
543     description = S("White Glowlight (small cube)"),
544     drawtype = "nodebox",
545     tiles = {
546         'technic_homedecor_glowlight_cube_white_tb.png',
547         'technic_homedecor_glowlight_cube_white_tb.png',
548         'technic_homedecor_glowlight_cube_white_sides.png',
549         'technic_homedecor_glowlight_cube_white_sides.png',
550         'technic_homedecor_glowlight_cube_white_sides.png',
551         'technic_homedecor_glowlight_cube_white_sides.png'
552     },
553         selection_box = {
554                 type = "fixed",
555                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
556         },
557         node_box = {
558                 type = "fixed",
559                 fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
560         },
561
562     sunlight_propagates = false,
563     paramtype = "light",
564     paramtype2 = "facedir",
565     walkable = true,
a8daa4 566     light_source = minetest.LIGHT_MAX-1,
37d9d9 567     sounds = default.node_sound_wood_defaults(),
K 568
569     groups = { snappy = 3, not_in_creative_inventory=1},
e64994 570     drop="technic:homedecor_glowlight_small_cube_white",
37d9d9 571     on_place = function(itemstack, placer, pointed_thing)
K 572         technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
573         return itemstack
574          end,
575     on_construct = function(pos)
ee5c6c 576               technic.inductive_on_construct(pos, 50, "White Glowlight (small cube)")
37d9d9 577                end,
K 578     on_punch = function(pos, node, puncher)
ee5c6c 579               technic.inductive_on_punch_on(pos, 0, "technic:homedecor_glowlight_small_cube_white")
37d9d9 580            end
K 581 })
582
ee5c6c 583 technic.register_inductive_machine("technic:homedecor_glowlight_half_yellow")
K 584 technic.register_inductive_machine("technic:homedecor_glowlight_half_white")
585 technic.register_inductive_machine("technic:homedecor_glowlight_quarter_yellow")
586 technic.register_inductive_machine("technic:homedecor_glowlight_quarter_white")
587 technic.register_inductive_machine("technic:homedecor_glowlight_small_cube_yellow")
588 technic.register_inductive_machine("technic:homedecor_glowlight_small_cube_white")