aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/pcnaming.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-11-05 21:01:32 +0100
committerorwell96 <orwell@bleipb.de>2018-11-05 21:01:32 +0100
commit63eedd09471461d48c4e10c81747dbd4ef46d71e (patch)
tree1611f23a9daa6c68e0e9e027455fb2400cf26caa /advtrains_luaautomation/pcnaming.lua
parent7bbe0c2468262fa25990a5bbc92967f9fb924e61 (diff)
downloadadvtrains-63eedd09471461d48c4e10c81747dbd4ef46d71e.tar.gz
advtrains-63eedd09471461d48c4e10c81747dbd4ef46d71e.tar.bz2
advtrains-63eedd09471461d48c4e10c81747dbd4ef46d71e.zip
Allow pcnaming for any signals
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