Page 1 of 1

remove\destroy surface

Posted: Sun Mar 03, 2019 1:44 am
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.

Re: remove\destroy surface

Posted: Sun Mar 03, 2019 1:59 am
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)

Re: remove\destroy surface

Posted: Fri Mar 08, 2019 10:53 am
by A.creature
BUMP

Re: remove\destroy surface

Posted: Fri Mar 08, 2019 11:52 am
by Bilka
Moved to modding help.

Re: remove\destroy surface

Posted: Fri Mar 08, 2019 12:53 pm
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

Re: remove\destroy surface

Posted: Tue May 10, 2022 4:16 am
by OrchidAlloy
For future reference, the command would actually be

Code: Select all

/c game.delete_surface("surface_name")