Directory require loading

Things that we aren't going to implement
Post Reply
User avatar
Linver
Fast Inserter
Fast Inserter
Posts: 158
Joined: Wed Jan 09, 2019 2:28 pm
Contact:

Directory require loading

Post by Linver »

Hi, I have ask information about multiple files loading contents inside folder without have the relative path of all single files,
this is post for more information about the discussion:
viewtopic.php?p=465086#p465086

I have see that many mods have the same problem, it happens often that mods have folders with many scripts that all must be loaded (I see that Factorio in base scripts have this situation too).

So I will ask if is possible make a sort of require("all file in folder" or/and "all file in folders/from path") or a sort of command for get list of files in a folder or under a path (not a file content reader).

Thank you for your attention.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Directory require loading

Post by posila »

No. Custom additions to lua interpreter make it even harder to make tools that work with Factorio's data definitions.
In addition, I don't see why this is needed. You only need to add the file to your "list of requires" once.

User avatar
Linver
Fast Inserter
Fast Inserter
Posts: 158
Joined: Wed Jan 09, 2019 2:28 pm
Contact:

Re: Directory require loading

Post by Linver »

Could be useful.
Anyway, thank you for your answer.

Post Reply

Return to “Won't implement”