However this seems to suggest that if a mod adds/removes an entity to the blueprint that the numbers will simply not line up anymore / references entities that aren't in the blueprint anymore / lacks references to existing entities when they get added / etcNote: if any mod changes the blueprint this will be incorrect.
But it seems that even writing the same mapping back to the blueprint causes the mapping to become not just "incorrect", but outright completely empty:
Code: Select all
/c script.on_event(defines.events.on_player_setup_blueprint, function(event)
local blueprint = event.stack
if blueprint == nil then return end
game.print("before: " .. serpent.block(event.mapping.get()))
blueprint.set_blueprint_entities(blueprint.get_blueprint_entities())
game.print("after: " .. serpent.block(event.mapping.get()))
end)
- run command
- place your starting furnace
- ctrl c / blueprint it
- notice the second mapping being empty
It would be nice if it could be mentioned on this event that `set_blueprint_entities` will wipe the mapping and not just make it "incorrect", and on the set_blueprint_entities method a warning to only call if it you have modified the entities since "it can break stuff elsewhere if you write to it needlessly"