aboutsummaryrefslogtreecommitdiff
path: root/assets/manual_img
diff options
context:
space:
mode:
authorBlockhead <jbis1337@hotmail.com>2024-06-05 04:09:04 +1000
committerorwell <orwell@bleipb.de>2024-08-01 22:02:50 +0200
commit7c4f1377e452134ab9e4addd0f01360dfa72564a (patch)
tree7333b4e60d11c3f82ac14d3208527948429835ad /assets/manual_img
parenta820318ecf209b53f6afd430e6ffb35e91631a4a (diff)
downloadadvtrains-7c4f1377e452134ab9e4addd0f01360dfa72564a.tar.gz
advtrains-7c4f1377e452134ab9e4addd0f01360dfa72564a.tar.bz2
advtrains-7c4f1377e452134ab9e4addd0f01360dfa72564a.zip
Fix section_occupancy: Return empty table
Fixes the functioning of the LuaATC function section_occupancy in the presence of no trains. Currently, if there is no train in the section, advtrains.interlocking.db.get_ts will return a table with a nil entry. When that nil value is passed to table.copy, Minetest throws out an error. Instead of passing nil to table.copy, just make a new empty table.
Diffstat (limited to 'assets/manual_img')
0 files changed, 0 insertions, 0 deletions
t">("train_response","Refilling Input Chests||Shuffling Train") return end return elseif event.msg=="exit" then if atc_speed > 0 then digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed) return elseif not can_set_route(factory_exit_sig,"Exit to Mainline South") then digiline_send("train_response","Unable to set route to:||Mainline South") return else set_route(factory_exit_sig,"Exit to Mainline South") atc_send("R SM") digiline_send("train_response","Train Departing") return end return elseif event.msg=="rehead" then if atc_speed > 0 then digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed) return elseif not can_set_route(factory_exit_sig,"Reverse for loco run-around") then digiline_send("train_response","Unable to set route to:||Loco Run Around Sequence") return else set_route(factory_exit_sig,"Reverse for loco run-around") set_rc("split_around") atc_send("R SM D15 S0 W R S1") digiline_send("train_response","Loco Changind Ends") return end return end return end return end