filter allows all when channel is empty, simpler compat

This commit is contained in:
OgelGames
2021-01-25 15:46:34 +11:00
parent 1d37eae1a7
commit de14e9bbc3
4 changed files with 4 additions and 183 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ minetest.register_node("digicontrol:filter", {
semiconductor = {
rules = function(node, pos, _, channel)
local setchannel = minetest.get_meta(pos):get_string("channel")
if channel ~= setchannel then return {} end
if setchannel ~= "" and channel ~= setchannel then return {} end
return {
digicontrol.get_rule(1, node.param2),
digicontrol.get_rule(3, node.param2)