fix(travel): an unlocked Fairy Bow or Fairy Slingshot comes with its smallest bag, so the arrows or seeds picked up after count (#2416) #3033
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3033
Loading…
Reference in a new issue
No description provided.
Delete branch "cuecuemoar/Longshot:fix/weapon-ammo-bag-modapi"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
For
mod-api. #2416, what's left of it: unlocking the Fairy Bow or the Fairy Slingshot (Debug > Cheats, the Inventory rows) gave no Quiver or Bullet Bag. So every arrow or seed picked up afterwards stayed at 0, because the game clamps ammunition to the bag held.How to see it on
mod-api:kokiri-starthas neither), and turn on Debug tools.Why it happens:
pouch_addingame/crates/game-core/src/travel.rsalready gives the smallest bag first when ammunition is added with no bag held, as the game's chest does. But it looks the bag up by the ammunition's own name (AMMO_BAGS), so the weapon that shoots it got none.What this changes:
WEAPON_AMMOnames what each weapon shoots: the Fairy Bow, arrows; the Fairy Slingshot, Deku Seeds.bags_ofgives a weapon its ammunition's bags, sobag_neededandpouch_addgive the smallest Quiver or Bullet Bag first when none is held.Read first:
WEAPON_AMMO,bags_of,bag_neededandpouch_addintravel.rs.This was part of #2990 (
main's Debug Inventory fix, closed for itsmod-apiport). On #3030, the port of the rest, BeanBot asked for it to be its own PR. The two merge cleanly in either order.See #2416
See #3030
Testing
Tested: Windows 10, RTX 4090, driver 617.42, headless, through the PC's job queue, with a runtime built from this branch alone.
The run used the repository save
kokiri-start(Kokiri Forest, child, no bow and no Quiver) with the Debug tools on. Under the game's pause screen and the Insert menu (Debug > Cheats), the Fairy Bow was the last edit made and set to 1; the pause screen then closed.82407cd1, this PR): The Amount row with Upgrades > Quiver chosen read 1 at the end of the run.mod-api582b6a1ab, the same steps; the currentmod-apichanges none of these files): onlycheats: inventory Weapon_Range_Bow +1, with no bag.The checks:
travel.rs's bag test now also asks for the Bow's and the Slingshot's bag. With only the test commit, onmod-api, it fails:bag_needed("Weapon_Range_Bow", ...)givesNone, notSome("Item_Quiver_Small"). Here it passes. Undoing the weapon lookup inbags_ofmakes it fail again.bag_neededandpouch_addboth did intobags_of, unchanged.cargo test -p game-corepasses here (386),game-core's clippy is clean with-D warnings, andcargo fmt --checkis clean.tests/run_all.py --strictgives the same 782 passed, 77 failed, 12 skipped asmod-apib9bf697bb, with the same files.Still to test:
Measurements
Nothing to measure: a change to the Debug tools' Inventory rows. It adds one table lookup to a pouch add. Rendering and presenting are untouched.
Risks
Checklist
Ready for review
main; the title is a Conventional Commit. (On currentmod-api, its base.)mise run testpasses (any failure that also fails onmainis named). (tests/run_all.py --strict: 782 passed, 77 failed, 12 skipped here and onmod-apib9bf697bb, the same files: this PC's setup, or failing onmod-apias it is.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (Fails onmod-api.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_01VxeaZk9YYKvW5r88gQGguW
Tested in game: Windows 10, RTX 4090, driver 617.42, headless through the job queue, repository save kokiri-start (no bow, no Quiver), Debug tools on. On
82407cd1(runtime from the commit alone): the Fairy Bow set to 1 in Debug > Cheats logged 'Weapon_Range_Bow needs a bag: gave Item_Quiver_Small first' then 'inventory Weapon_Range_Bow +1', and the Quiver's Amount read 1 after. Before, on mod-api582b6a1ab: only the Bow, no bag.Possibly related, for context:
cuecuemoar referenced this pull request2026-12-02 20:57:35 +00:00
WIP: fix(travel): an unlocked Fairy Bow or Fairy Slingshot comes with its smallest bag, so the arrows or seeds picked up after count (#2416)to fix(travel): an unlocked Fairy Bow or Fairy Slingshot comes with its smallest bag, so the arrows or seeds picked up after count (#2416)82407cd1a23b5736e08d