aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2024-12-01 23:54:44 +0100
committerorwell <orwell@bleipb.de>2024-12-01 23:54:44 +0100
commitfc13e732224f935bc558902e878e81a40afe4713 (patch)
tree4d2ef7487bc88efbea78ffc3b3c41df24072ba43
parentc081129fe040d2dd62d36777ec5eeae315fd0928 (diff)
downloadadvtrains-fc13e732224f935bc558902e878e81a40afe4713.tar.gz
advtrains-fc13e732224f935bc558902e878e81a40afe4713.tar.bz2
advtrains-fc13e732224f935bc558902e878e81a40afe4713.zip
Stoprail: Don'T replace station name if the field is empty
-rw-r--r--advtrains_line_automation/stoprail.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains_line_automation/stoprail.lua b/advtrains_line_automation/stoprail.lua
index 6c74a3d..2c96d6c 100644
--- a/advtrains_line_automation/stoprail.lua
+++ b/advtrains_line_automation/stoprail.lua
@@ -104,7 +104,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
end
local stn = advtrains.lines.stations[stdata.stn]
- if stn and fields.stnname and fields.stnname ~= stn.name then
+ if stn and fields.stnname and fields.stnname~="" and fields.stnname ~= stn.name then
if (stn.owner == pname or minetest.check_player_privs(pname, "train_admin")) then
stn.name = fields.stnname
else