How to revive ghosts from a blueprint
Posted: Sat Nov 21, 2020 10:45 pm
I want to modify a mod script that's placing a blueprint on a surface, so that instead of ghosts it would place real entities. I believe this is the part that's responsible for placing down the blueprint
so I tried modifying it like this
Doesn't work. I'm out of ideas at this point. The API documentation for Factorio also seems not very helpful, I have no idea how anyone could possibly find anything there. I was looking for the definition of build_blueprint for like an hour and couldn't find it, I have no clue which class I should be looking at. A search bar would do wonders
Code: Select all
local entitiesBuilt = blueprint.build_blueprint{
surface=surface, force=entity.force, position=chunkMiddle,
force_build=true, skip_fog_of_war=false, direction=direction
}
Code: Select all
local entitiesBuilt = blueprint.build_blueprint{
surface=surface, force=entity.force, position=chunkMiddle,
force_build=true, skip_fog_of_war=false, direction=direction
}
for (k,v) in pairs(entitiesBuilt) do
if v~=nil then v.revive() end
end