It specifically happens when attempting to update a blueprint in a players library, and not when attempting to update a blueprint in the game library. While attempting to update the BP in the game library, the mod errors shows. After clicking confirm you are returned to the game load screen.
In the attached save, updating the blueprint in inventory works fine. Updating the blueprint in the game library will crash the running save with a mod error (index local 'bp' (a nil value) and return you to the game load screen. Copy either (or make a new) blueprint in the players personal library and attempt to update that one - you will get the index a nil value error, but will crash the binary to desktop after clicking confirm.
pic
Code: Select all
function on_player_setup_blueprint(e)
local bp = e.stack
--[[
Yes, this is a mod error. It should be something like:
local bp = e.stack or e.record
if not bp then
return
end
The mod error should probably not result in the full crash of Factorio, just the the mod
and running save.
]]
local entities = bp.get_blueprint_entities()
for _, ent in pairs(entities) do
game.print(ent.name)
end
end