From 63eedd09471461d48c4e10c81747dbd4ef46d71e Mon Sep 17 00:00:00 2001 From: orwell96 Date: Mon, 5 Nov 2018 21:01:32 +0100 Subject: Allow pcnaming for any signals --- advtrains_luaautomation/pcnaming.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'advtrains_luaautomation') diff --git a/advtrains_luaautomation/pcnaming.lua b/advtrains_luaautomation/pcnaming.lua index 8880d53..427585d 100644 --- a/advtrains_luaautomation/pcnaming.lua +++ b/advtrains_luaautomation/pcnaming.lua @@ -43,7 +43,8 @@ minetest.register_craftitem("advtrains_luaautomation:pcnaming",{ minetest.record_protection_violation(pos, pname) return end - if advtrains.is_passive(pos) then + local node = advtrains.ndb.get_node(pos) + if node.name and (minetest.get_item_group(node.name, "advtrains_signal")>0 or advtrains.is_passive(pos)) then --look if this one already has a name local pn="" for name, npos in pairs(atlatc.pcnaming.name_map) do -- cgit v1.2.3