aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/pcnaming.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_luaautomation/pcnaming.lua')
-rw-r--r--advtrains_luaautomation/pcnaming.lua3
1 files changed, 2 insertions, 1 deletions
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