BlueGit

timfa questward

Merge branch 'feature/harvest-label'

timfa Tim Falken · pushed by timfa

Authored 2026-09-04 · 2 months ago

Hash
3e50386be89304cd9d6ae739f63687e6376a27b8
1 file changed +3 −2
client/src/play/main.js +3 −2
@@ -2,7 +2,7 @@ import { defaultLeftClickEntityAction, preferAttackInContextMenu } from "/shared
2 2 import { MessageType, GAIT, CHUNK_SIZE, STATIC_CHUNK_RADIUS } from "/shared/protocol/constants.js";
3 3 import { validateCharacterNames } from "/shared/characters/names.js";
4 4 import { COMBAT_RANGE_TILES } from "/shared/spells/constants.js";
5 import { BlockType, BLOCK_DEFINITIONS, GROUND_DEFINITIONS, normalizeGround, resourceNodeDisplayName, isChopableTreeBlock, isPickablePlantBlock } from "/shared/definitions/tiles.js";
5 import { BlockType, BLOCK_DEFINITIONS, GROUND_DEFINITIONS, normalizeGround, resourceNodeDisplayName, isChopableTreeBlock, isPickablePlantBlock, plantGatherForBlock } from "/shared/definitions/tiles.js";
6 6 import { OVERWORLD_ID } from "/shared/world/dimensions.js";
7 7 import { findPathToNearestGoal } from "/shared/navigation/bfs.js";
8 8 import { isAdjacentTile } from "/shared/navigation/adjacency.js";
@@ -1580,8 +1580,9 @@ function handleRightClick (event, mouseX, mouseY)
1580 1580
1581 1581 if (isPickablePlantTile(view, tile.tileX, tile.tileY))
1582 1582 {
1583 const gather = plantGatherForBlock(blockAt(view, tile.tileX, tile.tileY));
1583 1584 items.push({
1584 label: "Pick",
1585 label: gather?.requiresClippers ? "Harvest" : "Pick",
1585 1586 onSelect: () => requestPick(tile.tileX, tile.tileY)
1586 1587 });
1587 1588 }
@@ -2,7 +2,7 @@ import { defaultLeftClickEntityAction, preferAttackInContextMenu } from "/shared
2import { MessageType, GAIT, CHUNK_SIZE, STATIC_CHUNK_RADIUS } from "/shared/protocol/constants.js";
2import { MessageType, GAIT, CHUNK_SIZE, STATIC_CHUNK_RADIUS } from "/shared/protocol/constants.js";
3import { validateCharacterNames } from "/shared/characters/names.js";
3import { validateCharacterNames } from "/shared/characters/names.js";
4import { COMBAT_RANGE_TILES } from "/shared/spells/constants.js";
4import { COMBAT_RANGE_TILES } from "/shared/spells/constants.js";
5import { BlockType, BLOCK_DEFINITIONS, GROUND_DEFINITIONS, normalizeGround, resourceNodeDisplayName, isChopableTreeBlock, isPickablePlantBlock } from "/shared/definitions/tiles.js";
5import { BlockType, BLOCK_DEFINITIONS, GROUND_DEFINITIONS, normalizeGround, resourceNodeDisplayName, isChopableTreeBlock, isPickablePlantBlock, plantGatherForBlock } from "/shared/definitions/tiles.js";
6import { OVERWORLD_ID } from "/shared/world/dimensions.js";
6import { OVERWORLD_ID } from "/shared/world/dimensions.js";
7import { findPathToNearestGoal } from "/shared/navigation/bfs.js";
7import { findPathToNearestGoal } from "/shared/navigation/bfs.js";
8import { isAdjacentTile } from "/shared/navigation/adjacency.js";
8import { isAdjacentTile } from "/shared/navigation/adjacency.js";
@@ -1580,8 +1580,9 @@ function handleRightClick (event, mouseX, mouseY)
1580
1580
1581 if (isPickablePlantTile(view, tile.tileX, tile.tileY))
1581 if (isPickablePlantTile(view, tile.tileX, tile.tileY))
1582 {
1582 {
1583 const gather = plantGatherForBlock(blockAt(view, tile.tileX, tile.tileY));
1583 items.push({
1584 items.push({
1584 label: "Pick",
1585 label: gather?.requiresClippers ? "Harvest" : "Pick",
1585 onSelect: () => requestPick(tile.tileX, tile.tileY)
1586 onSelect: () => requestPick(tile.tileX, tile.tileY)
1586 });
1587 });
1587 }
1588 }