factorio-blueprint-editor icon indicating copy to clipboard operation
factorio-blueprint-editor copied to clipboard

Implement the other cursorBoxes

Open teoxoy opened this issue 5 years ago • 3 comments

  • [x] underground line pair cursorBox 01123339e5fc49a6b806c5fc728efe3eadc37ad6
  • [x] copy/paste entity settings source entity cursorBox ab7412be95d70630433c56566625bf235630c29c
  • [ ] electricity cursor boxes
  • [ ] logistics cursor boxes (roboport and logistic chests)
  • [ ] beacon affected entities
  • [ ] inserter "connected" entities
  • [ ] red cursor boxes for blocked paint container

teoxoy avatar Nov 03 '18 17:11 teoxoy

I think this is referring to the blue boxes that show up on connected entities:

  1. Blue for electrically connected entities,
  2. White boxes that show up on inserter connected entities (and the yellow triangles indicating inserter direction)
  3. Green boxes on corresponding underground entities.

Is this correct? / Am I missing any?

If so, I think a precursor would be a system to record those connections. I think it would make sense to keep track of those connections separate from the display of the cursors. That way the connection information could also be used for the throughput/bottleneck detector, displaying the "unplugged" warning sign etc.

Maybe this connection recording system is already in place, but given how the underground highlighting code is written my guess is that it's not storring that connection information anywhere.

EphDoering avatar Jul 11 '19 13:07 EphDoering

I have just implemented nr3 in 01123339e5fc49a6b806c5fc728efe3eadc37ad6 and I'm currently getting the copy/paste of entity settings (green cursorBox around source entity).

I don't think we would need to keep track of those connections. The needed position data is in G.bp.entityPositionGrid. I guess it would be helpful in the future for the "unplugged" warning sign but haven't thought how that would work yet.

I feel like there is logic code everywhere - as the project progressed, it got out of hand and I'm looking into refactoring it using an ECS (Entity Component System). Not sure when or if I will do it but ECS looks quite interesting. This is not really related to this issue but it's just something that is bothering me. :)

teoxoy avatar Jul 11 '19 14:07 teoxoy

A few cursor boxes were missing from your comment so I made a check list in the issue body that you can refer to.

teoxoy avatar Jul 11 '19 14:07 teoxoy