diff --git a/package-lock.json b/package-lock.json index 4609fa7..cf907a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,9 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.2", "@tsconfig/svelte": "^5.0.4", + "@types/luxon": "^3.4.2", "immer": "^10.1.1", + "luxon": "^3.5.0", "svelte": "^4.2.19", "svelte-check": "^4.0.4", "tslib": "^2.7.0", @@ -706,6 +708,12 @@ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, + "node_modules/@types/luxon": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.4.2.tgz", + "integrity": "sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==", + "dev": true + }, "node_modules/acorn": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", @@ -912,6 +920,15 @@ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", "dev": true }, + "node_modules/luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/magic-string": { "version": "0.30.12", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", diff --git a/package.json b/package.json index 67a12e3..f1cd9ce 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,9 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.2", "@tsconfig/svelte": "^5.0.4", + "@types/luxon": "^3.4.2", "immer": "^10.1.1", + "luxon": "^3.5.0", "svelte": "^4.2.19", "svelte-check": "^4.0.4", "tslib": "^2.7.0", diff --git a/public/img/icons/time.png b/public/img/icons/time.png new file mode 100644 index 0000000..669413f Binary files /dev/null and b/public/img/icons/time.png differ diff --git a/src/hud/Cost.svelte b/src/hud/Cost.svelte index 9748cb5..1df4200 100644 --- a/src/hud/Cost.svelte +++ b/src/hud/Cost.svelte @@ -1,7 +1,13 @@
@@ -21,6 +27,12 @@ Food { cost.food }
+ { #if duration !== null } +
+ Duration + { prettyDuration } +
+ { /if }