Indicate existence of CollisionMaskLayer layer-13 etc in json structure

sparr
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Post by sparr »

Currently the json api docs definition of CollisionMaskLayer only mentions layer-13 through layer-55 in the description, which makes them unknown to tools like the factorio modding toolkit.

I would like to see them in the json type options, even if they are flagged as distinct in some way.
kelianmao
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Jan 14, 2021 5:52 pm
Contact:

Re: Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Post by kelianmao »

I also just ran into a similar confusion.

Specifically, the old wiki page for CollisionMask[1] does have info on these layers (maybe added manually?), but the new api website[2] does not.

It technically contains a link to CollisionMaskLayer[3], which does have the info, but this is buried a layer deeper and not immediately obvious (eg there is no explanation that the full list of layers is available inside the link). In fact, it could be explicitly clarified that only the pre-defined layers are accepted, as otherwise you might think you can use any string to define a new layer.

[1] https://wiki.factorio.com/Types/CollisionMask
[2] https://lua-api.factorio.com/latest/typ ... nMask.html
[3] https://lua-api.factorio.com/latest/typ ... Layer.html
curiosity
Filter Inserter
Filter Inserter
Posts: 484
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Post by curiosity »

kelianmao wrote: Sun Sep 15, 2024 12:47 am It technically contains a link to CollisionMaskLayer[3], which does have the info, but this is buried a layer deeper and not immediately obvious (eg there is no explanation that the full list of layers is available inside the link). In fact, it could be explicitly clarified that only the pre-defined layers are accepted, as otherwise you might think you can use any string to define a new layer.
No, that's correct. CollisionMaskLayer describes the layer ID, so it makes sense the additional layer IDs to be mentioned there. And you know it's not any arbirtary string because CollisionMaskLayer's parent type is union, meaning it can only be one of the listed values. Which is why it's important for the additional IDs to be part of the definition, as the OP requests.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Post by Bilka »

This is solved for 2.0.
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”