Page 1 of 1

Draw lines between entities (like roboports do)

Posted: Fri Aug 12, 2016 11:31 am
by aubergine18
There doesn't seem to be a way to draw lines between related entities during placement, and also when hovering over entity on map, without setting those entities to be logistics network (at which point you get lines to all roboports which would be confusing if the entity being placed is nothing to do with roboports or logistics network)...

Would it be possible to get a new 'entity-network' prototype, something like:

Code: Select all

data:extend {{
  type = 'entity-network',
  name = 'my-network-name',
  color = { r = ..... }, -- defaults to player color
  line_width = 4 -- width of dashed lines, defaults to same width as roboport lines
}}
Then, in entities that belong to that network:

Code: Select all

entity_networks = {
   'my-network-name' = 10, -- max link distance in tiles
   'another-network-name' = 4 
}
(Not sure if the max link distance would be better in the link-network prototype rather than the entity?)

Re: Draw lines between entities (like roboports do)

Posted: Mon Sep 12, 2016 2:57 pm
by aubergine18
Two approaches to drawing lines (neither as good as the vanilla game when it's drawling lines between roboports, but at least now we can draw lines).

EDIT: This still doesn't solve issue of being able to draw lines during placement.