[1.1.1] The scale parameter in icon doesn't work?

Things that we don't consider worth fixing at this moment.
yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

[1.1.1] The scale parameter in icon doesn't work?

Post by yagaodirac »

icons = {
{
icon = "some file name",
icon_size = 64,
tint = {r = 0.2,g= 0.8,b=0.2,a=1}
},
{
icon ="some file name",
icon_size = 64,
scale = 0.5, ------------this 0.5 behave the same as 1, according to my eyesight.
},
} ,

I have to assign it to 0.3 to actually make it a little bit smaller than 1. But the relationship looks what 0.3 to 0.5.
posila
Factorio Staff
Factorio Staff
Posts: 5409
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [1.1.1] The scale parameter in icon doesn't work?

Post by posila »

It does, but has different behavior, than in sprite definitions.
If you don't specify it, scale will be inferred based on icon_size. For icon_size = 64, the inferred scale would be 0.5 (because internally the icons are expected to be 32x32px), so setting scale = 0.5 does nothing different.
yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: [1.1.1] The scale parameter in icon doesn't work?

Post by yagaodirac »

posila wrote: Wed Dec 02, 2020 6:10 am It does, but has different behavior, than in sprite definitions.
If you don't specify it, scale will be inferred based on icon_size. For icon_size = 64, the inferred scale would be 0.5 (because internally the icons are expected to be 32x32px), so setting scale = 0.5 does nothing different.
Oh, interesting. I didn't test what 1 does for me in that field. So, plz add this detail into the docs. By the way, is it possible to but the sprites not from 0,0? If I prepare a circle and cut it into 4 parts, and assemble them with squares, emmm, Shapez.io with Factorio api. Good.
Post Reply

Return to “Won't fix.”