Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main #2595

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions client/src/hooks/helpers/use-resource-arrivals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import useNextBlockTimestamp from "../useNextBlockTimestamp";

const DONKEY_RESOURCE_TRACKER = 452312848583266388373324160190187140051835877600158453279131187530910662656n;
const LORDS_RESOURCE_TRACKER = 7237005577332262213973186563042994240829374041602535252466099000494570602496n;
const LORDS_AND_DONKEY_RESOURCE_TRACKER = 7689318425915528602346510723233181380881209919202693705745230188025481265152n;

export type ArrivalInfo = {
entityId: ID;
Expand Down Expand Up @@ -69,7 +70,9 @@ const usePlayerArrivals = () => {
// Check if entity has special resource types that don't need weight check
const hasSpecialResources =
ownedResourceTracker?.resource_types === DONKEY_RESOURCE_TRACKER ||
ownedResourceTracker?.resource_types === LORDS_RESOURCE_TRACKER;
ownedResourceTracker?.resource_types === LORDS_RESOURCE_TRACKER ||
ownedResourceTracker?.resource_types === LORDS_AND_DONKEY_RESOURCE_TRACKER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this extra blank line for consistency with the code style



// Determine if entity meets weight requirements
const meetsWeightRequirement = hasSpecialResources || hasMinWeight(id);
Expand All @@ -82,7 +85,6 @@ const usePlayerArrivals = () => {
// Check if entity has resources
const hasResources =
meetsWeightRequirement && !!ownedResourceTracker && ownedResourceTracker.resource_types !== 0n;

// Find matching player structure at position
const playerStructurePosition = playerStructurePositions.find(
(structurePosition) => structurePosition.x === position.x && structurePosition.y === position.y,
Expand Down
Loading