remove\destroy surface

Place to get help with not working mods / modding interface.
A.creature
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Mar 09, 2016 6:27 pm
Contact:

remove\destroy surface

Post by A.creature »

Hi, i didn't find any information about how to remove\delete\destroy surfaces created by any mods (etc Factorissimo2)? We deleted this mod but surfaces are still exist with items.
Last edited by A.creature on Fri Mar 08, 2019 11:33 am, edited 3 times in total.
A.creature
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Mar 09, 2016 6:27 pm
Contact:

Re: remove\destroy surface

Post by A.creature »

at this moment i found command how get a name of current surface

Code: Select all

/c game.player.print(game.player.surface.name)
A.creature
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Mar 09, 2016 6:27 pm
Contact:

Re: remove\destroy surface

Post by A.creature »

BUMP
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: remove\destroy surface

Post by Bilka »

Moved to modding help.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: remove\destroy surface

Post by darkfrei »

Code: Select all

surface.clear()
Clears this surface deleting all entities and chunks on it.

Note: This won't clear the surface immediately. It will be cleared at the end of the current tick.
https://lua-api.factorio.com/latest/Lua ... face.clear
OrchidAlloy
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Jan 24, 2020 9:57 pm
Contact:

Re: remove\destroy surface

Post by OrchidAlloy »

For future reference, the command would actually be

Code: Select all

/c game.delete_surface("surface_name")
Post Reply

Return to “Modding help”