LuaSurface.create_entity{mirroring=true}

Things that already exist in the current mod API
sparr
Smart Inserter
Smart Inserter
Posts: 1521
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

LuaSurface.create_entity{mirroring=true}

Post by sparr »

I would like to be able to do this for all entity types that support mirroring, and also their ghosts.

Code: Select all

/c game.player.surface.create_entity{position={game.player.position.x+5,game.player.position.y},direction=0,force=game.player.force,mirroring=false,recipe="heavy-oil-cracking",name="chemical-plant"} game.player.surface.create_entity{position={game.player.position.x-5, game.player.position.y},direction=0,force=game.player.force,mirroring=true,recipe="heavy-oil-cracking",name="chemical-plant"} game.player.surface.create_entity{position={game.player.position.x+5,game.player.position.y+10},direction=0,force=game.player.force,mirroring=false,recipe="heavy-oil-cracking",name="entity-ghost",ghost_name="chemical-plant"} game.player.surface.create_entity{position={game.player.position.x-5, game.player.position.y+10},direction=0,force=game.player.force,mirroring=true,recipe="heavy-oil-cracking",name="entity-ghost",ghost_name="chemical-plant"}
ahicks
Inserter
Inserter
Posts: 27
Joined: Sat Jul 13, 2024 10:45 pm
Contact:

Re: LuaSurface.create_entity{mirroring=true}

Post by ahicks »

This also sort of falls under my request for flipping blueprints fwiw. Not exactly a duplicate but I will cross-link that since they are related concerns: viewtopic.php?f=28&t=114819
Bilka
Factorio Staff
Factorio Staff
Posts: 3684
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaSurface.create_entity{mirroring=true}

Post by Bilka »

Refer to 132185, this already exists as "mirror".
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Already exists”