Draw lines between entities (like roboports do)

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Draw lines between entities (like roboports do)

Post 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?)
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Draw lines between entities (like roboports do)

Post 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.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Post Reply

Return to “Implemented mod requests”