Shuttle Train Refresh

by StefanT

Train management for personal transportation with some new concepts.

Content
25 days ago
1.1 - 2.0
4.51K
Trains

b Broken "get_trains" Deprecated [fixed]

25 days ago

LUA API CHANGES in 2.0 break this completely.

" 577.622 Error MainLoop.cpp:1429: Exception at tick 1231792: The mod Shuttle Train Refresh (2.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ShuttleTrainRefresh::on_lua_shortcut (ID 37)
LuaForce doesn't contain key get_trains.
stack traceback:
[C]: in function 'index'
__ShuttleTrainRefresh
/script/find.lua:25: in function 'findShuttleTrainFor'
ShuttleTrainRefresh/control.lua:72: in function 'callShuttleTrain'
ShuttleTrainRefresh/script/events.lua:93: in function 'onCallShuttleTrain'
ShuttleTrainRefresh/script/events.lua:113: in function <ShuttleTrainRefresh/script/events.lua:105>

2.0 lua changes:
Added LuaTrainManager available through LuaGameScript::train_manager (read).
Added LuaTrainManager::get_trains. Removed LuaSurface::get_trains and LuaForce::get_trains.
Added LuaTrainManager::get_train_stops. Removed LuaSurface::get_train_stops, LuaForce::get_train_stops and LuaGameScript::get_train_stops.

This will need a rewrite to work.

25 days ago

I am able to reproduce the issue, I was going to see about putting a PR up on the github link, but no updates in over a year. So guess we wait for the author.

BTW: Love the mod, thank you StefanT for the work to create it and to keep it up to date. I would love to be able to contribute in times like this if there was a way to do so without potentially conflicting with your recent changes.

25 days ago

Sorry, my bad. Obviously I forgot to push to github for some time. Done now.

Would be great if you open a PR as my time is somewhat limited at the moment.

25 days ago

Thanks StefanT, I will take a look after work and see if I can get a workable PR up.

25 days ago

The update was actually pretty straightforward. PR is up and ready for you.
https://github.com/StefanTT/factorio-ShuttleTrain/pull/10/files

25 days ago

The update was actually pretty straightforward. PR is up and ready for you.
https://github.com/StefanTT/factorio-ShuttleTrain/pull/10/files

Added a review comment to your commit :)
Cheers

25 days ago

Great, thank you! Uploading the new version now.

New response