Electric Train 2.0 Fix

by Jtmzac

Updated for 2.0. Adds electric locomotives to the game.

Content
8 months ago
2.0
3.74K
Trains
Owner:
Jtmzac
Source:
N/A
Homepage:
N/A
License:
GNU GPLv3
Created:
1 year, 3 months ago
Latest Version:
1.1.7 (8 months ago)
Factorio version:
2.0
Downloaded by:
3.74K users

Electric Train 2.0 Fix

Fix for 2.0. Original mod here:
https://mods.factorio.com/mod/ElectricTrain

The optional integrations with a few other mods have been disabled as part of the update.

This mod adds 3 levels of electric trains and 2 improved cargo/fluid wagons.

The trains are supplied by a single control station for each surface/planet. Only the first control station on each surface/planet does anything, do not build multiple on the same planet.


Train Consumption Speed
E-locomotive 600 KW 259.2 KM/H
E-locomotive MK2 900 KW 388.8 KM/H
E-locomotive MK3 1.2 MW 518.4 KM/H

Wagon Capacity Max Speed
Cargo wagon 40 stacks 324 KM/H
Cargo wagon MK2 60 stacks 453.6 KM/H
Cargo wagon MK3 80 stacks 583.2 KM/H
Fluid wagon 50,000 324 KM/H
Fluid wagon MK2 75,000 453.6 KM/H
Fluid wagon MK3 100,000 583.2 KM/H

Changes:
control.lua:

  • Changed old "global" keyword for mod data storage to new keyword "storage"
  • Removed event.created_entity as it seems to be deprecated
  • Replaced game.item_prototypes[] with prototypes.item[]
  • Changed currently_burning.fuel_value to currently_burning.name.fuel_value
  • Commented out some conditions in control.lua to force Init()

prototypes:

  • Updated recipes to new formats
  • Replaced hidden flag with new hidden property
  • Disabled collision mask as its now inherited from the copied prototype
  • Replaced any uppercase K with lowercase because it is no longer recognised as valid shorthand for kilo unit prefix

Integrations with other mods have been commented out/disabled.