Space Exploration. Remove se-core-fragment-omni

Place to get help with not working mods / modding interface.
Post Reply
DedMorozzz
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Oct 20, 2022 12:17 am
Contact:

Space Exploration. Remove se-core-fragment-omni

Post 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
Attachments
factorio-core-seam.jpg
factorio-core-seam.jpg (303.17 KiB) Viewed 1719 times

InappropriatePenguin
Inserter
Inserter
Posts: 29
Joined: Mon Sep 13, 2021 6:53 pm
Contact:

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

Post 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.

DedMorozzz
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Oct 20, 2022 12:17 am
Contact:

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

Post 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

InappropriatePenguin
Inserter
Inserter
Posts: 29
Joined: Mon Sep 13, 2021 6:53 pm
Contact:

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

Post by InappropriatePenguin »

Is sealing the seam not adequate? It would allow you to build anything over it without completely losing the seam.

DedMorozzz
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Oct 20, 2022 12:17 am
Contact:

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

Post 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?

Post Reply

Return to “Modding help”