Page 1 of 1

[Request] Allow container entities to be rotated

Posted: Sat Dec 20, 2014 8:48 pm
by sillyfly
After asking this: https://forums.factorio.com/forum/vie ... =25&t=7432
I have come to understand it is not currently possible to make a container entity rotatable.
The request is therefore to allow container-type entities to be rotated. Possibly - make all entities have directional sprite definition :)

I would be happy to know even if you don't plan to make this possible, so I can think of a workaround.

Thanks!

Re: [Request] Allow container entities to be rotated

Posted: Sun Jan 04, 2015 1:10 am
by Degraine
The devs plan to make a modular entity whose properties can all be defined in lua (so you could make a splitter that requires power, for instance), so this should be possible regardless of which entity you want to use.

Eventually.

Re: [Request] Allow container entities to be rotated

Posted: Sun Jan 04, 2015 1:14 am
by sillyfly
Good to know. Thanks!

Re: [Request] Allow container entities to be rotated

Posted: Fri Jun 08, 2018 2:53 pm
by xng
3.5 years in the future (June 2018): Is this possible yet?

Re: [Request] Allow container entities to be rotated

Posted: Sat Jun 09, 2018 9:16 am
by Rseding91
xng wrote:3.5 years in the future (June 2018): Is this possible yet?
No and I doubt it ever will be. Adding rotation support to containers currently serves no purpose because they act the same in all directions in the base game. Additionally it would add data to the save file even when not used for every container on the map.

Unless someone can come up with a very compelling reason I’d mark this as won’t implement.

Re: [Request] Allow container entities to be rotated

Posted: Sat Jun 09, 2018 9:34 am
by darkfrei
Rseding91 wrote:Unless someone can come up with a very compelling reason I’d mark this as won’t implement.
Why 2x1 and 1x2 containers cannot be same entities? just allow_rotation = true for some not square entities

Re: [Request] Allow container entities to be rotated

Posted: Sat Jun 09, 2018 4:20 pm
by Rseding91
darkfrei wrote:
Rseding91 wrote:Unless someone can come up with a very compelling reason I’d mark this as won’t implement.
Why 2x1 and 1x2 containers cannot be same entities? just allow_rotation = true for some not square entities
That's not how any of this works :P If an entity type supports orientation then all entities of that type must support it, have the property runtime even if they don't use it and store it in the save file even if it's not used.

Re: [Request] Allow container entities to be rotated

Posted: Sat Jun 09, 2018 6:46 pm
by eradicator
This may be the totally most ugly hack i ever concieved...but what about something i'd call "rotational_variants".

You define i.e. 4 standard chests:

Code: Select all

data:extend {
 {
 type = 'container',
 name ='my-chest-n',
 },
 {
 type = 'container',
 name ='my-chest-e',
 },
 {
 type = 'container',
 name ='my-chest-s',
 },
 {
 type = 'container',
 name ='my-chest-w',
 },
}
and then for each of those you define what other prototype is used when a rotation attempt is made:

Code: Select all

 {
 type = 'container',
 name ='my-chest-n',
 rotational_variants = {
  north = 'my-chest-n',
  south = 'my-chest-s',
  east = 'my-chest-e',
  west = 'my-chest-w',
  }
 },
This way the actual prototypes stay the same, and only when a rotation attempt (pre-placement, post-placement, blueprint, etc) is made the engine can look up if the entity has rotational_variants and replace accordingly. Could even work for other types that don't inheritly support rotation.

/me awaits appaled reactions and insults