From 268a7f8fba3ea97ea05dbc94aca076163edefd3d Mon Sep 17 00:00:00 2001 From: Bob <80072466+cwastche@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:12:53 -0400 Subject: [PATCH] Fix/donkey img (#1717) * Fix console error * Fix donkey img not being rendered in places --- client/src/three/components/ArmyManager.ts | 4 +++- client/src/ui/components/quest/questDetails.tsx | 2 +- client/src/ui/elements/ResourceIcon.tsx | 2 +- sdk/packages/eternum/src/constants/resources.ts | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/three/components/ArmyManager.ts b/client/src/three/components/ArmyManager.ts index 3970d408c..063f24503 100644 --- a/client/src/three/components/ArmyManager.ts +++ b/client/src/three/components/ArmyManager.ts @@ -229,7 +229,9 @@ export class ArmyManager { this.armyModel.mesh.count = count; console.debug(`Setting cached chunk with key: ${chunkKey} and count: ${count} and matrices:`); this.armyModel.mesh.instanceMatrix.needsUpdate = true; - this.armyModel.mesh.instanceColor!.needsUpdate = true; + if (this.armyModel.mesh.instanceColor) { + this.armyModel.mesh.instanceColor.needsUpdate = true; + } this.armyModel.mesh.computeBoundingSphere(); this.updateLabelsForChunk(chunkKey); } diff --git a/client/src/ui/components/quest/questDetails.tsx b/client/src/ui/components/quest/questDetails.tsx index 26a567e14..0b07d5ed3 100644 --- a/client/src/ui/components/quest/questDetails.tsx +++ b/client/src/ui/components/quest/questDetails.tsx @@ -296,7 +296,7 @@ export const questDetails = new Map([
Build a market to produce donkeys. Donkeys are a resource used to transport goods.
{" "}
- +
{" "} Donkeys can transport {EternumGlobalConfig.carryCapacityGram[CapacityConfigCategory.Donkey] / diff --git a/client/src/ui/elements/ResourceIcon.tsx b/client/src/ui/elements/ResourceIcon.tsx index 09803249d..dce484096 100644 --- a/client/src/ui/elements/ResourceIcon.tsx +++ b/client/src/ui/elements/ResourceIcon.tsx @@ -62,7 +62,7 @@ const Components: { [key: string]: Resource } = Object.freeze({ Lords: { component: , name: "Lords" }, Fish: { component: , name: "Fish" }, Wheat: { component: , name: "Wheat" }, - Donkeys: { component: , name: "Donkeys" }, + Donkey: { component: , name: "Donkey" }, Knight: { component: , name: "Knight" }, Crossbowman: { component: , name: "Crossbowman" }, Paladin: { component: , name: "Paladin" }, diff --git a/sdk/packages/eternum/src/constants/resources.ts b/sdk/packages/eternum/src/constants/resources.ts index 2732a3912..70389b1a5 100644 --- a/sdk/packages/eternum/src/constants/resources.ts +++ b/sdk/packages/eternum/src/constants/resources.ts @@ -231,11 +231,11 @@ export const resources: Array = [ ticker: "$DRGNHD", }, { - trait: "Donkeys", + trait: "Donkey", value: 249, colour: "#ec4899", id: 249, - description: "Donkeys.", + description: "Donkey.", img: "https://github.com/BibliothecaForAdventurers/voxel-resources/blob/main/compressed/wheat.gif?raw=true", ticker: "$DONKEY", },