Page 1 of 1

Order Property?

Posted: Tue May 26, 2015 9:37 pm
by Incinirate
In the item properties, I never quite understood what order meant or how it worked. More specifically, what to put for the order. I mean, a-b-c doesn't mean anything to me. Please explain.

Re: Order Property?

Posted: Thu May 28, 2015 6:24 am
by ssilk
It's nothing else, than a sorting string.

a-b-c comes before a-b-d, a-c-c or b-c-d. If you put all sort-strings into a column in a spreadsheet and click on "sort" for that column, this is the order they appear in the item-chooser.

Re: Order Property?

Posted: Thu May 28, 2015 10:37 pm
by Wyrm
I think we need a more concrete example.

Say we want to put the Better Electric Pole between the medium electric pole and the big electric pole, instead of before the medium electric pole as it does now. How do we change this line of prototypes/item/electric-pole.lua

Code: Select all

order = "a[energy]-b[medium-electric-pole]",
to accomplish this?

Re: Order Property?

Posted: Thu May 28, 2015 11:00 pm
by DaveMcW
medium electric pole order = "a-b"
big electric pole order = "a-c"

So "a-b-a" or "a-b-z" will fit between the two.

The brackets are optional and ignored by the game.

Re: Order Property?

Posted: Fri May 29, 2015 11:33 pm
by Wyrm
Ah! So the brackets are like a comment! Good to know!