diff options
| author | orwell96 <orwell@bleipb.de> | 2018-08-13 11:27:38 +0200 | 
|---|---|---|
| committer | orwell96 <orwell@bleipb.de> | 2018-08-13 11:27:38 +0200 | 
| commit | 5fad61e9c981115a183527ffe58a7bbe26fea4e7 (patch) | |
| tree | 7cae4779164491e1acac7189d7108c4130d710c6 /advtrains_interlocking/route_prog.lua | |
| parent | 3dc5b28774670b3c7b505f3f6f9603ba683a299e (diff) | |
Fix various bugs found while testing
Diffstat (limited to 'advtrains_interlocking/route_prog.lua')
| -rw-r--r-- | advtrains_interlocking/route_prog.lua | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/advtrains_interlocking/route_prog.lua b/advtrains_interlocking/route_prog.lua index 15c2b6b..498df5f 100644 --- a/advtrains_interlocking/route_prog.lua +++ b/advtrains_interlocking/route_prog.lua @@ -320,12 +320,13 @@ minetest.register_chatcommand("at_rp_back",  			return advtrains.pcall(function()  				local rp = player_rte_prog[pname]  				if rp then -					if #rp.route.tcbpath <= 0 then +					if #rp.route <= 0 then  						return false, "Cannot backtrack when there are no route elements"  					end -					rp.route.tcbpath[#rp.route.tcbpath] = nil +					rp.tmp_locks = rp.route[#rp.route].locks +					rp.route[#rp.route] = nil  					advtrains.interlocking.visualize_route(rp.origin, rp.route, "prog_"..pname) -					return true, "Route section "..(#rp.route.tcbpath+1).." removed."  +					return true, "Route section "..(#rp.route+1).." removed."   				end  				return false, "You are not programming a route!"   			end) | 
