Add export_record() or similar method to LuaRecord

PhaSelEza
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Dec 04, 2024 8:56 am
Contact:

Add export_record() or similar method to LuaRecord

Post by PhaSelEza »

Hello Factorio team,

I am developing a mod with the goal of exporting a player's blueprint library to
files, which would allow for easy backups and version control using tools like
Git.

I've found that this is not currently possible due to a limitation in the Lua
API. While a LuaItemStack for a blueprint item can be easily exported to a
string using export_stack(), there is no equivalent function for the LuaRecord
objects that represent blueprints in the library (accessed via
player.blueprints).

Could you please consider adding a function to LuaRecord, similar to
LuaItemStack::export_stack()? A method like LuaRecord::export_record() that
returns the blueprint string would be a perfect solution.

Thank you for your amazing work on the game and for considering this feature
request.
Bilka
Factorio Staff
Factorio Staff
Posts: 3646
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Add export_record() or similar method to LuaRecord

Post by Bilka »

Okay, added LuaRecord::export_record() for 2.0.67.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
PhaSelEza
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Dec 04, 2024 8:56 am
Contact:

Re: Add export_record() or similar method to LuaRecord

Post by PhaSelEza »

Thank you for considering adding this function. I'm really looking forward to the release.
Post Reply

Return to “Implemented mod requests”