[0.14.3] [rrrola] LUA Packages of scenario arent copied into save.

Bugs that are actually features.
NosBit
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Sep 04, 2016 2:19 pm
Contact:

[0.14.3] [rrrola] LUA Packages of scenario arent copied into save.

Post by NosBit »

It seems like in scenario only the files in root directory and the locales directory are getting copied and this prevents the usage of lua packages.


how to reproduce?

make a file like mypackage/file.lua in scenario and try to require "mypackage.file" and it will fail because the mypackage directory is not in save file.

doing it with any lua file in root directory of scenario works so having file.lua in root directory and doing require "file" works fine.
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [0.14.3] LUA Packages of scenario arent copied into save.

Post by NearlyDutch »

Just encountered this in 14.5, too. Tried to include the stdlib in my scenario for convenience, but require wouldn't work with any lua file not in the root directory of the scenario.
Jan Kadlec
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon May 30, 2016 12:18 pm
Contact:

Re: [0.14.3] [rrrola] LUA Packages of scenario arent copied into save.

Post by Jan Kadlec »

Not a bug - you need to put the packages in the directory "lualib". You can have subdirectories in there.
(This also goes for the directories "locale", "campaign-locale" and "inner-saves").
Loewchen
Global Moderator
Global Moderator
Posts: 9230
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.14.3] [rrrola] LUA Packages of scenario arent copied into save.

Post by Loewchen »

Jan Kadlec wrote:Not a bug - you need to put the packages in the directory "lualib". You can have subdirectories in there.
(This also goes for the directories "locale", "campaign-locale" and "inner-saves").
I move this to Not a Bug then.
Post Reply

Return to “Not a bug”