summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2020-04-30 01:20:36 -0500
committercheapie <no-email-for-you@example.com>2020-04-30 01:20:36 -0500
commitd04056b1f89f5506decbc90e2a044ec136ef6944 (patch)
tree20fe14743a4925447b80d66a7cc7fdcc4df204a3
parentd88a0595f7d083c7820569e17be0b281ffd9eb27 (diff)
downloadrgblightstone-master.tar
rgblightstone-master.tar.gz
rgblightstone-master.tar.bz2
rgblightstone-master.tar.xz
rgblightstone-master.zip
Add compatibility with digistuff's channel copierHEADmaster
-rw-r--r--init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 36714da..dafaf4d 100644
--- a/init.lua
+++ b/init.lua
@@ -157,6 +157,10 @@ for i=0,14,1 do
paramtype2 = "color",
light_source = i,
drop = "rgblightstone:rgblightstone_0",
+ _digistuff_channelcopier_fieldname = "channel",
+ _digistuff_channelcopier_onset = function(pos)
+ minetest.get_meta(pos):set_string("infotext","")
+ end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "size[8,5;]field[1,1;6,2;channel;Channel;${channel}]field[1,2;2,2;addrx;X Address;${addrx}]field[5,2;2,2;addry;Y Address;${addry}]button_exit[2.25,3;3,1;submit;Save]button_exit[2.25,4;3,1;autofill;Auto-Fill From Node Above]label[3,2;Leave address blank\nfor individual mode]")
@@ -194,6 +198,10 @@ for i=0,14,1 do
description = i == 0 and "True-Color RGB Lightstone" or "True-Color RGB Lightstone (lit state - you hacker you!)",
light_source = i,
drop = "rgblightstone:rgblightstone_truecolor_0",
+ _digistuff_channelcopier_fieldname = "channel",
+ _digistuff_channelcopier_onset = function(pos)
+ minetest.get_meta(pos):set_string("infotext","")
+ end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "size[8,5;]field[1,1;6,2;channel;Channel;${channel}]field[1,2;2,2;addrx;X Address;${addrx}]field[5,2;2,2;addry;Y Address;${addry}]button_exit[2.25,3;3,1;submit;Save]button_exit[2.25,4;3,1;autofill;Auto-Fill From Node Above]label[3,2;Leave address blank\nfor individual mode]")