Page 1 of 1

orders ?

Posted: Sun Apr 03, 2016 12:44 pm
by binbinhfr
Hi,

I really have problems to understand how this "order" feature works...

example :

Code: Select all

  {
    type = "mining-tool",
    name = "steel-axe",
    icon = "__base__/graphics/icons/steel-axe.png",
    flags = {"goes-to-main-inventory"},
    (...)
    subgroup = "tool",
    order = "a[mining]-b[steel-axe]",
    flags = {"goes-to-main-inventory"},
    (...)
  }
can someone explain me this order example, and what result is expected ?

thanks.

Re: orders ?

Posted: Sun Apr 03, 2016 5:00 pm
by DaveMcW
The text in brackets [] is ignored. So it really means:

["mining-tool"].order = "a-b"
["repair-pack"].order = "b-a"

So in the tool subgroup, mining-tool comes before repair-pack.

Re: orders ?

Posted: Sun Apr 03, 2016 5:17 pm
by binbinhfr
but what does a and b means or stand for ?

And what does mean "a-a" ? or "a-k" ? or "b-b-a" ? you find these orders sometimes...

And if the brakets are useless, what is their meaning ??? because you always see them appearing...

Re: orders ?

Posted: Sun Apr 03, 2016 5:21 pm
by DaveMcW
It is simple alphabetical order.

Re: orders ?

Posted: Sun Apr 03, 2016 8:55 pm
by binbinhfr
b-b-a is simple alphabet order ? well I must admit I still not understand.

Re: orders ?

Posted: Sun Apr 03, 2016 9:15 pm
by DaveMcW
Put the following strings in a spreadsheet:

a-b
a-a
b-b-a
b-c
b-b

Sort the column. The result is the final order.