This is modeled on the existing QuotaPlugin.ScrapeRates facility in Limes. The rate scraping and resource scraping are currently split in Limes, but I intend to merge them into one loop since there never was any benefit from keeping them separate (and it just creates a bunch of useless parallel structures).
The remark about SerializedState not working for liquids that have resources is because, in Limes, serializedState is only carried through ScrapeRates and not through Scrape (the latter of which handles resources).
I also used the opportunity to add some more omitempty in usage reports where they make sense. This is a backwards-compatible change because Limes does not care either way about map fields being omitted or null.
This is modeled on the existing
QuotaPlugin.ScrapeRates
facility in Limes. The rate scraping and resource scraping are currently split in Limes, but I intend to merge them into one loop since there never was any benefit from keeping them separate (and it just creates a bunch of useless parallel structures).The remark about SerializedState not working for liquids that have resources is because, in Limes,
serializedState
is only carried throughScrapeRates
and not throughScrape
(the latter of which handles resources).I also used the opportunity to add some more
omitempty
in usage reports where they make sense. This is a backwards-compatible change because Limes does not care either way about map fields being omitted ornull
.