Electric Trains


Adds electric trains.

Content
a month ago
0.16 - 2.0
64.3K
Trains

b Can't exit in automatic mode

5 years ago

Hi, when I go to a station in the train on auto mode, and the train makes a full halt, I'm no longer able to exit the vehicle. please look into it.
Sincerely KaosKanone

1 year, 9 months ago

I'm having a similar issue, especially when the stop is unpowered.

1 year, 8 months ago

I've never been able to figure this one out, it appears to be related to the EEI's existence (since the moment charging finishes it becomes possible to enter or exit a stopped locomotive). Travelling in a wagon isn't an issue, nor exiting locomotives once they're fully charged. I will ask the experts over on the Discord for help, hopefully they'll have something.

11 days ago
(updated 11 days ago)

I found a solution for this issue. Just move the EEI one tile away from the center of the locomotive. Line 167:
local charger = game.surfaces[w.surface.index].create_entity{name = "deg-locomotive-charging-dummy", position = math2d.position.add(w.position, math2d.vector.from_orientation(w.orientation, 1)), force = w.force}
You can even use alert_icon_shift to have the "no electricity" icon in the center of the locomotive

a day ago

Thank you for pointing this out, I've got it working now. The only issue is alert_icon_shift can't be changed at runtime. Minor issue, but I'm not worried about it. Just being able to get in and out of the locomotive while it's charging is a fix I've wanted since I first made the mod, so thank you for providing a solution.

New response