Reverse rolling stock orientation

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

Reverse rolling stock orientation

Post by sparr »

I want to be able to write to .orientation, specifically the opposite of its current orientation, for rolling stock and get the same result as doing a [R]otate GUI interaction with it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Reverse rolling stock orientation

Post by Rseding91 »

You can already do that by calling entity.rotate() on any rolling stock.
If you want to get ahold of me I'm almost always on Discord.

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Reverse rolling stock orientation

Post by sparr »

That means my entity-rotation code needs a special case for rolling stock, the only smooth-orientable entity that doesn't allow reversing by writing to .orientation :/

Post Reply

Return to “Already exists”