Factorio mod that adds a shortcut key to toggle trains between auto and manual
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

control.lua 240B

123456
  1. script.on_event("toggle-train-control", function(event)
  2. local vehicle = game.players[event.player_index].vehicle
  3. if vehicle and vehicle.train then
  4. vehicle.train.manual_mode = not vehicle.train.manual_mode
  5. end
  6. end)