Page 1 of 1

Make definition of drawing polygon easier

Posted: Wed Jan 20, 2021 9:37 am
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
}