I want to give other mods the ability to look into global objects LTN uses to store requests, deliveries, etc.
LuaRemote seems to pass along global tables just fine.
Now my question is if LuaRemote copies tables or passes a reference. The later would require me to copy all tables i want to pass first so other mods can never change this data.
LuaRemota data encapsulation
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: LuaRemota data encapsulation
It's a copy. Everything else would cause all sorts of weird bugs. And more importantly if cross-mod table linking was possible there would be no point in using the remote interface at all.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: LuaRemota data encapsulation
Thanks for verifying my test results.
I just wanted to be certain remote interface callbacks wouldn't introduce weird error states that are impossible to reproduce.
I just wanted to be certain remote interface callbacks wouldn't introduce weird error states that are impossible to reproduce.
My Mods: mods.factorio.com
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: LuaRemota data encapsulation
And there i was wondering why you were asking on the forum instead of testing yourself.
Another mystery solved.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.