Page 1 of 1

Space Exploration. Remove se-core-fragment-omni

Posted: Fri Oct 21, 2022 2:24 am
by DedMorozzz
Hi all, i'm trying to cleanUp surface and i have a script for that. Everything works good, but not for Core Seam. How to remove this thing?

Code: Select all

    local surface=game.player.surface
    local pos=game.player.position

    area = {{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}
    for _, e in pairs(surface.find_entities_filtered{area=area})
        do
        game.print(e.type.." - ".. e.name)
        
        -- here next values:
        -- cliff - se-core-seam-fissure
        -- resource - se-core-fragment-omni
        -- smoke-with-trigger - se-core-seam-smoke-generator
        
    end

    for _, e in pairs(surface.find_entities_filtered{
        area=area,
        type={"resource","tree","decorative","simple-entity","cliff"}})
        do e.destroy()
    end

    for _, e in pairs(surface.find_entities_filtered{area=area, type="smoke-with-trigger"}) do
        game.print("smoke-with-trigger") 
        game.print(e.can_be_destroyed()) -- here true
        e.destroy()
    end
    for _, e in pairs(surface.find_entities_filtered{
        area=area,
        name={"se-core-fragment-omni"}}) do
            game.print("se-core-fragment-omni") -- do not printed. Script can't not found entity with this name
            e.destroy()
    end

Re: Space Exploration. Remove se-core-fragment-omni

Posted: Sat Oct 22, 2022 8:02 am
by InappropriatePenguin
Even if you were to get the correct name for the seam resource, you'll find that SE will immediately recreate them after they get destroyed (if the chunk they were in is still generated). SE does this in order to make the sealing mechanic works in the way it does, and to make sure players don't permanently lose core seams (unintentionally) when they trim surfaces.

If you're just looking to remove them for your own game, then that will soon be possible via commands.

Re: Space Exploration. Remove se-core-fragment-omni

Posted: Sun Oct 23, 2022 1:28 am
by DedMorozzz
Got it, thank you for answer. So i will waiting for this command

My task is simple - just clean up area, for big factory. And now i can't do that with large size, because i can't remove (or just move) core seams

Re: Space Exploration. Remove se-core-fragment-omni

Posted: Sun Oct 23, 2022 3:21 am
by InappropriatePenguin
Is sealing the seam not adequate? It would allow you to build anything over it without completely losing the seam.

Re: Space Exploration. Remove se-core-fragment-omni

Posted: Sun Oct 23, 2022 5:17 pm
by DedMorozzz
yea, i can do it
i don't know how to seal it with command, but i definitely can do that with crutch: find all seams in area, create rails over core seam + delete this rail
But i believe i can achieve the same with command


How to change seam status with command?