Skip to content

Commit

Permalink
Fix/donkey img (#1717)
Browse files Browse the repository at this point in the history
* Fix console error

* Fix donkey img not being rendered in places
  • Loading branch information
cwastche committed Sep 25, 2024
1 parent 0c1b928 commit 268a7f8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion client/src/three/components/ArmyManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/ui/components/quest/questDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const questDetails = new Map<QuestId, StaticQuestInfo>([
<div>
<div className="mt-2">Build a market to produce donkeys. Donkeys are a resource used to transport goods.</div>{" "}
<div className="flex flex-row mt-2">
<ResourceIcon size="sm" resource={"Donkeys"} />
<ResourceIcon size="sm" resource={ResourcesIds[ResourcesIds.Donkey]} />
<div>
{" "}
Donkeys can transport {EternumGlobalConfig.carryCapacityGram[CapacityConfigCategory.Donkey] /
Expand Down
2 changes: 1 addition & 1 deletion client/src/ui/elements/ResourceIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Components: { [key: string]: Resource } = Object.freeze({
Lords: { component: <img src={`/images/resources/coin.png`} />, name: "Lords" },
Fish: { component: <img src={`/images/resources/255.png`} />, name: "Fish" },
Wheat: { component: <img src={`/images/resources/254.png`} />, name: "Wheat" },
Donkeys: { component: <img src={`/images/buildings/thumb/trade.png`} />, name: "Donkeys" },
Donkey: { component: <img src={`/images/buildings/thumb/trade.png`} />, name: "Donkey" },
Knight: { component: <img src={`/images/icons/250.png`} />, name: "Knight" },
Crossbowman: { component: <img src={`/images/icons/251.png`} />, name: "Crossbowman" },
Paladin: { component: <img src={`/images/icons/252.png`} />, name: "Paladin" },
Expand Down
4 changes: 2 additions & 2 deletions sdk/packages/eternum/src/constants/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ export const resources: Array<Resources> = [
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",
},
Expand Down

0 comments on commit 268a7f8

Please sign in to comment.