Skip to content

Stash tabs: withdraw, deposit and click(item) - #65

Merged
ResurrectedTrader merged 1 commit into
mainfrom
stash-withdraw-deposit
Oct 7, 2026
Merged

ResurrectedTrader merged 1 commit into
mainfrom
stash-withdraw-deposit

Conversation

@ResurrectedTrader

Copy link
Copy Markdown
Owner

Summary

Stash tab withdraw / deposit, for tabs that hold one stack per item class (advanced stash tabs):

  • Contract: StashTab::Withdraw(item, count, target) / Deposit(item) and a StashWithdrawTarget enum (cursor, inventory, cube, belt).
  • 1.14d: a plain grid tab supports one withdraw, a count of 1 to the cursor (ClickItem with the cursor empty); everything else returns false.
  • JS: tab.withdraw(item, count = 1, target = StashWithdrawTarget.cursor), tab.deposit(item), tab.click(item) (clicks the cell the item sits on; false for an item on another tab), and the StashWithdrawTarget constants.
  • StashTabType.chronicle is no longer exposed to scripts (no tab reports it). A new /// @internal enumerator marker keeps a value out of extract_api.py's option sets, the API docs and the d.ts.
  • unit.itemcount documents the stack-size reading on an advanced stash tab.

docs/stash_tabs.md and CLAUDE.md follow.

Stack

Stacked on #64 (this PR's base branch); it depends on that change and the ones below it. Merge in order; once the base merges, this PR is retargeted to main (automatically when the merged branch is deleted).

Verification

  • build.ps1 Release (Win32, the 1.14d DLL): builds
  • build.ps1 test: 169/169 pass
  • build.ps1 check-format: clean
  • scripts/gen_enum_names.py --check: up to date

🤖 Generated with Claude Code

@ResurrectedTrader
ResurrectedTrader added this pull request to stack #78 October 6, 2026 23:12
Base automatically changed from contract-typed-values to main October 7, 2026 07:23
An advanced stash tab holds one stack per item class, and items move on
and off it only through dedicated actions, never through grid placement.

- Contract: StashTab::Withdraw(item, count, target) and Deposit(item),
  with a StashWithdrawTarget enum (cursor, inventory, cube, belt).
- 1.14d: a plain grid tab has one withdraw, a count of 1 to the cursor
  (ClickItem on an item of the tab with the cursor empty); any other
  Withdraw and every Deposit return false.
- JS: tab.withdraw(item, count = 1, target = StashWithdrawTarget.cursor),
  tab.deposit(item), and tab.click(item), which clicks the cell an item
  on this tab sits on (false for an item on another tab); the global
  StashWithdrawTarget constants.
- StashTabType.chronicle is no longer exposed to scripts: no tab ever
  reports it. A new `/// @internal` enumerator marker keeps it out of
  extract_api.py's option sets, the API docs and the d.ts.
- unit.itemcount documents that an item on an advanced stash tab reports
  its stack size.

docs/stash_tabs.md and CLAUDE.md follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ResurrectedTrader
ResurrectedTrader merged commit 9a07a6b into main Oct 7, 2026
1 check passed
@ResurrectedTrader
ResurrectedTrader deleted the stash-withdraw-deposit branch October 7, 2026 07:42
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