Right now mods can modify LuaRecords already within the game library, but they can't add, remove, or relocate LuaRecords to, from, or within the library.
This makes the libraries unusable for blind players that can't use the drag and drop library interface. It would therefore be nice if mods could do this management.
I think the least interface change would be to have LuaGameScript.blueprints return a LuaCustomTable like LuaPlayer.mod_settings that allows writes to the table to update the game state.
Similarly, LuaRecord.contents doesn't allow adding, removing, or relocating any of the records within a blueprint book record. If that could also be changed it would allow FactorioAccess to let their players use the game blueprint library with an alternative to the drag and drop interface.
There also doesn't seem to be a way of getting a record into the player cursor. Perhaps LuaPlayer.pipette's PipetteID union could be extended to include LuaRecords? or a LuaRecord.select(playerid) method added?
editable LuaRecord.contents and library tables
Re: editable LuaRecord.contents and library tables
Oh this gets more complicated... because I forgot that blueprint items and records are different. So we'd also like to be able to move a record to be an item in a an inventory and vice-versa. Maybe getters and setters would make more sense. Sorry for requesting half baked...
Although... if assigning to one of the LuaCustomTables with a itemstack automatically converted it that would work for that direction. And if insert accepted a record that would take care of the other direction maybe?
Although... if assigning to one of the LuaCustomTables with a itemstack automatically converted it that would work for that direction. And if insert accepted a record that would take care of the other direction maybe?
