Skip to content

Commit

Permalink
add on_receive_fields to set digiline channel
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames committed May 23, 2024
1 parent 27e6cfa commit d158d42
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wielder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,13 @@ function pipeworks.register_wielder(def)
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
if not pipeworks.may_configure(pos, player) then return 0 end
return count
end
end,
on_receive_fields = function(pos, _, fields, sender)
if not fields.channel or not pipeworks.may_configure(pos, sender) then
return
end
minetest.get_meta(pos):set_string("channel", fields.channel)
end,
})
end
table.insert(pipeworks.ui_cat_tube_list, def.name.."_off")
Expand Down

0 comments on commit d158d42

Please sign in to comment.