mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-05-24 11:50:31 +02:00
apply suggestions
Co-authored-by: OgelGames <olliverdc28@gmail.com>
This commit is contained in:
parent
43ce46afac
commit
a3cba03219
@ -277,19 +277,16 @@ local function digiline_action(pos, _, digiline_channel, msg)
|
|||||||
end
|
end
|
||||||
local channel = meta:get_string("channel")
|
local channel = meta:get_string("channel")
|
||||||
local can_receive = meta:get_int("can_receive")
|
local can_receive = meta:get_int("can_receive")
|
||||||
local t_msg = type(msg)
|
if type(msg) == "string" then
|
||||||
if t_msg == "string" then
|
|
||||||
channel = msg
|
channel = msg
|
||||||
elseif t_msg == "table" then
|
elseif type(msg) == "table" then
|
||||||
if type(msg.channel) == "string" then
|
if type(msg.channel) == "string" then
|
||||||
channel = msg.channel
|
channel = msg.channel
|
||||||
end
|
end
|
||||||
if nil ~= msg.can_receive then
|
if msg.can_receive == 1 or msg.can_receive == true then
|
||||||
if msg.can_receive == 1 or msg.can_receive == true then
|
can_receive = 1
|
||||||
can_receive = 1
|
elseif msg.can_receive == 0 or msg.can_receive == false then
|
||||||
else
|
can_receive = 0
|
||||||
can_receive = 0
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user