Icon paths are not available in Factorio's runtime stage, so we must
resort to getting them in the data stage. Unfortunately data structures
in the data stage are a bit messy, so we need to apply some heuristics
to map icons into the prototypes that we get in the runtime stage. We
add an icon property to a prototype if it's name and object_name or
type match the section names and section element names in data.raw.
Incompatible change: To avoid double parsing,
FactorioExporter::export now returns a serde_yaml::Value instead of
a String.
Icon paths are not available in Factorio's runtime stage, so we must resort to getting them in the data stage. Unfortunately data structures in the data stage are a bit messy, so we need to apply some heuristics to map icons into the prototypes that we get in the runtime stage. We add an icon property to a prototype if it's
name
andobject_name
ortype
match the section names and section element names indata.raw
.Incompatible change: To avoid double parsing,
FactorioExporter::export
now returns aserde_yaml::Value
instead of aString
.