diff options
author | cheapie <no-email-for-you@example.com> | 2020-04-30 01:20:36 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2020-04-30 01:20:36 -0500 |
commit | d04056b1f89f5506decbc90e2a044ec136ef6944 (patch) | |
tree | 20fe14743a4925447b80d66a7cc7fdcc4df204a3 | |
parent | d88a0595f7d083c7820569e17be0b281ffd9eb27 (diff) | |
download | rgblightstone-d04056b1f89f5506decbc90e2a044ec136ef6944.tar rgblightstone-d04056b1f89f5506decbc90e2a044ec136ef6944.tar.gz rgblightstone-d04056b1f89f5506decbc90e2a044ec136ef6944.tar.bz2 rgblightstone-d04056b1f89f5506decbc90e2a044ec136ef6944.tar.xz rgblightstone-d04056b1f89f5506decbc90e2a044ec136ef6944.zip |
Add compatibility with digistuff's channel copier
-rw-r--r-- | init.lua | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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]") |