mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
Extended export data to cover more icon types (#838)
* Enhance export functionality and add icon reference page - Expanded exported assets to include additional spritesheets and metadata for recipes, signals, technologies, planets, qualities, and entities. - added logging metrics to game logs - Introduced a new Icon Reference page to display available icons with filtering capabilities. - Updated ExportManifest documentation to reflect new asset categories. * Add support for exporting static icons and update metadata handling * -added data export snapshot metrics * Fix HTML attribute syntax in IconReferencePage component * Applied PR sugestions: -removed un needed x === "string"s -removed isntancename / modpack from icon reference and export -logging per line on export -fixed variable names -linting * linted * Shows "no export data available" when no export happens * -single sprite sheet -removed static icons with no prototype * Fix formatting * Rename types to allowedTypes for clarity * -removed duplication check (redundant) -fixed bug overwriting metadata with same name from previous categories * Rename asset keys for consistency in export validation test --------- Co-authored-by: Solar <solar@homelab.local>
This commit is contained in:
1 parent
2235294c59
commit
6733aed3fb
8 files changed
+482
-82
No files matched your search
@@ -11,21 +11,26 @@ export default class ExportManifest {
|
||||
/**
|
||||
* Mapping between known assets and their file names.
|
||||
*
|
||||
* Currently exported assets are
|
||||
* Currently exported assets are:
|
||||
* - settings: JSON of mod settings prototypes.
|
||||
* - prototypes: JSON of all game prototypes except settings.
|
||||
* - item-spritesheet: PNG containing icons from the game.
|
||||
* - item-metadata: JSON of Map entries describing icons in item-spritesheet
|
||||
* - locale: JSON of flattened Map entries of en locale strings from the game.
|
||||
* - spritesheet: Single PNG spritesheet containing all icon categories.
|
||||
* - metadata: JSON array of [name, {x, y, size, category, path?}] entries
|
||||
* describing sprite coordinates and category membership. Categories:
|
||||
* item, recipe, signal, technology, planet, quality, entity, static.
|
||||
*/
|
||||
public assets: Record<string, string>
|
||||
public assets: Record<string, string>,
|
||||
/** ISO 8601 timestamp of when the export was uploaded. */
|
||||
public exportedAt?: string,
|
||||
) { }
|
||||
|
||||
static jsonSchema = Type.Object({
|
||||
"assets": Type.Record(Type.String(), Type.String()),
|
||||
"exportedAt": Type.Optional(Type.String()),
|
||||
});
|
||||
|
||||
static fromJSON(json: Static<typeof ExportManifest.jsonSchema>) {
|
||||
return new this(json.assets);
|
||||
return new this(json.assets, json.exportedAt);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user