feat(nfc): an NFC page for the tag dumps the game's NFC tab lists #49
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/ui
area/updates
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!49
Loading…
Reference in a new issue
No description provided.
Delete branch "airdamien/LongshotLauncher:feat/nfc-tags"
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?
Why
Longshot is getting an NFC tab that gives the game NFC tags from files in a folder of the player's (MagicBeanDev/Longshot#280). Players need a way to put their tag dumps there without finding a hidden folder: this adds an NFC page to the launcher for it.
What changed
Core/NfcTags.cs: the folder (LONGSHOT_NFC_DIR, else%LOCALAPPDATA%\Longshot\nfcon Windows,$XDG_DATA_HOME/longshot/nfcon Linux: the same rule as the game'shost/nn_nfp.c), listing, checking a dump (.binof 532, 540 or 572 bytes; a Flipper Zero.nfc; the two marks of a figure's NTAG215), adding (a name that is taken is never replaced: the same bytes are left, others go in asName (2).bin), deleting. Written throughAtomicFile.Core/NfcReader.cs: reading a tag with a Nintendo Switch 2 Pro Controller over USB (Windows, WinUSB): the reader's commands behind a send-and-answer delegate, so the checks drive them with a pretended controller. Read only: a write command cannot be built.App/ViewModels/NfcViewModel.cs,App/Views/NfcView.axaml,NfcDeleteView.axaml: the page. Add files (many at once), add a folder (with the folders under it), drop files or folders on the page, scan a tag, delete one or several (asked first), open the folder.App/Views/HomeView.axaml,HomeViewModel.cs,MainViewModel.cs: an NFC card under the saves' on the home, and an NFC tags link on the home before any build exists (the folder does not wait for a build).tests/launcher_core/NfcChecks.cs,NfcReaderChecks.cs: 110 checks, on pretended tags built in code. No real dump is in the repository, and CONTRIBUTING.md says none may be.docs/nfc.md, README.How it was tested
dotnet build LongshotLauncher.slnx: 0 errors (Windows 11, .NET SDK 10.0.201).The NFC checks alone:
NFC ONLY: 110 checks passed. The whole oftests/test_launcher_core.pyhas not run green here: on this Windows PC it stops inSelfUpdateChecksbefore reaching them, and does so onmaintoo (a Linux path in that check); CI on Linux is where the whole suite runs. To run them alone I madeMaincall onlyNfcChecks(); NfcReaderChecks();in a copy that is not committed.On screen (the screenshot below): the page listing three pretended tags and one file that is no dump, from a scratch
LONGSHOT_NFC_DIR.By the author, on their own files: adding a folder of folders.
Scan a tag, by the author on a real controller (a Nintendo Switch 2 Pro Controller, firmware 1.1.5, over USB, Windows 11): a figure's tag held on the controller was read and saved into the folder as
Scanned <ID>.bin.Not tested: the page on Linux (the scan is Windows only and its button is disabled there); a scan's other ends on real hardware (no tag in time, a tag that is no figure's, the controller held by another program) beyond the checks' pretended controller; drag and drop was built and compiled, and tried by the author only.
Screenshot
The NFC page, this PR:
Notes for the reviewer
...\Longshot\nfc), beside the save backups'...\Longshot\oot-save-backups.🤖 Generated with Claude Code
WIP: feat(nfc): an NFC page for the tag dumps the game's NFC tab liststo feat(nfc): an NFC page for the tag dumps the game's NFC tab listsScan a tag was run by the author on a real Switch 2 Pro Controller over USB: a figure's tag was read and saved into the folder. With that, the page's functions have all been used on real files and hardware; the title's WIP is off. Still for CI: the whole core suite (it does not run on the author's Windows PC, nor does main's).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.