Skip to content

feat(herbrun): allotment & flower patches + on-demand leprechaun compost#494

Open
runsonmypc wants to merge 3 commits into
chsami:developmentfrom
runsonmypc:feat/herb-runner-flowers-allotments
Open

feat(herbrun): allotment & flower patches + on-demand leprechaun compost#494
runsonmypc wants to merge 3 commits into
chsami:developmentfrom
runsonmypc:feat/herb-runner-flowers-allotments

Conversation

@runsonmypc

Copy link
Copy Markdown
Contributor

Summary

Adds optional allotment (2/location) and flower (1/location) patch support to the herb runner, plus on-demand leprechaun compost withdrawal, across the six eligible locations (Ardougne, Catherby, Civitas illa Fortis, Falador, Kourend, Morytania). Herbs-only behavior is unchanged when the new toggles are off.

Changes

  • Allotment/flower phases: per-location HERB → FLOWER → ALLOTMENT state flow; rake/clear/compost/plant/harvest handled per patch type.
  • Reachability: skip unreachable interior allotment tiles; pick the edge tile with a standable neighbour.
  • Nearest tile: select by squared-Euclidean distance so the genuinely-nearest tile wins (Chebyshev ties no longer favour diagonals).
  • Plant retry: only mark a patch done once it confirms Growing; re-rake/re-plant if weeds regrew between clearing and planting.
  • Note-all-produce: note every notable produce type held in quantity > 1, not just the crop currently being harvested.
  • Flower overflow: note before each flower Pick so a bulk yield fits; reclaim only our own dropped limpwurt roots afterward (ownership-filtered, bounded loop).
  • Compost: non-bottomless compost withdrawn on-demand from the tool leprechaun at each location; bottomless still carried from bank.

Testing

Built (./gradlew build -PpluginList=HerbrunPlugin) and run in the debug client against client 2.6.5; the herb → flower → allotment flow completes cleanly across all six locations with no regressions.

Plugin version: 1.2.0.

…ost support

Add optional allotment (2 per location) and flower (1 per location) patch
handling at 6 farming locations. Non-bottomless compost is now withdrawn
on-demand from the tool leprechaun instead of carried from bank.

- AllotmentSeedType/FlowerSeedType enums with level-gated selection
- Phase system (HERB→FLOWER→ALLOTMENT→DONE) per location
- ObjectID tracking for multi-tile allotment patches
- Action-based patch state detection (Rake/Pick/Clear/varbit)
- Produce noting via leprechaun for allotment and flower harvests
- Clean plugin shutdown via Microbot.stopPlugin() on completion
…, plant retry, note all produce

- Allotment tile selection: replace isReachable() (returns true for any same-worldview
  object) with a standable-neighbour check so interior tiles of a multi-tile patch are
  skipped and an actually-reachable edge tile is chosen.
- Pick the nearest tile by squared Euclidean distance instead of WorldPoint.distanceTo
  (Chebyshev), which tied diagonal and orthogonal tiles and broke ties by list order.
- Planting (allotment + flower): only mark the patch done once it is confirmed Growing;
  otherwise leave it pinned and retry, so a plant that fails (weeds regrew between clearing
  and planting, or a missed click) no longer silently gives up.
- Leprechaun noting: note every notable produce type held in quantity > 1 (any grimy herb
  plus allotment/flower produce), not just the crop currently being harvested, so produce
  from an earlier patch can no longer fill the inventory unnoted.
Flower patches harvest in a single action; for limpwurt the multi-root
yield could overflow a near-full inventory and the surplus dropped to the
ground and was lost.

- Note all notable produce via the tool leprechaun before every flower
  Pick, freeing space so the full yield fits.
- After harvest, reclaim only our own dropped limpwurt roots
  (ownership-filtered, bounded loop), noting between pickups to make room.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant