Import only needed once project

, ,

All files imported from main.lua (and imported from files imported from main.lua, and so on) are compiled into a single pdz file, and import runs the code from the file only once. A second import call from anywhere in the pdz will do nothing.

I've only now read this. I've been religiously adding import statements to the top of each file.

What if I have the same function in different files though? How do I make unambiguous references?