Add --list command and --only filter for targeting specific resources

--list shows all resources grouped by type (capped, crafted, special, locked).
--only=a,b,c filters --max-resources and --set-crafted to named resources.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-25 16:46:16 +01:00
parent ebbe5da281
commit 1d0404cd36
2 changed files with 82 additions and 5 deletions

View File

@@ -15,6 +15,9 @@ npm install
The tool reads save data from your **clipboard** by default (or from stdin/argument), applies edits, and copies the result back to the clipboard.
```bash
# List all resources and their current values
node index.js --list
# Max all capped resources
node index.js --max-resources
@@ -24,6 +27,12 @@ node index.js --set-crafted=100000
# Combine both
node index.js --max-resources --set-crafted=100000
# Max only specific resources
node index.js --max-resources --only=food,stone,iron
# Set specific crafted resources to 50,000
node index.js --set-crafted=50000 --only=plywood,brick
# Read from stdin instead of clipboard
node index.js --max-resources < save.txt
@@ -35,8 +44,10 @@ node index.js --max-resources --no-copy
| Flag | Description |
|------|-------------|
| `--list` | List all resources in the save, grouped by type (capped, crafted, special, locked) |
| `--max-resources` | Set all capped resources (`max > 0`) to their max |
| `--set-crafted=N` | Set all unlimited/crafted resources (`max == -1`) to N |
| `--only=a,b,c` | Only affect listed resources (comma-separated, case-insensitive). Matches resource names (e.g. `Food`) or internal keys (e.g. `food`). Applies to `--max-resources` and `--set-crafted`. |
| `--no-copy` | Print the edited save to stdout instead of clipboard |
| `--help` | Show help |