@@ -57,21 +57,21 @@ jumpdrive.digiline_effector = function(pos, _, channel, msg)
57
57
end
58
58
-- backward compatibility with old less flexible set command
59
59
if msg .key == " x" then
60
- meta :set_int (" x" , value )
60
+ meta :set_int (" x" , jumpdrive . sanitize_coord ( value ) )
61
61
elseif msg .key == " y" then
62
- meta :set_int (" y" , value )
62
+ meta :set_int (" y" , jumpdrive . sanitize_coord ( value ) )
63
63
elseif msg .key == " z" then
64
- meta :set_int (" z" , value )
64
+ meta :set_int (" z" , jumpdrive . sanitize_coord ( value ) )
65
65
elseif msg .key == " radius" then
66
66
if value >= 1 and value <= jumpdrive .config .max_radius then
67
67
meta :set_int (" radius" , value )
68
68
end
69
69
end
70
70
else
71
71
-- API requires integers for coord values, noop for everything else
72
- if is_int (msg .x ) then meta :set_int (" x" , msg .x ) end
73
- if is_int (msg .y ) then meta :set_int (" y" , msg .y ) end
74
- if is_int (msg .z ) then meta :set_int (" z" , msg .z ) end
72
+ if is_int (msg .x ) then meta :set_int (" x" , jumpdrive . sanitize_coord ( msg .x ) ) end
73
+ if is_int (msg .y ) then meta :set_int (" y" , jumpdrive . sanitize_coord ( msg .y ) ) end
74
+ if is_int (msg .z ) then meta :set_int (" z" , jumpdrive . sanitize_coord ( msg .z ) ) end
75
75
if is_int (msg .r ) and msg .r <= jumpdrive .config .max_radius then
76
76
meta :set_int (" radius" , msg .r )
77
77
end
0 commit comments