[0.17.79] util table inside util.lua is global
Posted: Wed Jan 08, 2020 1:59 am
inside the `util.lua` file, the `util` table is defined global and later on returned to use in the files, where it is required from. For me, that makes no sence, it should be either a local table or not getting returned.
Every other file in the lualib has local tables, that getting returned. Or dont have a return, so the global variables can be used
Table definition: (line 1-4)
Return of the table (lane 427)
Edit: `mod-gui.lua`, `production-score.lua` and `silo-script` also have a return and global tables, where everything is defined. And most others, have the variables local and return them. It is no big issue, but a weird inconsistency.
Every other file in the lualib has local tables, that getting returned. Or dont have a return, so the global variables can be used

Table definition: (line 1-4)
Code: Select all
util =
{
table = {}
}
Code: Select all
return util