mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33: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
@@ -240,9 +240,9 @@ async function uploadExport(req: Request, res: Response) {
|
||||
let exportFiles = [
|
||||
"export/settings.json",
|
||||
"export/prototypes.json",
|
||||
"export/item-spritesheet.png",
|
||||
"export/item-metadata.json",
|
||||
"export/locale.json",
|
||||
"export/spritesheet.png",
|
||||
"export/metadata.json",
|
||||
];
|
||||
|
||||
let assets: any = {};
|
||||
@@ -263,7 +263,7 @@ async function uploadExport(req: Request, res: Response) {
|
||||
await lib.safeOutputFile(path.join("static", `${name}.${hash}${ext}`), await file.async("nodebuffer"));
|
||||
}
|
||||
|
||||
modPack.exportManifest = new lib.ExportManifest(assets);
|
||||
modPack.exportManifest = new lib.ExportManifest(assets, new Date().toISOString());
|
||||
modPack.fillDefaultSettings(settingPrototypes, logger);
|
||||
res.app.locals.controller.modPacks.set(modPack);
|
||||
|
||||
@@ -701,5 +701,6 @@ export const webRoutes = [
|
||||
"/roles/:id/view",
|
||||
"/plugins",
|
||||
"/plugins/:name/view",
|
||||
"/icon-reference",
|
||||
"/error",
|
||||
];
|
||||
Reference in new issue
Block a user