[2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

SWeini
Inserter
Inserter
Posts: 43
Joined: Mon Apr 04, 2022 6:43 am
Contact:

[2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by SWeini »

I'm writing automated tooling to read the whole data dump from json, and I've found a few inconsistencies. These are the changes to documentation to make them match the found data:

AchievementPrototypeWithCondition::objective_condition
must be optional (at least it's missing for "solaris")


LoaderPrototype
shares typename with Loader1x2Prototype
please make LoaderPrototype abstract
and remove it from AnyPrototype (which has 2 entries for type="loader")


SpaceLocationPrototype::gravity_pull
must be optional (at least it's missing from "space-location-unknown")


UtilityConstants::space_platform_default_speed_formula
must be renamed to space_platform_acceleration_expression


CranePartDyingEffect::particle_effects
must be of type CreateParticleTriggerEffectItem or array[CreateParticleTriggerEffectItem]


CursorBoxSpecification::rts_selected
must be renamed to spidertron_remote_selected


CursorBoxSpecification::rts_to_be_selected
must be renamed to spidertron_remote_to_be_selected


MapLocation::direction
must be of type Direction


ProcessionTimeline::audio_events
must be optional


RailPictureSet::rail_endings
must be optional (at least it's missing from "dummy-rail-ramp")


SingleGraphicLayerProcessionBezierControlPoint::frame
must be optional


Sound
must be of type struct or array[SoundDefinition] or FileName


TileTransitionsVariants::main
must be optional


WorkingVisualisations::working_visualisations
must be of type WorkingVisualisation or array[WorkingVisualisation]

At least that is what directly threw exceptions in my face.
curiosity
Filter Inserter
Filter Inserter
Posts: 642
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: [2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by curiosity »

What is CursorBoxSpecification? It's not in the docs. Same for MapLocation and probably some other things in the list.
Bilka
Factorio Staff
Factorio Staff
Posts: 3381
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by Bilka »

LoaderPrototype
shares typename with Loader1x2Prototype
please make LoaderPrototype abstract
and remove it from AnyPrototype (which has 2 entries for type="loader")
Thanks for the note, fixed for the 2.0.12 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.
Bilka
Factorio Staff
Factorio Staff
Posts: 3381
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by Bilka »

SWeini wrote: Thu Oct 24, 2024 4:30 pm TileTransitionsVariants::main
must be optional
Docs updated for 2.0.23.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 311
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by Therenas »

All of these are fixed for the next release, thank for the help!

One exception is this one:
WorkingVisualisations::working_visualisations
must be of type WorkingVisualisation or array[WorkingVisualisation]
I couldn't find anywhere that uses WorkingVisualisation directly, and from the code I don't think that format is supported. Are you sure about this one?

Let me know if there's anything else.
Bilka
Factorio Staff
Factorio Staff
Posts: 3381
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by Bilka »

Therenas wrote: Fri May 09, 2025 9:34 am All of these are fixed for the next release, thank for the help!

One exception is this one:
WorkingVisualisations::working_visualisations
must be of type WorkingVisualisation or array[WorkingVisualisation]
I couldn't find anywhere that uses WorkingVisualisation directly, and from the code I don't think that format is supported. Are you sure about this one?

Let me know if there's anything else.
The working visualisation wouldn't complain if you gave it a single one instead of array, it just loaded nothing (because all working visualisation properties are optional). I fixed that for 2.0.42 so now it enforces the array format.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 311
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by Therenas »

Ah right that's why it looked fine in the code, thanks!
SWeini
Inserter
Inserter
Posts: 43
Joined: Mon Apr 04, 2022 6:43 am
Contact:

Re: [2.0.10] API documentation doesn't match data-raw-dump.json from Space Age

Post by SWeini »

Therenas wrote: Fri May 09, 2025 9:34 am I couldn't find anywhere that uses WorkingVisualisation directly, and from the code I don't think that format is supported. Are you sure about this one?
I can't check that now. I assume that one of the dummy/unknown prototypes had the "wrong" format, which was then ignored as stated by Bilka. You can consider this resolved.
Post Reply

Return to “Resolved Requests”