diff --git a/public/images/resources/coal.png b/public/images/resources/coal.png new file mode 100644 index 0000000..ff08ce0 Binary files /dev/null and b/public/images/resources/coal.png differ diff --git a/public/images/resources/gold.png b/public/images/resources/gold.png new file mode 100644 index 0000000..49fc267 Binary files /dev/null and b/public/images/resources/gold.png differ diff --git a/public/images/resources/helium-3.png b/public/images/resources/helium-3.png new file mode 100644 index 0000000..c291166 Binary files /dev/null and b/public/images/resources/helium-3.png differ diff --git a/public/images/resources/hydrogen.png b/public/images/resources/hydrogen.png new file mode 100644 index 0000000..5be2800 Binary files /dev/null and b/public/images/resources/hydrogen.png differ diff --git a/public/images/resources/iron.png b/public/images/resources/iron.png new file mode 100644 index 0000000..04918f2 Binary files /dev/null and b/public/images/resources/iron.png differ diff --git a/public/images/resources/liquid-nitrogen.png b/public/images/resources/liquid-nitrogen.png new file mode 100644 index 0000000..de7ca06 Binary files /dev/null and b/public/images/resources/liquid-nitrogen.png differ diff --git a/public/images/resources/oxygen.png b/public/images/resources/oxygen.png new file mode 100644 index 0000000..dc7271e Binary files /dev/null and b/public/images/resources/oxygen.png differ diff --git a/public/images/resources/sulfuric-acid.png b/public/images/resources/sulfuric-acid.png new file mode 100644 index 0000000..8606970 Binary files /dev/null and b/public/images/resources/sulfuric-acid.png differ diff --git a/public/images/resources/water.png b/public/images/resources/water.png new file mode 100644 index 0000000..2ac40af Binary files /dev/null and b/public/images/resources/water.png differ diff --git a/src/components/ResourceBar.astro b/src/components/ResourceBar.astro index 939ce33..d7afa0c 100644 --- a/src/components/ResourceBar.astro +++ b/src/components/ResourceBar.astro @@ -4,7 +4,6 @@ import { getHighestWeightedLanguage, getLocales, getName } from '../lib/utils/la import { getAllResources } from '../lib/db/resources'; import locationManager from '../lib/classes/managers/LocationManager'; import { Resource } from '../lib/classes/managers/abstract/ResourceManager'; -import SystemManager from '../lib/classes/managers/SystemManager'; const resourceTypes = await getAllResources(); @@ -24,74 +23,98 @@ for(const key of planet.resources.resources) { } ---
-
-
-
-
- {planet instanceof SystemManager ? {planet.data.name} : planet.name} -
-
- {resourceArray.map(res => -
x.id === res.id)?.type ?? "solid"} - data-res-id={res.id} - data-res-amount={res.amount} - data-res-mining-rate={res.perHourMiningRate} - style={(resourceTypes.find(x => x.id === res.id)?.type ?? "solid") === "solid" ? "" : "display: none;"} - > -
- x.id === res.id)?.icon ?? "#"} alt={res.id} /> -
-
-
{getName(lang, 'resources', res.id)}
-
[fetching]
-
-
-
{getName(lang, 'general', 'avaliable')} - {Math.floor(res.amount).toString()}
-
{getName(lang, 'general', 'production')} - {res.perHourMiningRate?.toString() ?? "0"}
-
{getName(lang, 'general', 'capacity')} - {'21372137'}
-
-
- )} -
+ {resourceArray.map(res => +
x.id === res.id)?.type ?? "solid"} + data-res-id={res.id} + data-res-amount={res.amount} + data-res-mining-rate={res.perHourMiningRate} + > + x.id === res.id)?.icon ?? "#"} alt={res.id} class="icon" /> +
+ {getName(lang, 'resources', res.id)} + +
+
+
{getName(lang, 'general', 'avaliable')} - {Math.floor(res.amount).toString()}
+
{getName(lang, 'general', 'production')} - {res.perHourMiningRate?.toString() ?? "0"}
+
{getName(lang, 'general', 'capacity')} - {'21372137'}
+
+
+ )}
\ No newline at end of file