From fc13e732224f935bc558902e878e81a40afe4713 Mon Sep 17 00:00:00 2001 From: orwell Date: Sun, 1 Dec 2024 23:54:44 +0100 Subject: Stoprail: Don'T replace station name if the field is empty --- advtrains_line_automation/stoprail.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'advtrains_line_automation') 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 -- cgit v1.2.3