ability to clone cliffs

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

ability to clone cliffs

Post by sparr »

I am cloning entities using surface.create_entity() with parameters taken from existing entities. I can read cliff_orientation from an entity, but I can't pass it to create_entity or write it to the new entity, so I get something like this:

https://i.imgur.com/fBPZLvq.png

I need access to set cliff_orientation for new cliffs, and I might need access to some other info to read from existing cliffs and set on new cliffs.
blueblue
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Tue Apr 11, 2017 7:39 pm
Contact:

Re: ability to clone cliffs

Post by blueblue »

You can pass the cliff orientation to create_entity, though I agree this should be documented in the api. Example:

Code: Select all

/c game.player.surface.create_entity{name="cliff", position=game.player.position, cliff_orientation = "north-to-south"}
unique_2 on discord and mod portal
Post Reply

Return to “Already exists”