Make definition of drawing polygon easier

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Make definition of drawing polygon easier

Post by darkfrei »

Hi devs!

Linked thread: viewtopic.php?t=80171

Can you please set the shape definition easier?

How it loos like now:

Code: Select all

vertices= 
{
	{target={0, 0}},
	{target={8, 0}},
	{target={4, 4}},
	{target={12, 8}}
}
How I expected it must be:

Code: Select all

vertices= 
{
	{0, 0},
	{8, 0},
	{4, 4},
	{12, 8}
}
And call the polygon:
https://lua-api.factorio.com/latest/Lua ... aw_polygon

Code: Select all

rendering.draw_polygon
{
	color=color,
	vertices = vertices,
	surface=surface
}

Post Reply

Return to “Modding interface requests”