[1.1.107] runtime-api.json set_quick_bar_slot incorrect parameter

Gweneph
Inserter
Inserter
Posts: 45
Joined: Thu Nov 14, 2019 11:51 pm
Contact:

[1.1.107] runtime-api.json set_quick_bar_slot incorrect parameter

Post by Gweneph »

The description of the filter parameter of set_quick_bar_slot says it can accept nil (and indeed I believe that's how you clear it). However, it's not marked optional and nil isn't in the type union:

Code: Select all

    {
      "name": "filter",
      "order": 1,
      "description": "The filter or `nil`.",
      "type": {
        "complex_type": "union",
        "options": [
          "string",
          "LuaItemPrototype",
          "LuaItemStack"
        ],
        "full_format": false
      },
      "optional": false
    }
Rseding91
Factorio Staff
Factorio Staff
Posts: 14413
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.107] runtime-api.json set_quick_bar_slot incorrect parameter

Post by Rseding91 »

That is correct. Optional means you can exclude the parameter and it’s fine. This is not optional and you must give it a value or nil.
If you want to get ahold of me I'm almost always on Discord.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [1.1.107] runtime-api.json set_quick_bar_slot incorrect parameter

Post by Bilka »

But nil should indeed be in the type union, moved to doc requests.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [1.1.107] runtime-api.json set_quick_bar_slot incorrect parameter

Post by Bilka »

Bilka wrote: Fri Apr 19, 2024 1:07 pm But nil should indeed be in the type union, moved to doc requests.
And docs fixed for the next doc release.
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 Requests”