Parser quirks: open picks a matching item before the exit; examine's two steps read words differently
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Read the parser paths in src/interpre.cpp:1925-1931 and src/act_info.cpp:1115,1528, then compare the keyword matching behavior in src/handler.cpp:2443. The issue asks for coordinated parsing changes and checks of open/close plus lock/unlock and pick; completion means exit name matching and examine container lookup use consistent intended parsing without changing the usual target order elsewhere. No tests are named in the issue.
Written by the indexing model from the issue text.
Description
Two old command-parsing quirks, to be handled together in one parser follow-up (not in feature branches).
1. open <exit name> picks a matching item before the exit
A player types open stone to open an exit named "stone" while wearing an item that also answers to "stone". The item is chosen, not the exit. The workaround today is open stone east.
Why:
- open and close (src/interpre.cpp:1925-1931 on release-frodo) list items in the room, inventory and equipment as the first target group. Exit names (
TAR_DIR_NAME) come only as an alternative, after that group fails. - Items match on any keyword (and worn gear by the start of its name, src/handler.cpp:2443). Exits need an exact keyword match.
- So any item that shares a word with the exit wins.
lock and unlock use a different target list and were not checked.
To consider: let an exact exit-name match win over a loose item match for open/close (and check lock/unlock, pick), while keeping the usual order everywhere else (people, then gear, then the rest).
2. examine the bag describes the bag, then says it isn't there
do_examine (src/act_info.cpp:1528) works in two steps that read the words differently:
- Step 1 finds the target with
one_argument, which skips filler words (in, from, with, the, on, at, to) and quotes. Soexamine the bagdescribes the bag. - Step 2 shows a container's contents by calling look with
"in <argument>". That goes throughargument_split_2(src/act_info.cpp:1115), which does not skip filler words. So it looks for "the" and prints "You do not see that item here."
To consider: give both steps the same parsed word.
Raised during the keyring branch review. That branch keeps both behaviors as they are on purpose.
- Dominant language
- C++
- Stars
- 3
- Forks
- 4
- Avg merge
- 18h 36m
- Merged PRs (30d)
- 87
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from returnoftheshadow/RotS_Live
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
returnoftheshadow/RotS_Live#521 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
returnoftheshadow/RotS_Live#485 ·
Maintainers usually reply within 1 day
-
Remove dead object refresh code (check_inventory_proto and friends)Possibly taken @drelidan7 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
returnoftheshadow/RotS_Live#414 ·
Maintainers usually reply within 1 day
-
purge <player> idle-saves the immortal instead of the playerPossibly taken @bskalpavrukshab25-sketch claimed this 12 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
returnoftheshadow/RotS_Live#411 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
returnoftheshadow/RotS_Live#410 · 2 comments ·
Maintainers usually reply within 1 day
All issues in returnoftheshadow/RotS_Live
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ROCm/FastFlowLM#887 ·
Maintainers usually reply within 1 day
-
bug medium priority openmp tokenizer wrong result
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
good first issue invalid
Difficulty 1/5 Under an hour Newbie friendliness 72/100
DanielJerolm/gpcc#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
patrick-hudson/put.gd-desktop#808 ·
Maintainers usually reply within 1 day
-
DPI change is not fully handled in the cascading window on WindowsPossibly taken @yukawa claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 4 days