editable LuaRecord.contents and library tables
Posted: Tue Jan 06, 2026 12:26 am
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?
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?