From c74b8f3f03569df9c08735e93fc6ae70aa692afa Mon Sep 17 00:00:00 2001 From: Zee Date: Mon, 19 Feb 2024 09:58:49 +0200 Subject: [PATCH] Write all metadata keys when exporting to C2G --- js/editor/main.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/js/editor/main.js b/js/editor/main.js index 03a1224..812654b 100644 --- a/js/editor/main.js +++ b/js/editor/main.js @@ -508,14 +508,8 @@ export class Editor extends PrimaryView { let lines = []; let safe_title = (stored_pack.title || "untitled").replace(/[""]/g, "'").replace(/[\x00-\x1f]+/g, "_"); lines.push(`game "${safe_title}"`); - if (stored_pack.metadata.by) { - lines.push(`; meta by: ${stored_pack.metadata.by}`); - } - if (stored_pack.metadata.description) { - lines.push(`; meta description: ${stored_pack.metadata.description}`); - } - if (stored_pack.metadata.difficulty) { - lines.push(`; meta difficulty: ${stored_pack.metadata.difficulty}`); + for (let [key, value] of Object.entries(stored_pack.metadata)) { + lines.push(`; meta ${key}: ${value}`) } let files = {};