Merge branch 'feature/harvest-label'
@@ -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 "/shared2
import { MessageType, GAIT, CHUNK_SIZE, STATIC_CHUNK_RADIUS } from "/shared/protocol/constants.js";2
import { MessageType, GAIT, CHUNK_SIZE, STATIC_CHUNK_RADIUS } from "/shared/protocol/constants.js";3
import { validateCharacterNames } from "/shared/characters/names.js";3
import { validateCharacterNames } from "/shared/characters/names.js";4
import { COMBAT_RANGE_TILES } from "/shared/spells/constants.js";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
import { OVERWORLD_ID } from "/shared/world/dimensions.js";6
import { OVERWORLD_ID } from "/shared/world/dimensions.js";7
import { findPathToNearestGoal } from "/shared/navigation/bfs.js";7
import { findPathToNearestGoal } from "/shared/navigation/bfs.js";8
import { isAdjacentTile } from "/shared/navigation/adjacency.js";8
import { 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
}