Electric Train 2.0 Fix

by Jtmzac

Basic fix for 2.0 while magu5026 works on the original. I'll remove this once that's been updated. Adds electric locomotives to the game.

Content
5 months ago
2.0
1.91K
Trains
Owner:
Jtmzac
Source:
N/A
Homepage:
N/A
License:
GNU GPLv3
Created:
5 months ago
Latest Version:
1.1.6 (5 months ago)
Factorio version:
2.0
Downloaded by:
1.91K users

ElectricTrain temporary 2.0 fix

Basic fix for 2.0 while magu5026 works on the original. I'll remove this once that's been updated.
https://mods.factorio.com/mod/ElectricTrain

The optional dependencies/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, which can be built freely anywhere.

Train Consumption Speed
E-locomotive 600 KW 259.2 KM/H
E-lolomotive MK2 900 KW 388.8 KM/H
E-lolomotive 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 inhereted from the copied prototype
  • Replaced any uppercase K with lowercase because it is no longer recognised as valid shorthand for kilo unit prefix

All integration with other mods have been commented out