Transport Fever 2

Transport Fever 2

Siemens ES64U
lollus 18 Mar, 2020 @ 2:12am
Global variables
Hi guys, this mod, as well as the Re 465 Repaint Set and two signal boxes, add a lot of variables to _G, which is where lua stores its global variables.
You can check this with:
for key, value in pairs(_G) do print(key, value) end
somewhere suitable (eg in an event handler) and look at stdout.
These variables sometimes share the same name across different mods, which can make trouble, and they include large strings with disclaimers.
It looks like some large piece of code has been duplicated across different mods, without the "local" in front of certain declarations.
Last edited by lollus; 18 Mar, 2020 @ 12:27pm