[16.15] (Minor & API docs) Technology effect quick-bar-count

This subforum contains all the issues which we already resolved.
Post Reply
Aidiakapi
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Fri Apr 14, 2017 6:13 pm
Contact:

[16.15] (Minor & API docs) Technology effect quick-bar-count

Post by Aidiakapi »

The effect that increases the number of quick bars is called "quick-bar-count", as seen below:

Code: Select all

{
  type = "technology",
  name = "toolbelt",
  effects =
  {
    {
      type = "quick-bar-count",
      modifier = 1
    }
  },
  ...
},
The documentation states it's "quick-bars-count"

Minor typo probably.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.15] (Minor & API docs) Technology effect quick-bar-count

Post by Rseding91 »

Thanks for the report. The prototype name and the Lua API name aren't the same thing.

The page you've linked is purely for the runtime control.lua API and isn't used at all in building prototypes.

Most of the time they'll have the same or very similar names - in this case they differ slightly. But changing it would break every single mod that uses it now so I don't consider it worth changing at this time. Maybe for 0.17.
If you want to get ahold of me I'm almost always on Discord.

Aidiakapi
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Fri Apr 14, 2017 6:13 pm
Contact:

Re: [16.15] (Minor & API docs) Technology effect quick-bar-count

Post by Aidiakapi »

I initially implemented my code using the text it said in the docs "quick-bars-count", but this did not work, in figuring out why, I found it was actually called "quick-bar-count". Both LuaTechnology.effects and LuaTechnologyPrototype.effects (the only two that seem to use the Modifier concept) report it as "quick-bar-count" in-game. See dumps below:

Code: Select all

/c print('proto = ', serpent.block(game.technology_prototypes.toolbelt.effects), 'control = ', serpent.block(game.forces.player.technologies.toolbelt.effects))
proto =         {
  {
    modifier = 1,
    type = "quick-bar-count"
  }
}       control =       {
  {
    modifier = 1,
    type = "quick-bar-count"
  }
}
No mod using "quick-bars-count" would actually function, so I do think it's strictly a typo in the API docs.

Edit: In case I wasn't clear enough, I suggest not changing the game, rather to just remove the one letter from the docs, and save a future mod dev some time and frustration from the game and docs not matching up.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [16.15] (Minor & API docs) Technology effect quick-bar-count

Post by Bilka »

Thank you for the report, I fixed the doc for 0.17.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Resolved Problems and Bugs”