├── .conform.yaml
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── dependabot.yml
├── pull_request_template.md
└── workflows
│ ├── conform.yml
│ ├── draft.yml
│ └── release.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
└── savegame-editor
├── .gitignore
├── README.md
├── components.json
├── index.html
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── assets
│ ├── fonts
│ │ └── adrip1.ttf
│ ├── icons
│ │ ├── dying_light_icon.png
│ │ ├── file.png
│ │ ├── folder.png
│ │ ├── icon.ico
│ │ ├── icon.jpg
│ │ ├── language.png
│ │ ├── resize.png
│ │ └── zombie.png
│ ├── pictures
│ │ ├── backgrounds
│ │ │ ├── Background.jpg
│ │ │ ├── batang.png
│ │ │ ├── beast_wall.jpg
│ │ │ ├── beast_workbench.jpg
│ │ │ ├── dark_trader.jpg
│ │ │ ├── drop-background.jpg
│ │ │ ├── main-white.jpg
│ │ │ ├── slider-1.jpg
│ │ │ ├── slider-2.jpg
│ │ │ ├── slider-3.jpg
│ │ │ ├── slider-4.jpg
│ │ │ ├── slider-5.jpg
│ │ │ ├── slider-6.jpg
│ │ │ ├── slider-7.jpg
│ │ │ └── spooked.jpg
│ │ ├── contributors
│ │ │ ├── batang.png
│ │ │ ├── caz.png
│ │ │ ├── eric_playz.webp
│ │ │ ├── mchawk.jpg
│ │ │ └── zdashero.png
│ │ ├── hawks-outpost.webp
│ │ └── sponsors
│ │ │ └── easily-spooked.jpeg
│ └── react.svg
├── tauri.svg
└── vite.svg
├── src-tauri
├── .gitignore
├── CRC_Bypass
│ ├── CRCBypass.asi
│ └── winmm.dll
├── Cargo.lock
├── Cargo.toml
├── Hawks_Outpost
│ ├── Endgame
│ │ ├── endgame.sav
│ │ └── save.json
│ ├── Ghost
│ │ ├── ghost.sav
│ │ └── save.json
│ └── Spooky
│ │ ├── christmas.sav
│ │ └── save.json
├── IDs
│ ├── Ammo.txt
│ ├── Cash.txt
│ ├── Collectable.txt
│ ├── CraftComponent.txt
│ ├── CraftPart.txt
│ ├── Equipment.txt
│ ├── EvolvingItem.txt
│ ├── Firearm.txt
│ ├── Flashlight.txt
│ ├── InventoryItem.txt
│ ├── ItemBundle.txt
│ ├── Lockpick.txt
│ ├── LootPack.txt
│ ├── Medkit.txt
│ ├── Melee.txt
│ ├── Other.txt
│ ├── OutfitPart.txt
│ ├── Powerup.txt
│ ├── SurvivorPack.txt
│ ├── SyringeAntizin.txt
│ ├── Throwable.txt
│ ├── ThrowableLiquid.txt
│ ├── Token.txt
│ ├── Uncategorized.txt
│ ├── Valuable.txt
│ ├── VehicleUpgrade.txt
│ └── Voucher.txt
├── Patched_Items
│ ├── mchawk.csv
│ ├── not_dropable.txt
│ └── not_shareable.txt
├── build.rs
├── capabilities
│ └── migrated.json
├── gen
│ └── schemas
│ │ ├── acl-manifests.json
│ │ ├── capabilities.json
│ │ ├── desktop-schema.json
│ │ └── windows-schema.json
├── icons
│ ├── 128x128.png
│ ├── 128x128@2x.png
│ ├── 32x32.png
│ ├── Square107x107Logo.png
│ ├── Square142x142Logo.png
│ ├── Square150x150Logo.png
│ ├── Square284x284Logo.png
│ ├── Square30x30Logo.png
│ ├── Square310x310Logo.png
│ ├── Square44x44Logo.png
│ ├── Square71x71Logo.png
│ ├── Square89x89Logo.png
│ ├── StoreLogo.png
│ ├── base
│ │ ├── 128x128.png
│ │ ├── 128x128@2x.png
│ │ ├── 32x32.png
│ │ ├── Square107x107Logo.png
│ │ ├── Square142x142Logo.png
│ │ ├── Square150x150Logo.png
│ │ ├── Square284x284Logo.png
│ │ ├── Square30x30Logo.png
│ │ ├── Square310x310Logo.png
│ │ ├── Square44x44Logo.png
│ │ ├── Square71x71Logo.png
│ │ ├── Square89x89Logo.png
│ │ ├── StoreLogo.png
│ │ ├── icon.icns
│ │ ├── icon.ico
│ │ └── icon.png
│ ├── icon.icns
│ ├── icon.ico
│ └── icon.png
├── src
│ ├── logger.rs
│ ├── main.rs
│ └── save_logic
│ │ ├── bypass_crc.rs
│ │ ├── file_analyser.rs
│ │ ├── id_fetcher.rs
│ │ ├── mod.rs
│ │ ├── patched_items_fetcher.rs
│ │ ├── save_outpost.rs
│ │ ├── struct_data.rs
│ │ └── test_saves.rs
└── tauri.conf.json
├── src
├── App.css
├── App.tsx
├── assets
│ └── react.svg
├── components
│ ├── custom
│ │ ├── breadcrums-component.tsx
│ │ ├── contributor-avatar-component.tsx
│ │ ├── custom-navbar-component.tsx
│ │ ├── data-table-component.tsx
│ │ ├── helix-loader
│ │ │ ├── helix-loader-component.css
│ │ │ └── helix-loader-component.tsx
│ │ ├── id-search-component.tsx
│ │ ├── inventory-item-card.tsx
│ │ ├── item-id-combobox-component.tsx
│ │ ├── knowledge-carousel-component.tsx
│ │ ├── outpost-carousel-component.tsx
│ │ ├── sponsor-avatar-component.tsx
│ │ └── theme-button.tsx
│ └── ui
│ │ ├── avatar.tsx
│ │ ├── badge.tsx
│ │ ├── breadcrumb.tsx
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── carousel.tsx
│ │ ├── checkbox.tsx
│ │ ├── collapsible.tsx
│ │ ├── command.tsx
│ │ ├── dialog.tsx
│ │ ├── drawer.tsx
│ │ ├── dropdown-menu.tsx
│ │ ├── form.tsx
│ │ ├── hover-card.tsx
│ │ ├── input.tsx
│ │ ├── label.tsx
│ │ ├── navigation-menu.tsx
│ │ ├── pagination.tsx
│ │ ├── popover.tsx
│ │ ├── progress.tsx
│ │ ├── scroll-area.tsx
│ │ ├── separator.tsx
│ │ ├── sheet.tsx
│ │ ├── skeleton.tsx
│ │ ├── table.tsx
│ │ ├── tabs.tsx
│ │ ├── theme-provider.tsx
│ │ ├── toast.tsx
│ │ ├── toaster.tsx
│ │ ├── tooltip.tsx
│ │ ├── typography.tsx
│ │ └── use-toast.ts
├── index.css
├── lib
│ └── utils.ts
├── main.tsx
├── models
│ ├── models.ts
│ ├── save-models.ts
│ ├── settings-manager.tsx
│ └── settings-model.ts
├── pages
│ ├── backpack-page.tsx
│ ├── campaign-page.tsx
│ ├── debug-page.tsx
│ ├── ids-page.tsx
│ ├── inventory-page.tsx
│ ├── knowledge-vault.tsx
│ ├── main-page.tsx
│ ├── outpost-page.tsx
│ ├── patched-items-page.tsx
│ ├── player-page.tsx
│ ├── settings-page.tsx
│ ├── skills-page.tsx
│ ├── sponsor-page.tsx
│ ├── unlockables-page.tsx
│ └── welcome-page.tsx
└── vite-env.d.ts
├── tailwind.config.js
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
/.conform.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | policies:
3 | - type: commit
4 | spec:
5 | header:
6 | length: 200
7 | imperative: true
8 | case: lower
9 | invalidLastCharacters: .
10 | body:
11 | required: false
12 | dco: false
13 | gpg: false
14 | spellcheck:
15 | locale: US
16 | maximumOfOneCommit: false
17 | conventional:
18 | types:
19 | - refactor
20 | - chore
21 | - docs
22 | - feat
23 | - bug
24 | scopes:
25 | - deps
26 | - dev
27 | - test
28 | - ci
29 | - build
30 | - release
31 | descriptionLength: 100
32 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [Marcel-TO]
2 | patreon: marcel_to
3 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: idea
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | # Maintain dependencies for GitHub Actions
4 | - package-ecosystem: "github-actions"
5 | # Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
6 | directory: "/"
7 | schedule:
8 | interval: "monthly"
9 | prefix: "chore"
10 | include_scope: true
11 |
12 | # Maintain dependencies for Rust / Backend
13 | - package-ecosystem: "cargo"
14 | directory: "/savegame-editor/src-tauri" # Location of package manifests
15 | schedule:
16 | interval: "monthly"
17 | prefix: "chore"
18 | include_scope: true
19 |
20 | # Maintain dependencies for npm
21 | - package-ecosystem: "npm"
22 | directory: "/savegame-editor"
23 | schedule:
24 | interval: "monthly"
25 | commit_message:
26 | prefix: "chore"
27 | include_scope: true
28 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | # Pull Request Template
2 |
3 | ## Description
4 |
5 | Please include a summary of the changes and the related issue. Explain the motivation for the change and the context of the PR.
6 |
7 | Fixes # (issue)
8 |
9 | ## Type of Change
10 |
11 | Please cross the type of change that fits your pull request template.
12 |
13 | - [ ] Bug fix (non-breaking change which fixes an issue)
14 | - [ ] New feature (non-breaking change which adds functionality)
15 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16 | - [x] Documentation update
17 |
18 | ## Checklist
19 |
20 | - [ ] My code follows the style guidelines of this project
21 | - [ ] I have performed a self-review of my own code
22 | - [ ] I have commented my code, particularly in hard-to-understand areas
23 | - [ ] I have made corresponding changes to the documentation
24 | - [ ] My changes generate no new warnings
25 | - [ ] I have added tests that prove my fix is effective or that my feature works
26 | - [ ] New and existing unit tests pass locally with my changes
27 | - [ ] Any dependent changes have been merged and published in downstream modules
28 |
29 | ## How Has This Been Tested?
30 |
31 | Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
32 |
33 | - [ ] Test A
34 | - [ ] Test B
35 |
36 | **Test Configuration**:
37 | * Firmware version:
38 | * Hardware:
39 | * Toolchain:
40 | * SDK:
41 |
42 | ## Screenshots (if applicable)
43 |
44 | If your PR includes UI changes, please add screenshots of the updated UI.
45 |
46 | ## Additional Notes
47 |
48 | Add any other context about the pull request here.
49 |
50 |
--------------------------------------------------------------------------------
/.github/workflows/conform.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Conform Policies
3 |
4 | on: [push, pull_request]
5 |
6 | jobs:
7 | conform: # enforces policies on pipelines such as conventional commits.
8 | runs-on: ubuntu-latest
9 | name: Conform
10 |
11 | steps:
12 | - uses: actions/checkout@v4
13 | with:
14 | fetch-depth: 0
15 |
16 | - uses: siderolabs/conform@v0.1.0-alpha.30
17 | with:
18 | token: ${{ secrets.GITHUB_TOKEN }}
19 |
--------------------------------------------------------------------------------
/.github/workflows/draft.yml:
--------------------------------------------------------------------------------
1 | name: 'publish draft'
2 |
3 | on:
4 | push:
5 | branches:
6 | - release-draft
7 |
8 | jobs:
9 | publish-tauri:
10 | permissions:
11 | contents: write
12 | strategy:
13 | fail-fast: false
14 | matrix:
15 | settings:
16 | - platform: 'macos-latest' # for Arm based macs (M1 and above).
17 | args: '--target aarch64-apple-darwin'
18 | # name: 'macos-arm64 (M1 and above)'
19 | - platform: 'macos-latest' # for Intel based macs.
20 | args: '--target x86_64-apple-darwin'
21 | # name: 'macos-x86_64 (Intel)'
22 | - platform: 'ubuntu-22.04'
23 | args: ''
24 | # name: 'ubuntu-22.04'
25 | - platform: 'windows-latest'
26 | args: ''
27 | # name: 'windows-latest'
28 |
29 | runs-on: ${{ matrix.settings.platform }}
30 | steps:
31 | - uses: actions/checkout@v4
32 |
33 | - name: install dependencies (ubuntu only)
34 | if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
35 | run: |
36 | sudo apt-get update
37 | sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
38 | # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
39 | # You can remove the one that doesn't apply to your app to speed up the workflow a bit.
40 |
41 | - name: setup node
42 | uses: actions/setup-node@v4
43 | with:
44 | node-version: 20
45 |
46 | - name: install Rust stable
47 | uses: dtolnay/rust-toolchain@stable
48 | with:
49 | # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
50 | targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
51 |
52 | - name: Rust cache
53 | uses: swatinem/rust-cache@v2
54 | with:
55 | workspaces: './savegame-editor/src-tauri -> target'
56 |
57 | - name: install frontend dependencies
58 | run: npm install
59 | working-directory: './savegame-editor'
60 |
61 | - name: build
62 | id: build
63 | uses: tauri-apps/tauri-action@v0
64 | env:
65 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66 | with:
67 | tagName: app-beta-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
68 | releaseName: 'Save Editor Beta v__VERSION__'
69 | releaseBody: 'Good night and good luck'
70 | releaseDraft: true
71 | prerelease: false
72 | args: ${{ matrix.settings.args }}
73 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: 'publish'
2 |
3 | on:
4 | push:
5 | branches:
6 | - release
7 |
8 | jobs:
9 | publish-tauri:
10 | permissions:
11 | contents: write
12 | strategy:
13 | fail-fast: false
14 | matrix:
15 | settings:
16 | - platform: 'macos-latest' # for Arm based macs (M1 and above).
17 | args: '--target aarch64-apple-darwin'
18 | # name: 'macos-arm64 (M1 and above)'
19 | # - platform: 'macos-latest' # for Intel based macs.
20 | # args: '--target x86_64-apple-darwin'
21 | # name: 'macos-x86_64 (Intel)'
22 | - platform: 'ubuntu-22.04'
23 | args: ''
24 | # name: 'ubuntu-22.04'
25 | - platform: 'windows-latest'
26 | args: ''
27 | # name: 'windows-latest'
28 |
29 | runs-on: ${{ matrix.settings.platform }}
30 | steps:
31 | - uses: actions/checkout@v4
32 |
33 | - name: install dependencies (ubuntu only)
34 | if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
35 | run: |
36 | sudo apt-get update
37 | sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
38 | # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
39 | # You can remove the one that doesn't apply to your app to speed up the workflow a bit.
40 |
41 | - name: setup node
42 | uses: actions/setup-node@v4
43 | with:
44 | node-version: 20
45 |
46 | - name: install Rust stable
47 | uses: dtolnay/rust-toolchain@stable
48 | with:
49 | # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
50 | targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
51 |
52 | - name: Rust cache
53 | uses: swatinem/rust-cache@v2
54 | with:
55 | workspaces: './savegame-editor/src-tauri -> target'
56 |
57 | - name: install frontend dependencies
58 | run: npm install
59 | working-directory: './savegame-editor'
60 |
61 | - name: build
62 | id: build
63 | uses: tauri-apps/tauri-action@v0
64 | env:
65 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66 | with:
67 | tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
68 | releaseName: 'Save Editor v__VERSION__'
69 | releaseBody: 'Good night and good luck'
70 | releaseDraft: false
71 | prerelease: true
72 | args: ${{ matrix.settings.args }}
73 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | .vscode
18 | !.vscode/extensions.json
19 | .idea
20 | .DS_Store
21 | *.suo
22 | *.ntvs*
23 | *.njsproj
24 | *.sln
25 | *.sw?
26 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to the DL2 Save Editor Repository
2 |
3 | 🎉 First off, thanks for taking the time to contribute! 🎉
4 |
5 | The following is a set of guidelines for contributing to this repository. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6 |
7 | ## Table of Contents
8 |
9 | 1. [Code of Conduct](#code-of-conduct)
10 | 2. [How Can I Contribute?](#how-can-i-contribute)
11 | - [Reporting Bugs](#reporting-bugs)
12 | - [Suggesting Enhancements](#suggesting-enhancements)
13 | - [Submitting Pull Requests](#submitting-pull-requests)
14 | 3. [Development Setup](#development-setup)
15 | 4. [Style Guides](#style-guides)
16 | - [Git Commit Messages](#git-commit-messages)
17 | - [C# Style Guide](#c-style-guide)
18 | 5. [Additional Resources](#additional-resources)
19 |
20 | ## Code of Conduct
21 |
22 | This project and everyone participating in it is governed by the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [INSERT EMAIL].
23 |
24 | ## How Can I Contribute?
25 |
26 | ### Reporting Bugs
27 |
28 | This section guides you through submitting a bug report. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
29 |
30 | Before creating a bug report, please check the [issue tracker](https://github.com/Marcel-TO/DL2_Save_Editor/issues) to see if the issue has already been reported.
31 |
32 | #### How to Submit a Bug Report
33 |
34 | - Use a clear and descriptive title for the issue.
35 | - Describe the steps to reproduce the problem.
36 | - Explain the behavior you expected to see.
37 | - Describe the behavior you actually saw.
38 | - Include any relevant logs or screenshots.
39 |
40 | ### Suggesting Enhancements
41 |
42 | This section guides you through submitting an enhancement suggestion, including completely new features and minor improvements to existing functionality.
43 |
44 | #### How to Suggest an Enhancement
45 |
46 | - Use a clear and descriptive title for the issue.
47 | - Provide a detailed description of the enhancement.
48 | - Explain why this enhancement would be useful.
49 | - Include any relevant examples or mockups.
50 |
51 | ### Submitting Pull Requests
52 |
53 | The process described here has several goals:
54 |
55 | - Maintain the quality of the codebase.
56 | - Fix problems that are important to users.
57 | - Engage the community in working together.
58 |
59 | #### Pull Request Process
60 |
61 | 1. Fork the repository.
62 | 2. Create a new branch: `git checkout -b feature-name`.
63 | 3. Make your changes.
64 | 4. Test your changes.
65 | 5. Commit your changes: `git commit -m 'Add feature-name'`.
66 | 6. Push to the branch: `git push origin feature-name`.
67 | 7. Open a pull request.
68 |
69 | **Note:** Be sure to merge the latest from "main" before making a pull request.
70 |
71 | ## Development Setup
72 |
73 | To get started with the project, follow the steps mentioned in [Prerequisites for Programming](https://github.com/Marcel-TO/DL2_Save_Editor/wiki/Prerequisites-for-Programming).
74 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Marcel T.O
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | Use this section to tell people about which versions of your project are
6 | currently being supported with security updates.
7 |
8 | | Version | Supported |
9 | | ------- | ------------------ |
10 | | 1.0.6 | :white_check_mark: |
11 | | 1.0.5 | :white_check_mark: |
12 | | < 1.0.5 | :x: |
13 |
14 | ## Reporting a Vulnerability
15 |
16 | Use this section to tell people how to report a vulnerability.
17 |
18 | Tell them where to go, how often they can expect to get an update on a
19 | reported vulnerability, what to expect if the vulnerability is accepted or
20 | declined, etc.
21 |
--------------------------------------------------------------------------------
/savegame-editor/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
26 | .env
--------------------------------------------------------------------------------
/savegame-editor/README.md:
--------------------------------------------------------------------------------
1 | # Tauri + React + Typescript
2 |
3 | This template should help get you started developing with Tauri, React and Typescript in Vite.
4 |
5 | ## Recommended IDE Setup
6 |
7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
8 |
--------------------------------------------------------------------------------
/savegame-editor/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "default",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.js",
8 | "css": "src/index.css",
9 | "baseColor": "slate",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils"
16 | }
17 | }
--------------------------------------------------------------------------------
/savegame-editor/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Tauri + React + Typescript
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/savegame-editor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "savegame-editor",
3 | "private": true,
4 | "version": "1.0.8",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "tsc && vite build",
9 | "preview": "vite preview",
10 | "tauri": "tauri"
11 | },
12 | "dependencies": {
13 | "@hookform/resolvers": "^3.9.0",
14 | "@radix-ui/react-avatar": "^1.1.1",
15 | "@radix-ui/react-checkbox": "^1.1.3",
16 | "@radix-ui/react-collapsible": "^1.1.0",
17 | "@radix-ui/react-dialog": "^1.1.6",
18 | "@radix-ui/react-dropdown-menu": "^2.1.4",
19 | "@radix-ui/react-hover-card": "^1.1.1",
20 | "@radix-ui/react-label": "^2.1.0",
21 | "@radix-ui/react-navigation-menu": "^1.2.1",
22 | "@radix-ui/react-popover": "^1.1.1",
23 | "@radix-ui/react-progress": "^1.1.1",
24 | "@radix-ui/react-scroll-area": "^1.2.0",
25 | "@radix-ui/react-separator": "^1.1.0",
26 | "@radix-ui/react-slot": "^1.1.1",
27 | "@radix-ui/react-tabs": "^1.1.2",
28 | "@radix-ui/react-toast": "^1.2.1",
29 | "@radix-ui/react-tooltip": "^1.1.2",
30 | "@tanstack/react-query": "^5.51.23",
31 | "@tanstack/react-table": "^8.19.3",
32 | "@tauri-apps/api": "^2.0.0",
33 | "@tauri-apps/plugin-dialog": "^2.0.1",
34 | "@tauri-apps/plugin-fs": "^2.0.3",
35 | "@tauri-apps/plugin-shell": "^2.0.1",
36 | "@tauri-apps/plugin-store": "^2.1.0",
37 | "class-variance-authority": "^0.7.0",
38 | "clsx": "^2.1.1",
39 | "cmdk": "^1.0.0",
40 | "cross-spawn": "^7.0.6",
41 | "embla-carousel-react": "^8.2.0",
42 | "lucide-react": "^0.474.0",
43 | "react": "^19.0",
44 | "react-dom": "^19.0.0",
45 | "react-hook-form": "^7.53.0",
46 | "react-router-dom": "^6.26.0",
47 | "tailwind-merge": "^3.0.1",
48 | "tailwindcss-animate": "^1.0.7",
49 | "use-debounce": "^10.0.4",
50 | "vaul": "^1.1.1",
51 | "zod": "^3.23.8"
52 | },
53 | "devDependencies": {
54 | "@tauri-apps/cli": "^2.2.7",
55 | "@types/node": "^22.7.4",
56 | "@types/react": "^18.3.10",
57 | "@types/react-dom": "^18.2.7",
58 | "@vitejs/plugin-react": "^4.3.4",
59 | "autoprefixer": "^10.4.20",
60 | "postcss": "^8.4.49",
61 | "tailwindcss": "^3.4.9",
62 | "typescript": "^5.6.3",
63 | "vite": "^6.0.11"
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/savegame-editor/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/savegame-editor/public/assets/fonts/adrip1.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/fonts/adrip1.ttf
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/dying_light_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/dying_light_icon.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/file.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/folder.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/icon.ico
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/icon.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/language.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/language.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/resize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/resize.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/icons/zombie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/icons/zombie.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/Background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/Background.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/batang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/batang.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/beast_wall.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/beast_wall.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/beast_workbench.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/beast_workbench.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/dark_trader.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/dark_trader.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/drop-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/drop-background.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/main-white.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/main-white.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/slider-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/slider-1.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/slider-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/slider-2.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/slider-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/slider-3.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/slider-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/slider-4.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/slider-5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/slider-5.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/slider-6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/slider-6.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/slider-7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/slider-7.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/backgrounds/spooked.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/backgrounds/spooked.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/contributors/batang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/contributors/batang.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/contributors/caz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/contributors/caz.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/contributors/eric_playz.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/contributors/eric_playz.webp
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/contributors/mchawk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/contributors/mchawk.jpg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/contributors/zdashero.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/contributors/zdashero.png
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/hawks-outpost.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/hawks-outpost.webp
--------------------------------------------------------------------------------
/savegame-editor/public/assets/pictures/sponsors/easily-spooked.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/public/assets/pictures/sponsors/easily-spooked.jpeg
--------------------------------------------------------------------------------
/savegame-editor/public/assets/react.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/savegame-editor/public/tauri.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/savegame-editor/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated by Cargo
2 | # will have compiled files and executables
3 | /target/
4 | /saves/
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/CRC_Bypass/CRCBypass.asi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/CRC_Bypass/CRCBypass.asi
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/CRC_Bypass/winmm.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/CRC_Bypass/winmm.dll
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "savegame-editor"
3 | version = "1.0.8"
4 | description = "A Dying Light 2 Save Editor. Allows to edit inventory and skills."
5 | authors = ["Marcel-TO", "zCaazual"]
6 | license = "MIT License"
7 | repository = "https://github.com/Marcel-TO/DL2_Save_Editor.git"
8 | edition = "2021"
9 |
10 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
11 |
12 | [build-dependencies]
13 | tauri-build = { version = "2.0.5", features = [] }
14 |
15 | [dependencies]
16 | tauri = { version = "2.2.5", features = [] }
17 | tauri-plugin-store = "2.2.0"
18 | tauri-plugin-dialog = "2.2.0"
19 | tauri-plugin-shell = "2.2.0"
20 | tauri-plugin-fs = "2.2.0"
21 |
22 | serde = { version = "1.0.214", features = ["derive"] }
23 | serde_json = "1.0.138"
24 | log = "0.4.25"
25 | regex = "1.11.1"
26 | dotenv = "0.15.0"
27 | flate2 = "1.0.33"
28 | term = "1.0.0"
29 | term_size = "0.3.2"
30 |
31 | [features]
32 | # this feature is used for production builds or when `devPath` points to the filesystem
33 | # DO NOT REMOVE!!
34 | custom-protocol = ["tauri/custom-protocol"]
35 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/Hawks_Outpost/Endgame/endgame.sav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/Hawks_Outpost/Endgame/endgame.sav
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/Hawks_Outpost/Endgame/save.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Batang's Endgame",
3 | "owner": "Batang",
4 | "description": "A max modded save with all weapons and upgrades unlocked.",
5 | "features": [
6 | "all new weapons",
7 | "modded stats",
8 | "modded weapons",
9 | "all upgrades unlocked",
10 | "1-hit kills"
11 | ],
12 | "version": "Patch18_v112S"
13 | }
14 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/Hawks_Outpost/Ghost/ghost.sav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/Hawks_Outpost/Ghost/ghost.sav
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/Hawks_Outpost/Ghost/save.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Scary Ghostly Save",
3 | "owner": "ItzGhosty420",
4 | "description": "A community favorite save from Ghosty.",
5 | "features": [
6 | "modded weapons",
7 | "infinte ammo",
8 | "infinite dropable items"
9 | ],
10 | "version": "Patch18_v112S"
11 | }
12 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/Hawks_Outpost/Spooky/christmas.sav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/Hawks_Outpost/Spooky/christmas.sav
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/Hawks_Outpost/Spooky/save.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Spooky's Christmas Adventure",
3 | "owner": "EasilySpooked",
4 | "description": "A Christmas themed save with a red and green color scheme.",
5 | "features": [
6 | "all new weapons",
7 | "modded stats",
8 | "ice and frost effects"
9 | ],
10 | "version": "Patch18_v112S"
11 | }
12 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Ammo.txt:
--------------------------------------------------------------------------------
1 | Bullet_Arrow
2 | Bullet_Arrow_Shock
3 | Bullet_Arrow_Fire
4 | Bullet_Arrow_Toxic
5 | Bullet_Arrow_Explosive
6 | Bullet_Arrow_Bleeding
7 | Bullet_Arrow_Infecting
8 | Bullet_Bolt
9 | Bullet_Bolt_Fire
10 | Bullet_Bolt_Toxic
11 | Bullet_Bolt_Freeze
12 | Bullet_Bolt_Stunning
13 | Bullet_Bolt_Impact
14 | Bullet_Bolt_Bleeding
15 | Bullet_Samurai_Arrow
16 | Bullet_Scorpio
17 | Ammo_Arrow
18 | Ammo_Arrow_Shock
19 | Ammo_Arrow_Fire
20 | Ammo_Arrow_Toxic
21 | Ammo_Arrow_Explosive
22 | Ammo_Arrow_Bleeding
23 | Ammo_Arrow_Infecting
24 | Ammo_Arrow_MAX
25 | Ammo_Arrow_DeepFreeze
26 | Ammo_Bolt
27 | Ammo_Bolt_Fire
28 | Ammo_Bolt_Toxic
29 | Ammo_Bolt_Freeze
30 | Ammo_Bolt_Stunning
31 | Ammo_Bolt_Impact
32 | Ammo_Bolt_Bleeding
33 | Ammo_Bolt_MAX
34 | Ammo_Samurai_Arrow
35 | Ammo_Scorpio
36 | Bullet_Water
37 | Bullet_Fire
38 | Bullet_BoltCannon
39 | Bullet_RazorCannon
40 | Bullet_RazorCannon_Challenge
41 | Ammo_Harpoon
42 | Bullet_Arrow_MarekTest
43 | Ammo_Arrow_MarekTest
44 | ZZZZZ_Ammo_SMG_Big
45 | Bullet_SMG
46 | Ammo_PistolSmall
47 | Ammo_PistolBig
48 | Ammo_RifleSmall
49 | Ammo_RifleBig
50 | Bullet_Pistol
51 | Bullet_Rifle
52 | Bullet_Shotgun
53 | Bullet_Harpoon
54 | Bullet_Harpoon_Spear
55 | Bullet_Firearm_Pistol
56 | Bullet_Firearm_SMG
57 | Bullet_Firearm_Rifle
58 | Bullet_Firearm_Shotgun
59 | Ammo_Firearm_Pistol
60 | Ammo_Firearm_SMG
61 | Ammo_Firearm_Rifle
62 | Ammo_Firearm_Shotgun
63 | Medium_Ammo_Firearm_Pistol
64 | Medium_Ammo_Firearm_SMG
65 | Medium_Ammo_Firearm_Rifle
66 | Medium_Ammo_Firearm_Shotgun
67 | Large_Ammo_Firearm_Pistol
68 | Large_Ammo_Firearm_SMG
69 | Large_Ammo_Firearm_Rifle
70 | Large_Ammo_Firearm_Shotgun
71 | Bullet_Arrow_Ballista
72 | Ammo_Arrow_Ballista
73 | Bullet_Bolt_Hunters
74 | Ammo_Bolt_Hunters
75 | Bullet_Arrow_DeepFreeze
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Cash.txt:
--------------------------------------------------------------------------------
1 | Cash_Wallet
2 | Cash_Cash
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/CraftComponent.txt:
--------------------------------------------------------------------------------
1 | Craft_Scrap
2 | Craft_Wiring
3 | Craft_Container
4 | Craft_Resin
5 | Craft_Rags
6 | Craft_Weights
7 | Craft_Blades
8 | Craft_Electrical_Parts
9 | Craft_Pigments
10 | Craft_Feathers
11 | Craft_Alcohol
12 | Craft_Leather
13 | Craft_Oxidizer
14 | Craft_Cleaning_Supplies
15 | Craft_Battery
16 | Plant_Lavender
17 | Plant_Chamomile
18 | Plant_Honey
19 | Plant_Cordyceps
20 | Plant_Poppy
21 | KeyCraft_MilitaryTech
22 | KeyCraft_SpecialInfected_Token_T1
23 | KeyCraft_SpecialInfected_Token_T2
24 | KeyCraft_SpecialInfected_Token_T3
25 | Event_Halloween_Treats
26 | Event_WinterEvent_Candies
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Equipment.txt:
--------------------------------------------------------------------------------
1 | Binoculars
2 | GRE_Keyfinder_1
3 | GRE_Keyfinder_2
4 | GRE_Keyfinder_3
5 | GRE_Keyfinder_4
6 | GRE_Keyfinder_5
7 | ZipLine_Pulley
8 | Chapter1_Mission_Torso
9 | Chapter1_Mission_Legs
10 | Chapter1_Mission_Shoes
11 | Chapter1_Mission_Head
12 | Chapter1_Mission_Gloves
13 | Chapter1_Mission_TorsoAddon
14 | Quest_Cube
15 | Quest_Cube_Active
16 | ClimbPickaxe
17 | RopeHook
18 | UV_Flashlight_1
19 | UV_Flashlight_2
20 | UV_Flashlight_3
21 | UV_Flashlight_4
22 | UV_Flashlight_5
23 | Chapter2_Mission_Torso
24 | Chapter2_Mission_Legs
25 | Chapter2_Mission_Shoes
26 | Chapter2_Mission_Head
27 | Chapter2_Mission_Gloves
28 | Chapter2_Mission_TorsoAddon
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/EvolvingItem.txt:
--------------------------------------------------------------------------------
1 | test_evolving_item_1
2 | GameOver_Evolving_Item
3 | ReBurn_Evolving_Item
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Firearm.txt:
--------------------------------------------------------------------------------
1 | EasterEgg_LeftFinger_Pyza
2 | EasterEgg_LeftFinger_Pyza
3 | EasterEgg_LeftFinger_Pyza
4 | EasterEgg_choke_gloVA
5 | EasterEgg_LeafBlower
6 | Firearm_Shotgun_KaDoom
7 | Firearm_Shotgun
8 | Firearm_Shotgun
9 | Firearm_Shotgun
10 | Firearm_Shotgun_Upgrade1
11 | Firearm_Shotgun_Upgrade1
12 | Firearm_Shotgun_Upgrade1
13 | Firearm_Shotgun_Upgrade2
14 | Firearm_Shotgun_Upgrade2
15 | Firearm_Shotgun_Upgrade2
16 | Firearm_Shotgun_Upgrade3
17 | Firearm_Shotgun_Upgrade3
18 | Firearm_Shotgun_Upgrade3
19 | Firearm_Shotgun_Upgrade4
20 | Firearm_Shotgun_Upgrade4
21 | Firearm_Shotgun_Upgrade4
22 | Firearm_Shotgun_Upgrade5
23 | Firearm_Shotgun_Upgrade5
24 | Firearm_Shotgun_Upgrade5
25 | Firearm_Shotgun_Upgrade6
26 | Firearm_Shotgun_Upgrade6
27 | Firearm_Shotgun_Upgrade6
28 | Firearm_Shotgun_Upgrade7
29 | Firearm_Shotgun_Upgrade7
30 | Firearm_Shotgun_Upgrade7
31 | Firearm_Shotgun_Upgrade8
32 | Firearm_Shotgun_Upgrade8
33 | Firearm_Shotgun_Upgrade8
34 | wpn_2hp_harpoon_a_fpp
35 | wpn_2hp_harpoon_a_fpp
36 | wpn_2hp_bow_t1
37 | wpn_2hp_bow_t1
38 | wpn_2hp_bow_t2
39 | wpn_2hp_bow_t2
40 | wpn_2hp_bow_t3
41 | wpn_2hp_bow_t3
42 | wpn_2hp_bow_t4
43 | wpn_2hp_bow_t4
44 | wpn_2hp_bow_t5
45 | wpn_2hp_bow_t5
46 | wpn_2hp_bow_t6
47 | wpn_2hp_bow_t6
48 | wpn_2hp_bow_t7
49 | wpn_2hp_bow_t7
50 | wpn_2hp_bow_t8
51 | wpn_2hp_bow_t8
52 | wpn_2hp_bow_t9
53 | wpn_2hp_bow_t9
54 | wpn_2hr_crossbow_b_fpp
55 | wpn_2hp_bow_f_fpp_t3_PlagueWitch
56 | wpn_2hp_bow_f_fpp_t3_PlagueWitch
57 | wpn_lbow_a_fpp_funkadelic
58 | wpn_lbow_a_fpp_funkadelic
59 | wpn_lbow_h_fpp_ll
60 | wpn_lbow_h_fpp_ll
61 | wpn_lbow_a_fpp_ll
62 | wpn_lbow_a_fpp_ll
63 | wpn_lbow_e_fpp_tgg
64 | wpn_lbow_e_fpp_tgg
65 | wpn_2hr_crossbow_b_hakon
66 | wpn_2hr_crossbow_b_hakon_dlc
67 | wpn_2hp_samurai
68 | wpn_2hp_samurai
69 | wpn_2hr_crossbow_c_pilgrimpo
70 | wpn_trn_scorpio_harpoon
71 | Firearm_Gunslinger
72 | Firearm_Gunslinger_Upgrade1
73 | Firearm_Gunslinger_Upgrade2
74 | Firearm_Gunslinger_Upgrade3
75 | Firearm_Gunslinger_Upgrade4
76 | Firearm_Gunslinger_Upgrade5
77 | Firearm_Gunslinger_Upgrade6
78 | Firearm_Gunslinger_Upgrade7
79 | Firearm_Gunslinger_Upgrade8
80 | Chapter1_Mission_wpn_2hr_crossbow_b
81 | BoltCannonV1
82 | BoltCannonV2
83 | RazorCannon
84 | RazorCannon_Challenge
85 | WaterCannon
86 | FireCannon
87 | DEBUG_BOW_fpp
88 | DEBUG_BOW_fpp
89 | wpn_crossbow_test_marek
90 | wpn_bow_test_marek
91 | ZZZZ3_Crossbow
92 | ZZZZ3_Crossbow
93 | wpn_2hp_bow_a_fpp_t9_challenge_archery_01
94 | wpn_2hp_bow_a_fpp_t9_challenge_archery_01
95 | Firearm_Shotgun_Upgrade8_challenge_kill_spree_wave_01
96 | Firearm_Shotgun_Upgrade8_challenge_kill_spree_wave_01
97 | Firearm_Shotgun_Upgrade8_challenge_kill_spree_wave_01
98 | wpn_2hp_bow_a_fpp_t3_playtest
99 | wpn_2hp_bow_a_fpp_t3_playtest
100 | Firearm_Shotgun_Challenge
101 | Firearm_Shotgun_Challenge
102 | Firearm_Shotgun_Challenge
103 | wpn_2hp_bow_starting
104 | wpn_2hp_bow_starting
105 | ABOW_TEST_SLOW
106 | ABOW_TEST_SLOW
107 | ABOW_TEST_FAST
108 | ABOW_TEST_FAST
109 | firearm_pistol_bd
110 | firearm_pistol_noise_bd
111 | firearm_rifle_bd
112 | firearm_shotgun_bd
113 | harpoon_crossbow
114 | harpoon_crossbow
115 | wpn_bolter_shotgun_quad_damage_challenge
116 | wpn_bolter_shotgun_quad_damage
117 | wpn_bolter_shotgun_push_away
118 | BoltCannonRush
119 | wpn_2hr_crossbow_challenge_park
120 | Weapon_Firearm_Pistol
121 | Weapon_Firearm_Pistol
122 | Weapon_Firearm_Submachinegun
123 | Weapon_Firearm_Submachinegun
124 | Weapon_Firearm_Rifle
125 | Weapon_Firearm_Rifle
126 | Weapon_Firearm_Shotgun
127 | Weapon_Firearm_Shotgun
128 | Weapon_Firearm_Pistol_Golden
129 | Weapon_Firearm_Pistol_Golden
130 | Weapon_Firearm_Submachinegun_Golden
131 | Weapon_Firearm_Submachinegun_Golden
132 | Weapon_Firearm_Rifle_Golden
133 | Weapon_Firearm_Rifle_Golden
134 | Weapon_Firearm_Shotgun_Golden
135 | Weapon_Firearm_Shotgun_Golden
136 | Weapon_Firearm_Rifle_NightVibes
137 | Weapon_Firearm_Rifle_NightVibes
138 | Weapon_Firearm_Pistol_Blue
139 | Weapon_Firearm_Pistol_Blue
140 | Weapon_Firearm_Submachinegun_Blue
141 | Weapon_Firearm_Submachinegun_Blue
142 | Weapon_Firearm_Rifle_Blue
143 | Weapon_Firearm_Rifle_Blue
144 | Weapon_Firearm_Shotgun_Blue
145 | Weapon_Firearm_Shotgun_Blue
146 | Weapon_Firearm_Pistol_Challenge
147 | Weapon_Firearm_Pistol_Challenge
148 | Weapon_Firearm_Submachinegun_Challenge
149 | Weapon_Firearm_Submachinegun_Challenge
150 | Weapon_Firearm_Rifle_Challenge
151 | Weapon_Firearm_Rifle_Challenge
152 | Weapon_Firearm_Shotgun_Challenge
153 | Weapon_Firearm_Shotgun_Challenge
154 | wpn_2hr_crossbow_challenge
155 | wpn_2hp_bow_prince_1
156 | wpn_2hp_bow_prince_1
157 | wpn_2hr_forge_carnage_1
158 | wpn_opera_crossbow
159 | wpn_2hp_bow_ballista
160 | wpn_2hr_crossbow_hunters
161 | Chapter2_Mission_wpn_2hr_crossbow_hunters
162 | wpn_2hp_bow_bozak
163 | wpn_2hp_bow_bozak
164 | wpn_2hp_bow_winter_elf
165 | wpn_2hp_bow_winter_elf_Artifact
166 | Weapon_Firearm_Submachinegun_DL1
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Flashlight.txt:
--------------------------------------------------------------------------------
1 | UVCannon
2 | prototype_flashlight
3 | FreecamFlashlight
4 | UV_Flashlight_1
5 | UV_Flashlight_2
6 | UV_Flashlight_3
7 | UV_Flashlight_4
8 | UV_Flashlight_5
9 | Attachable_Flashlight
10 | Attachable_Flashlight_Exterior
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/InventoryItem.txt:
--------------------------------------------------------------------------------
1 | EasterEgg_Bicycle
2 | Bicycle
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Lockpick.txt:
--------------------------------------------------------------------------------
1 | LockpickItem
2 | LockpickItem_Upgrade1
3 | LockpickItem_Upgrade2
4 | LockpickItem_Upgrade3
5 | LockpickItem_Upgrade4
6 | LockpickItem_Upgrade5
7 | LockpickItem_Upgrade6
8 | LockpickItem_Upgrade7
9 | LockpickItem_Upgrade8
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/LootPack.txt:
--------------------------------------------------------------------------------
1 | Event_WinterEvent_Present1
2 | Event_WinterEvent_Present2
3 | Event_WinterEvent_Present3
4 | Event_WinterEvent_Present4
5 | Event_WinterEvent_Present5
6 | LL_RewardPack_Bronze
7 | LL_RewardPack_Silver
8 | LL_RewardPack_Gold
9 | LL_RewardPack_Silver_Bow
10 | LL_RewardPack_Gold_Bow
11 | TGG_RewardPack
12 | TGG_RewardPack_NightWeapons
13 | BountyBonus_RewardPack
14 | Event_WinterEvent_StolenPresent
15 | Event_WinterEvent_SantaDropPresent
16 | Replayable_Missions_LootPack
17 | Replayable_Missions_LootPack_Small
18 | Dragonwarrior_LootPack
19 | Board_Quest_Lootpack
20 | TNF_Treasure_Lootpack
21 | Event_WinterEvent_Masks
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Medkit.txt:
--------------------------------------------------------------------------------
1 | Medkit_Large
2 | Medkit_Small
3 | Medkit_Small_Upgrade1
4 | Medkit_Small_Upgrade2
5 | Medkit_Small_Upgrade3
6 | Medkit_Small_Upgrade4
7 | Medkit_Small_Upgrade5
8 | Medkit_Small_Upgrade6
9 | Medkit_Small_Upgrade7
10 | Medkit_Small_Upgrade8
11 | prototype_flashlight_generator
12 | prototype_medkit_bandage
13 | prototype_medkit_regen
14 | prototype_medkit_regen_stamina
15 | Medkit_Small_Upgrade6_test
16 | PursuitBreakerSwitch
17 | PaperSheet
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Other.txt:
--------------------------------------------------------------------------------
1 | Preorder_artbook
2 | Preorder_comicbook
3 | Preorder_wallpapers
4 | Preorder_soundtrack
5 | prototype_faction_power_token
6 | ReinforcementFlare
7 | EmptySyringe
8 | prototype_qs_key_level1
9 | prototype_qs_key_level2
10 | prototype_qs_key_level3
11 | Waltz_box
12 | Test_ScavengerSugar
13 | RopeHookUpgrade
14 | frontier_key_1
15 | frontier_key_2
16 | frontier_key_3
17 | Quest_Bomb
18 | Quest_Alarm
19 | default_quest_item
20 | quest_Keyes_SpecialKey
21 | quest_looter_fuse
22 | quest_tbiiyc_ration
23 | quest_ps_algae
24 | Quest_Screwed_Map
25 | Quest_Predator_KarlsDebt
26 | Quest_Predator_ThorstensDebt
27 | Quest_Predator_ThorstensKey
28 | Quest_Predator_RoysDebt
29 | Quest_Predator_RoysWeapon
30 | Quest_Predator_FallenPKLoot
31 | Quest_Predator_CorinasDebt
32 | Quest_Predator_CorinasBag
33 | Quest_Predator_CorinasBackpack
34 | Quest_Predator_CorinasSatchel
35 | Quest_Predator_ErnstContract
36 | Quest_Predator_ErnstDebt
37 | Quest_Hunting_Demolisher
38 | Quest_Hunting_Bolter
39 | Quest_Hunting_Goon
40 | Quest_Hunting_Spitter
41 | Quest_Hunting_Banshee
42 | Quest_Hunting_Charger
43 | Quest_Hunting_Volatile
44 | Quest_Master_Dyes
45 | Quest_Master_Methadone
46 | Quest_NoDeadLeftBehind_Dogtags
47 | Quest_Purple_BooksAboutAnimals
48 | Quest_Cardio_Backpack
49 | Quest_Cardio_Suplements
50 | Quest_Cardio_Collection_01
51 | Quest_Cardio_Collection_02
52 | Quest_Cardio_Collection_03
53 | Quest_Cardio_Collection_04
54 | Quest_Cardio_Collection_05
55 | Quest_Cardio_BatteryPack
56 | Quest_Painting_Orange
57 | Quest_Painting_Blue
58 | Quest_Painting_Green
59 | Quest_Markers_GREMarker
60 | Quest_Markers_Key
61 | Quest_Markers_GREMarker_CIN
62 | Quest_Ogar_OgarsKey
63 | Quest_Cheers_MarcosKey
64 | Quest_Deserter_DogTag
65 | Quest_FeatherMyNeck_MinkScarf
66 | Quest_Deserter_Code
67 | Quest_TheCDToSaveTheHumanity_CD
68 | Quest_Hunting_Yarrow
69 | Quest_Moonshine_bottle
70 | Quest_Librarian_Book01
71 | Quest_Librarian_Book02
72 | Quest_Librarian_Book03
73 | Quest_Librarian_Book04
74 | Quest_Librarian_Book05
75 | Quest_Librarian_Book06
76 | Quest_Librarian_Book07
77 | Quest_Librarian_Book08
78 | Quest_Librarian_Book09
79 | Quest_Librarian_Book10
80 | Quest_Librarian_Book11
81 | Quest_Librarian_Book12
82 | Quest_Librarian_Book13
83 | Quest_Librarian_Book14
84 | Quest_Librarian_Book15
85 | Quest_Librarian_Book16
86 | Quest_Librarian_Book17
87 | Quest_Librarian_Book18
88 | Quest_Librarian_Book19
89 | Quest_Librarian_Book20
90 | Quest_Librarian_Book21
91 | Quest_Librarian_Book22
92 | Quest_Librarian_Book23
93 | Quest_Librarian_Book25
94 | Quest_Librarian_Book26
95 | Quest_Librarian_Book27
96 | Quest_Librarian_Book28
97 | Quest_Librarian_Book29
98 | Quest_Librarian_Book30
99 | Quest_Librarian_Book31
100 | Quest_Librarian_Book32
101 | Quest_Librarian_Book33
102 | Quest_Librarian_Book34
103 | Quest_Librarian_Book35
104 | Quest_Librarian_Book36
105 | Quest_Librarian_Book37
106 | Quest_Librarian_Book38
107 | Quest_Librarian_Book39
108 | Quest_Librarian_Book40
109 | Quest_Librarian_Book41
110 | Quest_Librarian_Book42
111 | Quest_Librarian_Book43
112 | Quest_Librarian_Book44
113 | Quest_Librarian_Book45
114 | Quest_Librarian_Book46
115 | Quest_Librarian_Book47
116 | Quest_Librarian_Book48
117 | Quest_Librarian_Book49
118 | Quest_Librarian_Book50
119 | Quest_Librarian_Book51
120 | Quest_Librarian_Book52
121 | Quest_Librarian_Book53
122 | Quest_Librarian_Book54
123 | Quest_Librarian_Book55
124 | Quest_Librarian_Book56
125 | Quest_Librarian_Book57
126 | Quest_Librarian_Book58
127 | Quest_Librarian_Book59
128 | Quest_Librarian_Book60
129 | Quest_Librarian_Book61
130 | Quest_Librarian_Book62
131 | Quest_Librarian_Book63
132 | Quest_Librarian_Book64
133 | Quest_Librarian_Book65
134 | Quest_Librarian_Book66
135 | Quest_Librarian_Book67
136 | Quest_Librarian_Book68
137 | Quest_Librarian_Book69
138 | Quest_Librarian_Book70
139 | Quest_Librarian_Book71
140 | Quest_Librarian_Book72
141 | Quest_Librarian_Book73
142 | Quest_Librarian_Book74
143 | PlayerBackpack
144 | PlayerBinoculars
145 | Corruptor_Key
146 | ScareCrow
147 | TreeBranch
148 | ElectricWrench
149 | CoopHealBandage
150 | Inhibitor_Container
151 | Inhibitor_Container_Bundle2
152 | Inhibitor_Container_Bundle3
153 | Inhibitor_Syringe
154 | RopeHook_Snowman
155 | RopeHook_Snowman_CableSkin
156 | RopeHook_Krampus
157 | RopeHook_Krampus_CableSkin
158 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/SurvivorPack.txt:
--------------------------------------------------------------------------------
1 | SurvivorPack_Test
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/SyringeAntizin.txt:
--------------------------------------------------------------------------------
1 | AntizinContainer
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/ThrowableLiquid.txt:
--------------------------------------------------------------------------------
1 | Throwable_Molotov
2 | Throwable_Molotov_Upgrade1
3 | Throwable_Molotov_Upgrade2
4 | Throwable_Molotov_Upgrade3
5 | Throwable_Molotov_Upgrade4
6 | Throwable_Molotov_Upgrade5
7 | Throwable_Molotov_Upgrade6
8 | Throwable_Molotov_Upgrade7
9 | Throwable_Molotov_Upgrade8
10 | ZZZZ3_TempFireCage
11 | ZZZZ3_TempElectricCage
12 | ZZZZ3_TempElectricCageShock
13 | Goon_Fire_Puddle
14 | Goon_Toxic_Puddle
15 | Goon_Electric_Puddle
16 | Plaguebearer_Puddle
17 | Goon_Toxic_Large_Puddle
18 | Goon_Toxic_Small_Puddle
19 | Gas_Tank_Fire_Puddle
20 | DLC_Opera_Throwable_Molotov
21 | Throwable_Molotov_DLC_Opera_AI
22 | Throwable_UVFlare
23 | Throwable_LavanMolotovSinpersAlley
24 | Molotov_Lantern_Small
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Token.txt:
--------------------------------------------------------------------------------
1 | Token_Exploration
2 | Token_Scavengers
3 | Token_Peacekeepers
4 | Token_MutationSamples
5 | Token_NightrunnerToken
6 | Token_HuntersToken
7 | Token_OperaToken
8 | Token_CoopMission
9 | Token_LegendPoints
10 | Event_WinterEvent_Valuable_SantaLetter
11 | Chapter1_Regular_Mission_Ticket
12 | Chapter1_Elite_Mission_Ticket
13 | Chapter2_Regular_Mission_Ticket
14 | Chapter2_Elite_Mission_Ticket
15 | Token_TowerRaid_Perk
16 | Token_TowerRaid_Currency
17 | Token_Winter
18 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Valuable.txt:
--------------------------------------------------------------------------------
1 | Valuable_Toilet_Paper
2 | Valuable_Soaps
3 | Valuable_Aspirin
4 | Valuable_Dried_Fruit
5 | Valuable_Cigarettes
6 | Valuable_Rice
7 | Valuable_Beeswax
8 | Valuable_Jewelry
9 | Valuable_Antidepressants
10 | Valuable_Wristwatch
11 | Valuable_Vodka
12 | Valuable_Tools
13 | Valuable_Canned_Food
14 | Valuable_Shoes
15 | Valuable_Perfume
16 | Valuable_Inhaler
17 | Valuable_Whiskey
18 | Valuable_Manual
19 | Valuable_MRE_Rations
20 | Valuable_Walkie_Talkies
21 | Valuable_Morphine
22 | Valuable_Smartphone
23 | Valuable_Wine
24 | Valuable_Crystal_White
25 | Valuable_Crystal_Green
26 | Valuable_Crystal_Blue
27 | Valuable_Crystal_Violet
28 | Valuable_Crystal_Orange
29 | Valuable_Crystal_Jewelry
30 | Valuable_Crystal_Statuette
31 | Valuable_Jewelry_TeresaNecklace
32 | Valuable_Perfume_ThePerfume
33 | Valuable_Jewelry_RoseGarden
34 | Valuable_Crystal_ForunteTeller
35 | Valuable_Jewelry_SurvivorsTrinket
36 | Valuable_Jewelry_PKTrinket
37 | Valuable_Manual_Parkour
38 | Valuable_Manual_Combat
39 | Valuable_Wine_NR_Party
40 | Valuable_AS_ThePilot_AerialInsignia
41 | Valuable_AS_LifeFindsaWay_Seeds
42 | Valuable_AS_Missy_Cookbook
43 | Valuable_AS_TheWaterFight_Soap
44 | Valuable_AS_FishMonk_Bait
45 | Valuable_AS_TheWalls_Cornerstone
46 | Valuable_AS_TheHunter_Chipper
47 | Valuable_Payday2_Diamond
48 | EasterEgg_ValuableCaps
49 | Valuable_Inhibox
50 | Valuable_Inhibox_NG
51 | Valuable_Zongzi
52 | Inhibitor
53 | Loot_BanditEar
54 | Loot_PKDogTag
55 | valuable_5
56 | valuable_20
57 | valuable_50
58 | valuable_200
59 | valuable_500
60 | Test_Acumulator
61 | Test_NighrunnerTools
62 | Challenge_Valuable
63 | Plant_Recluse
64 | Valuable_HakonWatch
65 | challenge_Flag
66 | challenge_Crystal
67 | challenge_Crystal_2
68 | Quest_SentimentalValue_MusicBox
69 | Chapter2_Mission_HagTrackItem
70 | Event_WinterEvent_Valuable_Baubles
71 | Event_WinterEvent_Valuable_TwinkleLights
72 | Event_WinterEvent_Valuable_FeastIngredient
73 | Event_WinterEvent_Valuable_DecorationsBundle
74 | Event_WinterEvent_Valuable_FinalDecorationsBundle
75 | Event_WinterEvent_Valuable_Star
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/VehicleUpgrade.txt:
--------------------------------------------------------------------------------
1 | ZZZZ3_CarPart_Test_Ram_lv1
2 | ZZZZ3_CarPart_Test_Ram_lv2
3 | ZZZZ3_CarPart_UV1
4 | ZZZZ3_CarPart_UV2
5 | ZZZZ3_CarPart_Test_Nitrov1
6 | ZZZZ3_CarPart_Test_Nitrov2
7 | ZZZZ3_CarPart_Audio
8 | ZZZZ3_CarPart_RemoteModule
9 | ZZZZ3_CarPart_Armor_Lvl1
10 | ZZZZ3_CarPart_Armor_Lvl2
11 | ZZZZ3_CarPart_BasicWheels
12 | ZZZZ3_CarPart_UpgradeWheels
13 | ZZZZ3_CarPart_ElectricCage
14 | ZZZZ3_CarPart_FlameThrower
15 | ZZZZ3_CarPart_MineDispenser
16 | ZZZZ3_Component_NutsBolts
17 | ZZZZ3_Component_Wire
18 | ZZZZ3_Component_SteelTubing
19 | ZZZZ3_Component_Rubber
20 | ZZZZ3_Component_Lubricant
21 | ZZZZ3_Component_Synthetic
22 | ZZZZ3_CarPart_Test_Engine_v1_01
23 | ZZZZ3_CarPart_Test_Engine_v2_02
24 | ZZZZ3_CarPart_Test_Engine_v3_03
25 | ZZZZ3_CarPart_Test_Engine_v4_04
26 | ZZZZ3_CarPart_Test_Engine_v5_05
27 | ZZZZ3_CarPart_Test_Engine_v6
28 | ZZZZ3_CarPart_Test_Turbo_v1_01
29 | ZZZZ3_CarPart_Test_Turbo_v2_02
30 | ZZZZ3_CarPart_Test_Turbo_v3_03
31 | ZZZZ3_CarPart_Test_Turbo_v4_04
32 | ZZZZ3_CarPart_Test_Turbo_v5_05
33 | ZZZZ3_CarPart_Test_Turbo_v6
34 | ZZZZ3_CarPart_Test_Suspension_v1_01
35 | ZZZZ3_CarPart_Test_Suspension_v2_02
36 | ZZZZ3_CarPart_Test_Suspension_v3_03
37 | ZZZZ3_CarPart_Test_Suspension_v4_04
38 | ZZZZ3_CarPart_Test_Suspension_v5_05
39 | ZZZZ3_CarPart_Test_Suspension_v6
40 | ZZZZ3_CarPart_Test_Tires_v1_01
41 | ZZZZ3_CarPart_Test_Tires_v2_02
42 | ZZZZ3_CarPart_Test_Tires_v3_03
43 | ZZZZ3_CarPart_Test_Tires_v4_04
44 | ZZZZ3_CarPart_Test_Tires_v5_05
45 | ZZZZ3_CarPart_Test_Tires_v6
46 | ZZZZ3_CarPart_Test_Brakes_v1_01
47 | ZZZZ3_CarPart_Test_Brakes_v2_02
48 | ZZZZ3_CarPart_Test_Brakes_v3_03
49 | ZZZZ3_CarPart_Test_Brakes_v4_04
50 | ZZZZ3_CarPart_Test_Brakes_v5_05
51 | ZZZZ3_CarPart_Test_Brakes_v6
52 | ZZZZ3_CarPart_Test_Engine_v3_FIRST
53 | ZZZZ3_CarPart_Test_Turbo_v2_FIRST
54 | ZZZZ3_CarPart_Test_Suspension_v2_FIRST
55 | ZZZZ3_CarPart_Test_Tires_v3_FIRST
56 | ZZZZ3_CarPart_Test_Brakes_v4_FIRST
57 | ZZZZ3_CarPart_FuelTank_L1
58 | ZZZZ3_CarPart_FuelTank_L2
59 | ZZZZ3_CarPart_Armor_Lvl3
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/IDs/Voucher.txt:
--------------------------------------------------------------------------------
1 | ZZ1Patch_Menu_Docket
2 | ZZ3Patch_Menu_DocketA
3 | ZZ3Patch_Menu_DocketB
4 | ZZ3Patch_Menu_DocketC
5 | ZZ3Patch_Menu_DocketD
6 | ZZ3Patch_Menu_DocketBozak
7 | Menu_DocketE01
8 | Menu_DocketE02
9 | Menu_DocketE03
10 | Menu_DocketE04
11 | Menu_DocketE05
12 | Menu_DocketE06
13 | Menu_DocketE07
14 | Menu_DocketE08
15 | Menu_DocketE09
16 | Menu_DocketE10
17 | Menu_DocketF01
18 | Menu_DocketF02
19 | Menu_DocketF03
20 | Menu_DocketF04
21 | Menu_DocketF05
22 | Menu_DocketF06
23 | Menu_DocketF07
24 | Menu_DocketF08
25 | Menu_DocketF09
26 | Menu_DocketF10
27 | ZZ1Patch_M_CampanionAppVoucher
28 | ZZ1Patch_MQ_CampanionAppVoucher
29 | ZZ1Patch_CHEAT_AddDocket
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/build.rs:
--------------------------------------------------------------------------------
1 | fn main() {
2 | tauri_build::build()
3 | }
4 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/capabilities/migrated.json:
--------------------------------------------------------------------------------
1 | {
2 | "identifier": "migrated",
3 | "description": "permissions that were migrated from v1",
4 | "local": true,
5 | "windows": [
6 | "main"
7 | ],
8 | "permissions": [
9 | "core:default",
10 | "fs:allow-read-file",
11 | "fs:allow-write-file",
12 | "fs:allow-read-dir",
13 | "fs:allow-copy-file",
14 | "fs:allow-mkdir",
15 | "fs:allow-remove",
16 | "fs:allow-remove",
17 | "fs:allow-rename",
18 | "fs:allow-exists",
19 | {
20 | "identifier": "fs:scope",
21 | "allow": [
22 | "$RESOURCE/*",
23 | "$APPCONFIG",
24 | "$APPCONFIG/*"
25 | ]
26 | },
27 | "shell:allow-open",
28 | "dialog:allow-open",
29 | "dialog:allow-save",
30 | "dialog:allow-message",
31 | "dialog:allow-ask",
32 | "dialog:allow-confirm",
33 | "dialog:default",
34 | "shell:default",
35 | "fs:default",
36 | "store:default"
37 | ]
38 | }
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/gen/schemas/capabilities.json:
--------------------------------------------------------------------------------
1 | {"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:default","fs:allow-read-file","fs:allow-write-file","fs:allow-read-dir","fs:allow-copy-file","fs:allow-mkdir","fs:allow-remove","fs:allow-remove","fs:allow-rename","fs:allow-exists",{"identifier":"fs:scope","allow":["$RESOURCE/*","$APPCONFIG","$APPCONFIG/*"]},"shell:allow-open","dialog:allow-open","dialog:allow-save","dialog:allow-message","dialog:allow-ask","dialog:allow-confirm","dialog:default","shell:default","fs:default","store:default"]}}
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/128x128.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/128x128@2x.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/32x32.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square107x107Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square107x107Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square142x142Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square142x142Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square150x150Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square150x150Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square284x284Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square284x284Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square30x30Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square30x30Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square310x310Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square310x310Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square44x44Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square44x44Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square71x71Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square71x71Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/Square89x89Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/Square89x89Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/StoreLogo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/128x128.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/128x128@2x.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/32x32.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square107x107Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square107x107Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square142x142Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square142x142Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square150x150Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square150x150Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square284x284Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square284x284Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square30x30Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square30x30Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square310x310Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square310x310Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square44x44Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square44x44Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square71x71Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square71x71Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/Square89x89Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/Square89x89Logo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/StoreLogo.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/icon.icns
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/icon.ico
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/base/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/base/icon.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/icon.icns
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/icon.ico
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/icons/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Marcel-TO/DL2_Save_Editor/51c620b6a611cbc5c27806ef5cd3896addf4e24f/savegame-editor/src-tauri/icons/icon.png
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/src/logger.rs:
--------------------------------------------------------------------------------
1 | #![allow(dead_code)]
2 | #![allow(unused_variables)]
3 | use std::io;
4 | use std::io::prelude::*;
5 | use term;
6 | use term_size;
7 |
8 | pub struct ConsoleLogger {
9 | pub log_histroy: Vec,
10 | }
11 |
12 | pub trait LoggerFunctions {
13 | fn log_message(&mut self, message: &str, attributes: Vec);
14 | fn log_message_no_linebreak(&mut self, message: &str, attributes: Vec);
15 | fn log_error(&mut self, message: &str);
16 | fn log_break(&mut self);
17 | fn wait_for_input(&self);
18 | fn get_user_input(&self) -> String;
19 | fn log_title_page(&self);
20 | }
21 |
22 | impl LoggerFunctions for ConsoleLogger {
23 | fn log_message(&mut self, message: &str, attributes: Vec) {
24 | println!("{:?}", message);
25 | // Adding the message to the log history.
26 | self.log_histroy.push(message.to_string());
27 | }
28 |
29 | fn log_message_no_linebreak(&mut self, message: &str, attributes: Vec) {
30 | print!("{:?}", message);
31 |
32 | // terminal.reset().unwrap();
33 | }
34 |
35 | fn log_error(&mut self, message: &str) {
36 | let mut terminal = term::stdout().unwrap();
37 | terminal.fg(term::color::BRIGHT_RED).unwrap();
38 | let error_msg = format!("Error: {}", message);
39 | println!("{:?}", error_msg);
40 | self.log_histroy.push(error_msg);
41 |
42 | terminal.reset().unwrap();
43 | }
44 |
45 | fn log_break(&mut self) {
46 | println!("");
47 | }
48 |
49 | fn wait_for_input(&self) {
50 | let mut stdout = io::stdout();
51 | stdout.write(b"Press Enter to continue...").unwrap();
52 | stdout.flush().unwrap();
53 | io::stdin().read(&mut [0]).unwrap();
54 |
55 | if let Some((w, _)) = term_size::dimensions() {
56 | print!("\x1B[1A");
57 |
58 | for _ in 0..w {
59 | print!(" ");
60 | }
61 |
62 | println!("");
63 | }
64 | }
65 |
66 | fn get_user_input(&self) -> String {
67 | let mut stdout = io::stdout();
68 | stdout.write(b"[devtool]>>>").unwrap();
69 | stdout.flush().unwrap();
70 |
71 | let mut input = String::new();
72 | io::stdin().read_line(&mut input).unwrap();
73 | input.trim().to_string()
74 | }
75 |
76 | fn log_title_page(&self) {
77 | println!(
78 | "
79 | _____ _____
80 | ( ___ ) ( ___ )
81 | | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| |
82 | | | ███████╗ █████╗ ██╗ ██╗███████╗ | |
83 | | | ██╔════╝██╔══██╗██║ ██║██╔════╝ | |
84 | | | ███████╗███████║██║ ██║█████╗ | |
85 | | | ╚════██║██╔══██║╚██╗ ██╔╝██╔══╝ | |
86 | | | ███████║██║ ██║ ╚████╔╝ ███████╗ | |
87 | | | ╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝ | |
88 | | | ███████╗██████╗ ██╗████████╗ ██████╗ ██████╗ | |
89 | | | ██╔════╝██╔══██╗██║╚══██╔══╝██╔═══██╗██╔══██╗ | |
90 | | | █████╗ ██║ ██║██║ ██║ ██║ ██║██████╔╝ | |
91 | | | ██╔══╝ ██║ ██║██║ ██║ ██║ ██║██╔══██╗ | |
92 | | | ███████╗██████╔╝██║ ██║ ╚██████╔╝██║ ██║ | |
93 | | | ╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ | |
94 | | | ██████╗ ███████╗██╗ ██╗████████╗ ██████╗ ██████╗ ██╗ | |
95 | | | ██╔══██╗██╔════╝██║ ██║╚══██╔══╝██╔═══██╗██╔═══██╗██║ | |
96 | | | ██║ ██║█████╗ ██║ ██║ ██║ ██║ ██║██║ ██║██║ | |
97 | | | ██║ ██║██╔══╝ ╚██╗ ██╔╝ ██║ ██║ ██║██║ ██║██║ | |
98 | | | ██████╔╝███████╗ ╚████╔╝ ██║ ╚██████╔╝╚██████╔╝███████╗ | |
99 | | | ╚═════╝ ╚══════╝ ╚═══╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ | |
100 | | | Author: Marcel McHawk | |
101 | | | License: MIT | |
102 | |___|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|___|
103 | (_____) (_____)
104 | "
105 | );
106 | }
107 | }
108 |
109 | impl ConsoleLogger {
110 | pub fn new() -> Self {
111 | ConsoleLogger {
112 | log_histroy: Vec::new(),
113 | }
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/src/save_logic/bypass_crc.rs:
--------------------------------------------------------------------------------
1 | use crate::save_logic::file_analyser::get_contents_from_file;
2 | use std::io::Write;
3 | use std::{error::Error, fs};
4 |
5 | // Define global result definition for easier readability.
6 | type Result = std::result::Result>;
7 |
8 | /// Represents a method for fetching all ID datas.
9 | ///
10 | /// ### Returns `Vec`
11 | /// A list of all fetched id sections.
12 | pub fn get_files_and_copy_to_destination(crc_path: &String, game_files_path: &str) -> Result {
13 | let entries = fs::read_dir(crc_path).map_err(|e| format!("Error reading directory: {}", e))?;
14 |
15 | for entry in entries {
16 | let entry = entry.map_err(|e| format!("Error reading directory entry: {}", e))?;
17 |
18 | if entry.file_type().map_or(false, |t| t.is_file()) {
19 | let path = entry.path();
20 | let filename = path
21 | .file_name()
22 | .ok_or_else(|| "Error getting file name".to_string())?
23 | .to_string_lossy()
24 | .to_string();
25 | let file_content = get_contents_from_file(
26 | &path
27 | .to_str()
28 | .ok_or_else(|| "Error converting path to string".to_string())?
29 | .to_string(),
30 | )
31 | .map_err(|e| format!("Error reading file content: {}", e))?;
32 | let target_file_path = format!("{}/{}", game_files_path, filename);
33 | let mut file = fs::File::create(&target_file_path)
34 | .map_err(|e| format!("Error creating file: {}", e))?;
35 | file.write_all(&file_content)
36 | .map_err(|e| format!("Error writing to file: {}", e))?;
37 | }
38 | }
39 |
40 | Ok(true)
41 | }
42 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/src/save_logic/id_fetcher.rs:
--------------------------------------------------------------------------------
1 | use crate::save_logic::struct_data::IdData;
2 | use std::io;
3 | use std::{error::Error, fs, path::Path};
4 |
5 | // Define global result definition for easier readability.
6 | type Result = std::result::Result>;
7 |
8 | /// Represents a method for fetching all ID datas.
9 | ///
10 | /// ### Returns `Vec`
11 | /// A list of all fetched id sections.
12 | pub fn fetch_ids(id_path: &String) -> Result> {
13 | let mut id_datas: Vec = Vec::new();
14 | let entries = fs::read_dir(id_path).unwrap();
15 |
16 | for entry in entries {
17 | let entry = entry.map_err(|e| format!("Error reading directory entry: {}", e))?;
18 |
19 | if entry.file_type().map_or(false, |t| t.is_file()) {
20 | if let Ok(id_data) = read_id_file(entry.path().to_str().ok_or("Invalid file path")?) {
21 | id_datas.push(id_data);
22 | }
23 | }
24 | }
25 |
26 | Ok(id_datas)
27 | }
28 |
29 | pub fn update_ids(new_file_path: &str, source_path: &str) -> io::Result<()> {
30 | // Iterate over the contents of the source directory
31 | for entry in fs::read_dir(source_path)? {
32 | let entry = entry?;
33 | let path = entry.path();
34 |
35 | // Remove each file or directory in the source directory
36 | if path.is_file() {
37 | fs::remove_file(&path)?;
38 | } else if path.is_dir() {
39 | fs::remove_dir_all(&path)?;
40 | }
41 | }
42 |
43 | // Copy all contents from the new file path to the source directory
44 | fs::copy(new_file_path, source_path)?;
45 |
46 | Ok(())
47 | }
48 |
49 | /// Represents a method for reading a single id file and retrieving the IDs.
50 | ///
51 | /// ### Parameter
52 | /// - `file_path`: The filepath from the current selected ID file.
53 | ///
54 | /// ### Returns `Result`
55 | /// The found IDs from the selected file.
56 | fn read_id_file(file_path: &str) -> Result {
57 | let path = Path::new(file_path);
58 | let filename = path
59 | .file_stem()
60 | .and_then(|s| s.to_str())
61 | .unwrap_or_default()
62 | .to_string();
63 |
64 | let file_content = fs::read_to_string(file_path)?;
65 |
66 | let ids: Vec = file_content.lines().map(|line| line.to_string()).collect();
67 |
68 | Ok(IdData::new(filename, ids))
69 | }
70 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/src/save_logic/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod bypass_crc;
2 | pub mod file_analyser;
3 | pub mod id_fetcher;
4 | pub mod struct_data;
5 | pub mod test_saves;
6 | pub mod save_outpost;
7 | pub mod patched_items_fetcher;
8 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/src/save_logic/patched_items_fetcher.rs:
--------------------------------------------------------------------------------
1 | use crate::save_logic::struct_data::PatchedItems;
2 | use std::{error::Error, fs};
3 |
4 | // Define global result definition for easier readability.
5 | type Result = std::result::Result>;
6 |
7 | /// Represents a method for fetching all patched items.
8 | ///
9 | /// ### Returns `PatchedItems`
10 | /// A collection of all patched items.
11 | pub fn fetch_patched_ids(id_path: &String) -> Result {
12 | let entries = fs::read_dir(id_path).unwrap();
13 |
14 | // Check if there is a file called "not_dropable.txt" and "not_shareable.txt"
15 | let mut not_dropable: Vec = Vec::new();
16 | let mut not_shareable: Vec = Vec::new();
17 |
18 | for entry in entries {
19 | let entry = entry.map_err(|e| format!("Error reading directory entry: {}", e))?;
20 |
21 | if entry.file_type().map_or(false, |t| t.is_file()) {
22 | if let Ok(ids) = read_patch_file(entry.path().to_str().ok_or("Invalid file path")?) {
23 | if entry.file_name().to_str().unwrap() == "not_dropable.txt" {
24 | not_dropable = ids;
25 | } else if entry.file_name().to_str().unwrap() == "not_shareable.txt" {
26 | not_shareable = ids;
27 | }
28 | }
29 | }
30 | }
31 |
32 | // If not_dropable or not_shareable is empty, return an error
33 | if not_dropable.is_empty() || not_shareable.is_empty() {
34 | return Err("Could not find the patched files.".into());
35 | }
36 |
37 | Ok(PatchedItems::new(not_dropable, not_shareable))
38 | }
39 |
40 | /// Represents a method for reading a single patched file and retrieving the IDs.
41 | ///
42 | /// ### Parameter
43 | /// - `file_path`: The filepath from the current selected ID file.
44 | ///
45 | /// ### Returns `Result`
46 | /// The found IDs from the selected file.
47 | fn read_patch_file(file_path: &str) -> Result> {
48 | let file_content = fs::read_to_string(file_path)?;
49 |
50 | let ids: Vec = file_content.lines().map(|line| line.to_string()).collect();
51 |
52 | Ok(ids)
53 | }
54 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/src/save_logic/save_outpost.rs:
--------------------------------------------------------------------------------
1 | use tauri::AppHandle;
2 |
3 | use crate::load_save;
4 | use crate::save_logic::struct_data::OutpostSave;
5 | use std::fs::{DirEntry, ReadDir};
6 | use std::io;
7 | use std::path::PathBuf;
8 | use std::{error::Error, fs};
9 |
10 | use super::struct_data::SaveFile;
11 |
12 | // Define global result definition for easier readability.
13 | type Result = std::result::Result>;
14 |
15 | /// Represents a method for fetching all saves from the dedicated outpost directory.
16 | ///
17 | /// ### Returns `Vec`
18 | /// A list of all fetched outpost saves.
19 | pub fn fetch_outpost_saves(
20 | app_handle: AppHandle,
21 | outpost_path: &String,
22 | ) -> Result> {
23 | // Initialize the vector for the outpost saves.
24 | let mut outpost_saves: Vec = Vec::new();
25 | // Read the directory entries.
26 | let entries: ReadDir = fs::read_dir(outpost_path).unwrap();
27 |
28 | // Iterate over each entry in the outpost directory.
29 | for save_dir in entries {
30 | // Get the entry
31 | let entry: DirEntry =
32 | save_dir.map_err(|e: io::Error| format!("Error reading directory entry: {}", e))?;
33 |
34 | // Check if the entry is a directory.
35 | if entry.file_type().map_or(false, |t| t.is_dir()) {
36 | // get file inside the directory.
37 | let entries: ReadDir =
38 | fs::read_dir(entry.path().to_str().ok_or("Invalid file path")?).unwrap();
39 | // get the 2 needed files (the save.json and the file that ends with .sav).
40 | let mut save_file: Option = None;
41 | let mut save_json: Option = None;
42 | // iterate over all entries in the directory.
43 | for entry in entries {
44 | let entry: DirEntry = entry
45 | .map_err(|e: io::Error| format!("Error reading directory entry: {}", e))?;
46 | // check if the entry is a file.
47 | if entry.file_type().map_or(false, |t| t.is_file()) {
48 | let path = entry.path();
49 | // check if the file is a save file or a save.json file.
50 | if path.extension().map_or(false, |e| e == "sav") {
51 | save_file = Some(path);
52 | } else if path.file_name().map_or(false, |f| f == "save.json") {
53 | save_json = Some(path);
54 | }
55 | }
56 | }
57 |
58 | // check if both files are found
59 | if save_file.is_none() || save_json.is_none() {
60 | return Err("Missing save file or save.json".into());
61 | }
62 |
63 | // read the save.json file
64 | let save_json = fs::read_to_string(save_json.unwrap())?;
65 | // convert to json
66 | let save_json: serde_json::Value = serde_json::from_str(&save_json)?;
67 |
68 | // get the path from the save file and call the read_save_file function
69 | let save_file: PathBuf = save_file.unwrap();
70 | let save_file: std::result::Result = load_save(
71 | app_handle.clone(),
72 | save_file.to_str().ok_or("Invalid file path")?,
73 | false,
74 | false,
75 | );
76 |
77 | // return the OutpostSave struct
78 | match save_file {
79 | Ok(save_file) => outpost_saves.push(OutpostSave::new(
80 | save_json["name"].as_str().unwrap_or("").to_string(),
81 | save_json["owner"].as_str().unwrap_or("").to_string(),
82 | save_json["description"].as_str().unwrap_or("").to_string(),
83 | save_json["features"]
84 | .as_array()
85 | .unwrap_or(&vec![])
86 | .iter()
87 | .filter_map(|v| v.as_str().map(|s| s.to_string()))
88 | .collect::>(),
89 | save_json["version"].as_str().unwrap_or("").to_string(),
90 | save_file,
91 | )),
92 | Err(e) => return Err(e.into()),
93 | }
94 | }
95 | }
96 |
97 | Ok(outpost_saves)
98 | }
99 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/src/save_logic/test_saves.rs:
--------------------------------------------------------------------------------
1 | #[cfg(test)]
2 | mod tests {
3 | use crate::logger::ConsoleLogger;
4 | use crate::save_logic::file_analyser::{get_contents_from_file, load_save_file};
5 | use crate::save_logic::id_fetcher::fetch_ids;
6 | use dotenv::dotenv;
7 | use std::fs;
8 | use std::path::Path;
9 |
10 | #[test]
11 | fn test_items_for_various_save_files() {
12 | dotenv().ok();
13 |
14 | let mut logger = ConsoleLogger::new();
15 |
16 | let dir_string =
17 | std::env::var("SAVE_DIRECTORY_PATH").expect("SAVE_DIRECTORY_PATH must be set.");
18 | let dir_path = Path::new(dir_string.as_str());
19 |
20 | let ids_string =
21 | std::env::var("IDS_DIRECTORY_PATH").expect("IDS_DIRECTORY_PATH must be set.");
22 | let ids = fetch_ids(&ids_string).unwrap();
23 |
24 | if dir_path.is_dir() {
25 | for entry in fs::read_dir(dir_path).unwrap() {
26 | let entry = entry.unwrap();
27 | let path = entry.path();
28 |
29 | if path.is_file() {
30 | if let Some(file_name) = path.file_name() {
31 | // Check if the file has the desired extension
32 | if file_name.to_string_lossy().ends_with(".sav") {
33 | let file_content: Vec =
34 | get_contents_from_file(path.to_str().unwrap()).unwrap();
35 | let save_result = load_save_file(
36 | path.to_str().unwrap(),
37 | file_content,
38 | ids.clone(),
39 | &mut logger,
40 | false,
41 | false,
42 | );
43 | let save_file = save_result.unwrap();
44 |
45 | assert!(
46 | save_file.items.len() > 0,
47 | "Save file at path '{}' should have at least one item, but it has {} items.",
48 | path.to_str().unwrap(),
49 | save_file.items.len()
50 | );
51 | }
52 | }
53 | }
54 | }
55 | } else {
56 | assert!(false, "The path given by .env is not a directory");
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/savegame-editor/src-tauri/tauri.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "build": {
3 | "beforeDevCommand": "npm run dev",
4 | "beforeBuildCommand": "npm run build",
5 | "frontendDist": "../dist",
6 | "devUrl": "http://localhost:1420"
7 | },
8 | "bundle": {
9 | "resources": [
10 | "./IDs/*",
11 | "./CRC_Bypass/*",
12 | "./Hawks_Outpost/**/*",
13 | "./Patched_Items/*"
14 | ],
15 | "active": true,
16 | "targets": "all",
17 | "icon": [
18 | "icons/32x32.png",
19 | "icons/128x128.png",
20 | "icons/128x128@2x.png",
21 | "icons/icon.icns",
22 | "icons/icon.ico"
23 | ]
24 | },
25 | "productName": "Dying Light 2 Save Editor",
26 | "mainBinaryName": "Dying Light 2 Save Editor",
27 | "version": "1.0.8",
28 | "identifier": "com.dyinglight.save.editor",
29 | "plugins": {},
30 | "app": {
31 | "withGlobalTauri": false,
32 | "windows": [
33 | {
34 | "fullscreen": false,
35 | "resizable": true,
36 | "maximized": true,
37 | "title": "Dying Light 2 Save Editor",
38 | "width": 1080,
39 | "height": 800,
40 | "useHttpsScheme": true
41 | }
42 | ],
43 | "security": {
44 | "csp": null
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/savegame-editor/src/App.css:
--------------------------------------------------------------------------------
1 | .background-image-container {
2 | background-image: var(--background-image);
3 | background-position: center;
4 | background-size: cover;
5 | background-attachment: fixed;
6 | }
--------------------------------------------------------------------------------
/savegame-editor/src/assets/react.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/breadcrums-component.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Breadcrumb,
3 | BreadcrumbItem,
4 | BreadcrumbLink,
5 | BreadcrumbList,
6 | BreadcrumbPage,
7 | BreadcrumbSeparator,
8 | } from "@/components/ui/breadcrumb"
9 |
10 | export const BreadcrumbComponent = ({breadcrumbLinks, breadcrumbItem}: {breadcrumbLinks: {title:string, href:string}[], breadcrumbItem: string}) => {
11 | return (
12 | <>
13 |
14 |
15 | {breadcrumbLinks.map(({title, href}) => (
16 | <>
17 |
18 | {title}
19 |
20 |
21 | >
22 | ))}
23 |
24 | {breadcrumbItem}
25 |
26 |
27 |
28 | >
29 | )
30 | }
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/contributor-avatar-component.tsx:
--------------------------------------------------------------------------------
1 | import { ExternalLinkIcon } from "lucide-react";
2 | import { Link, useNavigate } from "react-router-dom";
3 | import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
4 | import { Theme, useTheme } from "@/components/ui/theme-provider";
5 |
6 | export interface ContributorAvatarProps {
7 | avatar: string;
8 | initials: string;
9 | name: string;
10 | role: string;
11 | github: string;
12 | background?: string;
13 | themeName?: Theme;
14 | }
15 |
16 | export const ContributorAvatarComponent = ({
17 | contributor,
18 | }: {
19 | contributor: ContributorAvatarProps;
20 | }) => {
21 | const { setTheme } = useTheme();
22 | const navigate = useNavigate();
23 |
24 | return (
25 | <>
26 |
27 |
{
30 | if (contributor.themeName !== undefined) {
31 | setTheme(contributor.themeName);
32 | navigate("/main");
33 | }
34 | }}
35 | >
36 |
37 | {contributor.initials}
38 |
39 |
40 |
{contributor.name}
41 |
{contributor.role}
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | >
50 | );
51 | };
52 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/helix-loader/helix-loader-component.css:
--------------------------------------------------------------------------------
1 | .helix-container {
2 | --uib-size: 100px;
3 | --uib-color: hsl(var(--primary));
4 | --uib-speed: 3s;
5 | display: flex;
6 | flex-direction: column;
7 | align-items: center;
8 | justify-content: center;
9 | height: var(--uib-size);
10 | width: var(--uib-size);
11 | }
12 |
13 | .helix-slice {
14 | position: relative;
15 | height: calc(var(--uib-size) / 6);
16 | width: 100%;
17 | }
18 |
19 | .helix-slice::before,
20 | .helix-slice::after {
21 | --uib-a: calc(var(--uib-speed) / -2);
22 | --uib-b: calc(var(--uib-speed) / -6);
23 | content: '';
24 | position: absolute;
25 | top: 0;
26 | left: calc(50% - var(--uib-size) / 12);
27 | height: 100%;
28 | width: calc(100% / 6);
29 | border-radius: 50%;
30 | background-color: var(--uib-color);
31 | flex-shrink: 0;
32 | animation: orbit var(--uib-speed) linear infinite;
33 | transition: background-color 0.3s ease;
34 | }
35 |
36 | .helix-slice:nth-child(1)::after {
37 | animation-delay: var(--uib-a);
38 | }
39 |
40 | .helix-slice:nth-child(2)::before {
41 | animation-delay: var(--uib-b);
42 | }
43 |
44 | .helix-slice:nth-child(2)::after {
45 | animation-delay: calc(var(--uib-a) + var(--uib-b));
46 | }
47 |
48 | .helix-slice:nth-child(3)::before {
49 | animation-delay: calc(var(--uib-b) * 2);
50 | }
51 | .helix-slice:nth-child(3)::after {
52 | animation-delay: calc(var(--uib-a) + var(--uib-b) * 2);
53 | }
54 |
55 | .helix-slice:nth-child(4)::before {
56 | animation-delay: calc(var(--uib-b) * 3);
57 | }
58 | .helix-slice:nth-child(4)::after {
59 | animation-delay: calc(var(--uib-a) + var(--uib-b) * 3);
60 | }
61 |
62 | .helix-slice:nth-child(5)::before {
63 | animation-delay: calc(var(--uib-b) * 4);
64 | }
65 | .helix-slice:nth-child(5)::after {
66 | animation-delay: calc(var(--uib-a) + var(--uib-b) * 4);
67 | }
68 |
69 | .helix-slice:nth-child(6)::before {
70 | animation-delay: calc(var(--uib-b) * 5);
71 | }
72 | .helix-slice:nth-child(6)::after {
73 | animation-delay: calc(var(--uib-a) + var(--uib-b) * 5);
74 | }
75 |
76 | @keyframes orbit {
77 | 0% {
78 | transform: translateX(calc(var(--uib-size) * 0.25)) scale(0.73684);
79 | opacity: 0.65;
80 | }
81 | 5% {
82 | transform: translateX(calc(var(--uib-size) * 0.235)) scale(0.684208);
83 | opacity: 0.58;
84 | }
85 | 10% {
86 | transform: translateX(calc(var(--uib-size) * 0.182)) scale(0.631576);
87 | opacity: 0.51;
88 | }
89 | 15% {
90 | transform: translateX(calc(var(--uib-size) * 0.129)) scale(0.578944);
91 | opacity: 0.44;
92 | }
93 | 20% {
94 | transform: translateX(calc(var(--uib-size) * 0.076)) scale(0.526312);
95 | opacity: 0.37;
96 | }
97 | 25% {
98 | transform: translateX(0%) scale(0.47368);
99 | opacity: 0.3;
100 | }
101 | 30% {
102 | transform: translateX(calc(var(--uib-size) * -0.076)) scale(0.526312);
103 | opacity: 0.37;
104 | }
105 | 35% {
106 | transform: translateX(calc(var(--uib-size) * -0.129)) scale(0.578944);
107 | opacity: 0.44;
108 | }
109 | 40% {
110 | transform: translateX(calc(var(--uib-size) * -0.182)) scale(0.631576);
111 | opacity: 0.51;
112 | }
113 | 45% {
114 | transform: translateX(calc(var(--uib-size) * -0.235)) scale(0.684208);
115 | opacity: 0.58;
116 | }
117 | 50% {
118 | transform: translateX(calc(var(--uib-size) * -0.25)) scale(0.73684);
119 | opacity: 0.65;
120 | }
121 | 55% {
122 | transform: translateX(calc(var(--uib-size) * -0.235)) scale(0.789472);
123 | opacity: 0.72;
124 | }
125 | 60% {
126 | transform: translateX(calc(var(--uib-size) * -0.182)) scale(0.842104);
127 | opacity: 0.79;
128 | }
129 | 65% {
130 | transform: translateX(calc(var(--uib-size) * -0.129)) scale(0.894736);
131 | opacity: 0.86;
132 | }
133 | 70% {
134 | transform: translateX(calc(var(--uib-size) * -0.076)) scale(0.947368);
135 | opacity: 0.93;
136 | }
137 | 75% {
138 | transform: translateX(0%) scale(1);
139 | opacity: 1;
140 | }
141 | 80% {
142 | transform: translateX(calc(var(--uib-size) * 0.076)) scale(0.947368);
143 | opacity: 0.93;
144 | }
145 | 85% {
146 | transform: translateX(calc(var(--uib-size) * 0.129)) scale(0.894736);
147 | opacity: 0.86;
148 | }
149 | 90% {
150 | transform: translateX(calc(var(--uib-size) * 0.182)) scale(0.842104);
151 | opacity: 0.79;
152 | }
153 | 95% {
154 | transform: translateX(calc(var(--uib-size) * 0.235)) scale(0.789472);
155 | opacity: 0.72;
156 | }
157 | 100% {
158 | transform: translateX(calc(var(--uib-size) * 0.25)) scale(0.73684);
159 | opacity: 0.65;
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/helix-loader/helix-loader-component.tsx:
--------------------------------------------------------------------------------
1 | import './helix-loader-component.css';
2 |
3 | export const HelixLoader = () => {
4 | return (
5 | <>
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | >
15 | );
16 | };
17 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/inventory-item-card.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
2 |
3 | import { InventoryItem } from "@/models/save-models";
4 | import { Separator } from "../ui/separator";
5 | import { HelpCircle } from "lucide-react";
6 | import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip";
7 |
8 | type InventoryItemCardProps = {
9 | item: InventoryItem;
10 | itemIndex: number;
11 | executeAction?: Function;
12 | };
13 |
14 | export const InventoryItemCard = ({ item, itemIndex, executeAction }: InventoryItemCardProps) => {
15 | return (
16 | executeAction && executeAction(item, itemIndex)}
18 | >
19 |
20 |
21 |
22 |
23 | {item.name}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Chunk Index: {item.chunk_data.index}
34 | Index: {item.index}
35 |
36 |
37 |
38 |
39 |
40 |
41 | Values
42 |
43 | -
44 | Level
45 | {item.chunk_data.level_value}
46 |
47 |
48 | -
49 | Seed
50 | {item.chunk_data.seed_value}
51 |
52 |
53 | -
54 | Amount
55 | {item.chunk_data.amount_value}
56 |
57 |
58 | -
59 | Durability
60 | {item.chunk_data.durability_value}
61 |
62 |
63 |
64 | {item.mod_data.length > 0 ? (
65 | <>
66 |
67 | Mods
68 |
69 | {item.mod_data.map((mod) => (
70 | -
71 | {mod.name}
72 |
73 | ))}
74 |
75 | >
76 | ) : (
77 | <>>
78 | )}
79 |
80 |
81 | );
82 | };
83 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/item-id-combobox-component.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 |
3 | import * as React from 'react';
4 | import { ChevronsUpDown } from 'lucide-react';
5 |
6 | import { cn } from '@/lib/utils';
7 | import { Button } from '@/components/ui/button';
8 |
9 | import {
10 | Popover,
11 | PopoverContent,
12 | PopoverTrigger,
13 | } from '@/components/ui/popover';
14 | import { Search } from '@/components/custom/id-search-component';
15 | import { IdData } from '@/models/save-models';
16 | import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
17 |
18 | const POPOVER_WIDTH = 'w-full';
19 |
20 | type ComboboxProps = {
21 | currentSelected: string;
22 | setCurrentSelected: Function;
23 | ids: IdData[];
24 | }
25 |
26 | export function IdComboBox({currentSelected, setCurrentSelected, ids}: ComboboxProps) {
27 | const [open, setOpen] = React.useState(false);
28 | const [selected, setSelected] = React.useState(currentSelected);
29 |
30 | const handleSetActive = React.useCallback((id: string) => {
31 | setSelected(id);
32 | setCurrentSelected(id);
33 | }, []);
34 |
35 | const displayName = selected ? selected : 'Select ID';
36 | const queryClient = new QueryClient();
37 |
38 | return (
39 |
40 |
41 |
42 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | );
62 | }
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/knowledge-carousel-component.tsx:
--------------------------------------------------------------------------------
1 | import { invoke } from "@tauri-apps/api/core";
2 | import {
3 | Carousel,
4 | CarouselNext,
5 | CarouselPrevious,
6 | CarouselMainContainer,
7 | SliderMainItem,
8 | CarouselThumbsContainer,
9 | CarouselIndicator,
10 | } from "../ui/carousel";
11 | import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip";
12 | import { ToastAction } from "@radix-ui/react-toast";
13 | import { toast } from "../ui/use-toast";
14 | import { Button } from "../ui/button";
15 | import { ToastProvider } from "../ui/toast";
16 |
17 | const knowledge: [string, string, string][] = [
18 | [
19 | "Getting Started",
20 | "https://marcel-to.notion.site/Getting-Started-with-the-Editor-496ffcc2b46a4f39b6e7ca04ed1b3b32",
21 | "/assets/pictures/backgrounds/slider-2.jpg",
22 | ],
23 | [
24 | "Tutorial",
25 | "https://marcel-to.notion.site/Tutorial-95ff57c3d2c14314b6e89613f0f14a7a",
26 | "/assets/pictures/backgrounds/slider-3.jpg",
27 | ],
28 | [
29 | "Commonly Asked Questions",
30 | "https://marcel-to.notion.site/Commonly-asked-Questions-QnA-5c05da103a304c3e99b9bc024c35cf7d",
31 | "/assets/pictures/backgrounds/slider-4.jpg",
32 | ],
33 | [
34 | "Prerequisites for Programming",
35 | "https://marcel-to.notion.site/Prerequisites-for-Programming-bcd84864e7e4454283bac25d619015e7",
36 | "/assets/pictures/backgrounds/slider-5.jpg",
37 | ],
38 | [
39 | "The Editor in Detail: Frontend",
40 | "https://marcel-to.notion.site/The-Editor-in-Detail-Frontend-9c72b33073eb43c2acfbf9210ff80c71",
41 | "/assets/pictures/backgrounds/slider-2.jpg",
42 | ],
43 | [
44 | "Video Tutorial",
45 | "https://youtu.be/BfgnVI4v-Jo?si=onXnwUkU9Oc7HEf",
46 | "/assets/pictures/backgrounds/slider-6.jpg",
47 | ],
48 | [
49 | "Feature Release Plan",
50 | "https://github.com/users/Marcel-TO/projects/2/views/2",
51 | "/assets/pictures/backgrounds/slider-7.jpg",
52 | ],
53 | ];
54 |
55 | export const KnowledgeCarouselComponent = () => {
56 | const handleSelectKnowledge = async (title: string, link: string) => {
57 | await invoke("open_knowledge_window", {
58 | url: link,
59 | name: title
60 | }).catch((err) => {
61 | toast({
62 | title: "Uh oh! Something went wrong.",
63 | description:
64 | err ?? "An error occured while trying to open a knowledge link.",
65 | action: (
66 |
69 | Try again
70 |
71 | ),
72 | });
73 | return;
74 | });
75 | }
76 |
77 | return (
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | {knowledge.map(([title, link, backgroundImage]) => (
86 |
87 |
88 | {/* */}
89 |
90 |
96 |
97 | {title}
98 |
99 |
100 |
104 |
105 | ))}
106 |
107 |
108 |
109 |
110 | {Array.from({ length: knowledge.length }).map((_, index) => (
111 |
112 | ))}
113 |
114 |
115 |
116 |
117 |
118 | );
119 | };
120 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/sponsor-avatar-component.tsx:
--------------------------------------------------------------------------------
1 | import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
2 | import { Theme, useTheme } from "@/components/ui/theme-provider";
3 | import { useNavigate } from "react-router-dom";
4 |
5 | export interface SponsorAvatarProps {
6 | avatar: string;
7 | initials: string;
8 | name: string;
9 | tier: string;
10 | background?: string;
11 | themeName?: Theme;
12 | };
13 |
14 | export const SponsorAvatarComponent = ({sponsor}: {sponsor: SponsorAvatarProps}) => {
15 | const { setTheme } = useTheme();
16 | const navigate = useNavigate();
17 |
18 | return (
19 | <>
20 |
21 |
{
24 | if (sponsor.themeName !== undefined) {
25 | setTheme(sponsor.themeName);
26 | navigate("/main");
27 | }
28 | }}
29 | >
30 |
31 | {sponsor.initials}
32 |
33 |
34 |
{sponsor.name}
35 |
36 | {sponsor.tier}
37 |
38 |
39 |
40 | >
41 | );
42 | };
43 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/custom/theme-button.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Biohazard,
3 | Droplet,
4 | Ghost,
5 | Moon,
6 | Paintbrush2Icon,
7 | PawPrint,
8 | Sparkle,
9 | Sun,
10 | } from "lucide-react";
11 |
12 | import { Button } from "@/components/ui/button";
13 | import {
14 | DropdownMenu,
15 | DropdownMenuContent,
16 | DropdownMenuGroup,
17 | DropdownMenuItem,
18 | DropdownMenuLabel,
19 | DropdownMenuTrigger,
20 | } from "@/components/ui/dropdown-menu";
21 | import { useTheme } from "@/components/ui/theme-provider";
22 | import { Separator } from "@/components/ui/separator";
23 | import { useNavigate } from "react-router-dom";
24 |
25 | export function ThemeModeToggle() {
26 | const { theme, setTheme } = useTheme();
27 | const navigate = useNavigate();
28 |
29 | return (
30 |
31 |
32 |
63 |
64 |
65 |
66 | Dark
67 | {
69 | setTheme("dl2");
70 | navigate("/main");
71 | }}
72 | className={`${theme === "dl2" ? "bg-muted" : "bg-transparent"} p-2`}
73 | >
74 | DL2
75 |
76 | {
78 | setTheme("skyfall");
79 | navigate("/main");
80 | }}
81 | className={`${
82 | theme === "skyfall" ? "bg-muted" : "bg-transparent"
83 | } p-2`}
84 | >
85 | Skyfall
86 |
87 | {
89 | setTheme("dark");
90 | navigate("/main");
91 | }}
92 | className={`${
93 | theme === "dark" ? "bg-muted" : "bg-transparent"
94 | } p-2`}
95 | >
96 | Dark
97 |
98 |
99 |
100 |
101 | Light
102 | {
104 | setTheme("hope");
105 | navigate("/main");
106 | }}
107 | className={`${
108 | theme === "hope" ? "bg-muted" : "bg-transparent"
109 | } p-2`}
110 | >
111 | Hope
112 |
113 | {
115 | setTheme("light");
116 | navigate("/main");
117 | }}
118 | className={`${
119 | theme === "light" ? "bg-muted/70" : "bg-transparent"
120 | } p-2`}
121 | >
122 | Light
123 |
124 | {
126 | setTheme("system");
127 | navigate("/main");
128 | }}
129 | className={`${
130 | theme === "system" ? "bg-muted" : "bg-transparent"
131 | } p-2`}
132 | >
133 | System
134 |
135 |
136 |
137 |
138 | );
139 | }
140 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/avatar.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as AvatarPrimitive from "@radix-ui/react-avatar"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Avatar = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 | ))
21 | Avatar.displayName = AvatarPrimitive.Root.displayName
22 |
23 | const AvatarImage = React.forwardRef<
24 | React.ElementRef,
25 | React.ComponentPropsWithoutRef
26 | >(({ className, ...props }, ref) => (
27 |
32 | ))
33 | AvatarImage.displayName = AvatarPrimitive.Image.displayName
34 |
35 | const AvatarFallback = React.forwardRef<
36 | React.ElementRef,
37 | React.ComponentPropsWithoutRef
38 | >(({ className, ...props }, ref) => (
39 |
47 | ))
48 | AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
49 |
50 | export { Avatar, AvatarImage, AvatarFallback }
51 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/badge.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { cva, type VariantProps } from "class-variance-authority"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const badgeVariants = cva(
7 | "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8 | {
9 | variants: {
10 | variant: {
11 | default:
12 | "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13 | secondary:
14 | "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15 | destructive:
16 | "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
17 | outline: "text-foreground",
18 | },
19 | },
20 | defaultVariants: {
21 | variant: "default",
22 | },
23 | }
24 | )
25 |
26 | export interface BadgeProps
27 | extends React.HTMLAttributes,
28 | VariantProps {}
29 |
30 | function Badge({ className, variant, ...props }: BadgeProps) {
31 | return (
32 |
33 | )
34 | }
35 |
36 | export { Badge, badgeVariants }
37 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/breadcrumb.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Slot } from "@radix-ui/react-slot"
3 | import { ChevronRight, MoreHorizontal } from "lucide-react"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const Breadcrumb = React.forwardRef<
8 | HTMLElement,
9 | React.ComponentPropsWithoutRef<"nav"> & {
10 | separator?: React.ReactNode
11 | }
12 | >(({ ...props }, ref) => )
13 | Breadcrumb.displayName = "Breadcrumb"
14 |
15 | const BreadcrumbList = React.forwardRef<
16 | HTMLOListElement,
17 | React.ComponentPropsWithoutRef<"ol">
18 | >(({ className, ...props }, ref) => (
19 |
27 | ))
28 | BreadcrumbList.displayName = "BreadcrumbList"
29 |
30 | const BreadcrumbItem = React.forwardRef<
31 | HTMLLIElement,
32 | React.ComponentPropsWithoutRef<"li">
33 | >(({ className, ...props }, ref) => (
34 |
39 | ))
40 | BreadcrumbItem.displayName = "BreadcrumbItem"
41 |
42 | const BreadcrumbLink = React.forwardRef<
43 | HTMLAnchorElement,
44 | React.ComponentPropsWithoutRef<"a"> & {
45 | asChild?: boolean
46 | }
47 | >(({ asChild, className, ...props }, ref) => {
48 | const Comp = asChild ? Slot : "a"
49 |
50 | return (
51 |
56 | )
57 | })
58 | BreadcrumbLink.displayName = "BreadcrumbLink"
59 |
60 | const BreadcrumbPage = React.forwardRef<
61 | HTMLSpanElement,
62 | React.ComponentPropsWithoutRef<"span">
63 | >(({ className, ...props }, ref) => (
64 |
72 | ))
73 | BreadcrumbPage.displayName = "BreadcrumbPage"
74 |
75 | const BreadcrumbSeparator = ({
76 | children,
77 | className,
78 | ...props
79 | }: React.ComponentProps<"li">) => (
80 | svg]:size-3.5", className)}
84 | {...props}
85 | >
86 | {children ?? }
87 |
88 | )
89 | BreadcrumbSeparator.displayName = "BreadcrumbSeparator"
90 |
91 | const BreadcrumbEllipsis = ({
92 | className,
93 | ...props
94 | }: React.ComponentProps<"span">) => (
95 |
101 |
102 | More
103 |
104 | )
105 | BreadcrumbEllipsis.displayName = "BreadcrumbElipssis"
106 |
107 | export {
108 | Breadcrumb,
109 | BreadcrumbList,
110 | BreadcrumbItem,
111 | BreadcrumbLink,
112 | BreadcrumbPage,
113 | BreadcrumbSeparator,
114 | BreadcrumbEllipsis,
115 | }
116 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/button.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Slot } from "@radix-ui/react-slot"
3 | import { cva, type VariantProps } from "class-variance-authority"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const buttonVariants = cva(
8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
9 | {
10 | variants: {
11 | variant: {
12 | default: "bg-primary text-primary-foreground border-2 border-transparent hover:bg-primary-foreground hover:text-primary hover:border-primary",
13 | destructive:
14 | "bg-destructive text-destructive-foreground hover:bg-destructive/90",
15 | outline:
16 | "border border-input bg-background/10 hover:bg-accent hover:text-accent-foreground",
17 | secondary:
18 | "bg-secondary text-secondary-foreground hover:bg-secondary/80",
19 | ghost: "hover:bg-accent hover:text-accent-foreground",
20 | link: "text-primary underline-offset-4 hover:underline",
21 | },
22 | size: {
23 | default: "h-10 px-4 py-2",
24 | sm: "h-9 rounded-md px-3",
25 | lg: "h-11 rounded-md px-8",
26 | icon: "h-10 w-10",
27 | },
28 | },
29 | defaultVariants: {
30 | variant: "default",
31 | size: "default",
32 | },
33 | }
34 | )
35 |
36 | export interface ButtonProps
37 | extends React.ButtonHTMLAttributes,
38 | VariantProps {
39 | asChild?: boolean
40 | }
41 |
42 | const Button = React.forwardRef(
43 | ({ className, variant, size, asChild = false, ...props }, ref) => {
44 | const Comp = asChild ? Slot : "button"
45 | return (
46 |
51 | )
52 | }
53 | )
54 | Button.displayName = "Button"
55 |
56 | export { Button, buttonVariants }
57 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/card.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { cn } from "@/lib/utils";
3 |
4 | const Card = React.forwardRef<
5 | HTMLDivElement,
6 | React.HTMLAttributes
7 | >(({ className, ...props }, ref) => {
8 | const [isBackgroundImageNoneOrEmpty, setIsBackgroundImageNoneOrEmpty] = React.useState(false);
9 |
10 | React.useEffect(() => {
11 | // Function to get the value of the --background-image CSS variable
12 | const getBackgroundImage = () => {
13 | const element = document.documentElement; // Target the root element
14 | if (element) {
15 | return getComputedStyle(element).getPropertyValue('--background-image');
16 | }
17 | return '';
18 | };
19 |
20 | const backgroundImage = getBackgroundImage();
21 |
22 | // Determine if the background image is none or empty
23 | setIsBackgroundImageNoneOrEmpty(backgroundImage === 'none' || backgroundImage === '');
24 | }, []);
25 |
26 | return (
27 |
36 | );
37 | });
38 | Card.displayName = "Card";
39 |
40 | export default Card;
41 |
42 | const CardHeader = React.forwardRef<
43 | HTMLDivElement,
44 | React.HTMLAttributes
45 | >(({ className, ...props }, ref) => (
46 |
51 | ))
52 | CardHeader.displayName = "CardHeader"
53 |
54 | const CardTitle = React.forwardRef<
55 | HTMLParagraphElement,
56 | React.HTMLAttributes
57 | >(({ className, ...props }, ref) => (
58 |
66 | ))
67 | CardTitle.displayName = "CardTitle"
68 |
69 | const CardDescription = React.forwardRef<
70 | HTMLParagraphElement,
71 | React.HTMLAttributes
72 | >(({ className, ...props }, ref) => (
73 |
78 | ))
79 | CardDescription.displayName = "CardDescription"
80 |
81 | const CardContent = React.forwardRef<
82 | HTMLDivElement,
83 | React.HTMLAttributes
84 | >(({ className, ...props }, ref) => (
85 |
86 | ))
87 | CardContent.displayName = "CardContent"
88 |
89 | const CardFooter = React.forwardRef<
90 | HTMLDivElement,
91 | React.HTMLAttributes
92 | >(({ className, ...props }, ref) => (
93 |
98 | ))
99 | CardFooter.displayName = "CardFooter"
100 |
101 | export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
102 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/checkbox.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
5 | import { Check } from "lucide-react"
6 |
7 | import { cn } from "@/lib/utils"
8 |
9 | const Checkbox = React.forwardRef<
10 | React.ElementRef,
11 | React.ComponentPropsWithoutRef
12 | >(({ className, ...props }, ref) => (
13 |
21 |
24 |
25 |
26 |
27 | ))
28 | Checkbox.displayName = CheckboxPrimitive.Root.displayName
29 |
30 | export { Checkbox }
31 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/collapsible.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
4 |
5 | const Collapsible = CollapsiblePrimitive.Root
6 |
7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
8 |
9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
10 |
11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }
12 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/dialog.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as DialogPrimitive from "@radix-ui/react-dialog"
5 | import { X } from "lucide-react"
6 |
7 | import { cn } from "@/lib/utils"
8 |
9 | const Dialog = DialogPrimitive.Root
10 |
11 | const DialogTrigger = DialogPrimitive.Trigger
12 |
13 | const DialogPortal = DialogPrimitive.Portal
14 |
15 | const DialogClose = DialogPrimitive.Close
16 |
17 | const DialogOverlay = React.forwardRef<
18 | React.ElementRef,
19 | React.ComponentPropsWithoutRef
20 | >(({ className, ...props }, ref) => (
21 |
29 | ))
30 | DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
31 |
32 | const DialogContent = React.forwardRef<
33 | React.ElementRef,
34 | React.ComponentPropsWithoutRef
35 | >(({ className, children, ...props }, ref) => (
36 |
37 |
38 |
46 | {children}
47 |
48 |
49 | Close
50 |
51 |
52 |
53 | ))
54 | DialogContent.displayName = DialogPrimitive.Content.displayName
55 |
56 | const DialogHeader = ({
57 | className,
58 | ...props
59 | }: React.HTMLAttributes) => (
60 |
67 | )
68 | DialogHeader.displayName = "DialogHeader"
69 |
70 | const DialogFooter = ({
71 | className,
72 | ...props
73 | }: React.HTMLAttributes) => (
74 |
81 | )
82 | DialogFooter.displayName = "DialogFooter"
83 |
84 | const DialogTitle = React.forwardRef<
85 | React.ElementRef,
86 | React.ComponentPropsWithoutRef
87 | >(({ className, ...props }, ref) => (
88 |
96 | ))
97 | DialogTitle.displayName = DialogPrimitive.Title.displayName
98 |
99 | const DialogDescription = React.forwardRef<
100 | React.ElementRef,
101 | React.ComponentPropsWithoutRef
102 | >(({ className, ...props }, ref) => (
103 |
108 | ))
109 | DialogDescription.displayName = DialogPrimitive.Description.displayName
110 |
111 | export {
112 | Dialog,
113 | DialogPortal,
114 | DialogOverlay,
115 | DialogClose,
116 | DialogTrigger,
117 | DialogContent,
118 | DialogHeader,
119 | DialogFooter,
120 | DialogTitle,
121 | DialogDescription,
122 | }
123 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/drawer.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import { Drawer as DrawerPrimitive } from "vaul"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Drawer = ({
9 | shouldScaleBackground = true,
10 | ...props
11 | }: React.ComponentProps) => (
12 |
16 | )
17 | Drawer.displayName = "Drawer"
18 |
19 | const DrawerTrigger = DrawerPrimitive.Trigger
20 |
21 | const DrawerPortal = DrawerPrimitive.Portal
22 |
23 | const DrawerClose = DrawerPrimitive.Close
24 |
25 | const DrawerOverlay = React.forwardRef<
26 | React.ElementRef,
27 | React.ComponentPropsWithoutRef
28 | >(({ className, ...props }, ref) => (
29 |
34 | ))
35 | DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName
36 |
37 | const DrawerContent = React.forwardRef<
38 | React.ElementRef,
39 | React.ComponentPropsWithoutRef
40 | >(({ className, children, ...props }, ref) => (
41 |
42 |
43 |
51 |
52 | {children}
53 |
54 |
55 | ))
56 | DrawerContent.displayName = "DrawerContent"
57 |
58 | const DrawerHeader = ({
59 | className,
60 | ...props
61 | }: React.HTMLAttributes) => (
62 |
66 | )
67 | DrawerHeader.displayName = "DrawerHeader"
68 |
69 | const DrawerFooter = ({
70 | className,
71 | ...props
72 | }: React.HTMLAttributes) => (
73 |
77 | )
78 | DrawerFooter.displayName = "DrawerFooter"
79 |
80 | const DrawerTitle = React.forwardRef<
81 | React.ElementRef,
82 | React.ComponentPropsWithoutRef
83 | >(({ className, ...props }, ref) => (
84 |
92 | ))
93 | DrawerTitle.displayName = DrawerPrimitive.Title.displayName
94 |
95 | const DrawerDescription = React.forwardRef<
96 | React.ElementRef,
97 | React.ComponentPropsWithoutRef
98 | >(({ className, ...props }, ref) => (
99 |
104 | ))
105 | DrawerDescription.displayName = DrawerPrimitive.Description.displayName
106 |
107 | export {
108 | Drawer,
109 | DrawerPortal,
110 | DrawerOverlay,
111 | DrawerTrigger,
112 | DrawerClose,
113 | DrawerContent,
114 | DrawerHeader,
115 | DrawerFooter,
116 | DrawerTitle,
117 | DrawerDescription,
118 | }
119 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/form.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as LabelPrimitive from "@radix-ui/react-label"
5 | import { Slot } from "@radix-ui/react-slot"
6 | import {
7 | Controller,
8 | ControllerProps,
9 | FieldPath,
10 | FieldValues,
11 | FormProvider,
12 | useFormContext,
13 | } from "react-hook-form"
14 |
15 | import { cn } from "@/lib/utils"
16 | import { Label } from "@/components/ui/label"
17 |
18 | const Form = FormProvider
19 |
20 | type FormFieldContextValue<
21 | TFieldValues extends FieldValues = FieldValues,
22 | TName extends FieldPath = FieldPath
23 | > = {
24 | name: TName
25 | }
26 |
27 | const FormFieldContext = React.createContext(
28 | {} as FormFieldContextValue
29 | )
30 |
31 | const FormField = <
32 | TFieldValues extends FieldValues = FieldValues,
33 | TName extends FieldPath = FieldPath
34 | >({
35 | ...props
36 | }: ControllerProps) => {
37 | return (
38 |
39 |
40 |
41 | )
42 | }
43 |
44 | const useFormField = () => {
45 | const fieldContext = React.useContext(FormFieldContext)
46 | const itemContext = React.useContext(FormItemContext)
47 | const { getFieldState, formState } = useFormContext()
48 |
49 | const fieldState = getFieldState(fieldContext.name, formState)
50 |
51 | if (!fieldContext) {
52 | throw new Error("useFormField should be used within ")
53 | }
54 |
55 | const { id } = itemContext
56 |
57 | return {
58 | id,
59 | name: fieldContext.name,
60 | formItemId: `${id}-form-item`,
61 | formDescriptionId: `${id}-form-item-description`,
62 | formMessageId: `${id}-form-item-message`,
63 | ...fieldState,
64 | }
65 | }
66 |
67 | type FormItemContextValue = {
68 | id: string
69 | }
70 |
71 | const FormItemContext = React.createContext(
72 | {} as FormItemContextValue
73 | )
74 |
75 | const FormItem = React.forwardRef<
76 | HTMLDivElement,
77 | React.HTMLAttributes
78 | >(({ className, ...props }, ref) => {
79 | const id = React.useId()
80 |
81 | return (
82 |
83 |
84 |
85 | )
86 | })
87 | FormItem.displayName = "FormItem"
88 |
89 | const FormLabel = React.forwardRef<
90 | React.ElementRef,
91 | React.ComponentPropsWithoutRef
92 | >(({ className, ...props }, ref) => {
93 | const { error, formItemId } = useFormField()
94 |
95 | return (
96 |
102 | )
103 | })
104 | FormLabel.displayName = "FormLabel"
105 |
106 | const FormControl = React.forwardRef<
107 | React.ElementRef,
108 | React.ComponentPropsWithoutRef
109 | >(({ ...props }, ref) => {
110 | const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
111 |
112 | return (
113 |
124 | )
125 | })
126 | FormControl.displayName = "FormControl"
127 |
128 | const FormDescription = React.forwardRef<
129 | HTMLParagraphElement,
130 | React.HTMLAttributes
131 | >(({ className, ...props }, ref) => {
132 | const { formDescriptionId } = useFormField()
133 |
134 | return (
135 |
141 | )
142 | })
143 | FormDescription.displayName = "FormDescription"
144 |
145 | const FormMessage = React.forwardRef<
146 | HTMLParagraphElement,
147 | React.HTMLAttributes
148 | >(({ className, children, ...props }, ref) => {
149 | const { error, formMessageId } = useFormField()
150 | const body = error ? String(error?.message) : children
151 |
152 | if (!body) {
153 | return null
154 | }
155 |
156 | return (
157 |
163 | {body}
164 |
165 | )
166 | })
167 | FormMessage.displayName = "FormMessage"
168 |
169 | export {
170 | useFormField,
171 | Form,
172 | FormItem,
173 | FormLabel,
174 | FormControl,
175 | FormDescription,
176 | FormMessage,
177 | FormField,
178 | }
179 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/hover-card.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const HoverCard = HoverCardPrimitive.Root
9 |
10 | const HoverCardTrigger = HoverCardPrimitive.Trigger
11 |
12 | const HoverCardContent = React.forwardRef<
13 | React.ElementRef,
14 | React.ComponentPropsWithoutRef
15 | >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
16 |
26 | ))
27 | HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
28 |
29 | export { HoverCard, HoverCardTrigger, HoverCardContent }
30 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface InputProps
6 | extends React.InputHTMLAttributes {}
7 |
8 | const Input = React.forwardRef(
9 | ({ className, type, ...props }, ref) => {
10 | return (
11 |
20 | )
21 | }
22 | )
23 | Input.displayName = "Input"
24 |
25 | export { Input }
26 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/label.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as LabelPrimitive from "@radix-ui/react-label"
5 | import { cva, type VariantProps } from "class-variance-authority"
6 |
7 | import { cn } from "@/lib/utils"
8 |
9 | const labelVariants = cva(
10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
11 | )
12 |
13 | const Label = React.forwardRef<
14 | React.ElementRef,
15 | React.ComponentPropsWithoutRef &
16 | VariantProps
17 | >(({ className, ...props }, ref) => (
18 |
23 | ))
24 | Label.displayName = LabelPrimitive.Root.displayName
25 |
26 | export { Label }
27 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/pagination.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
3 | import { Link } from "react-router-dom"
4 |
5 | import { cn } from "@/lib/utils"
6 | import { ButtonProps, buttonVariants } from "@/components/ui/button"
7 |
8 | const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
9 |
15 | )
16 | Pagination.displayName = "Pagination"
17 |
18 | const PaginationContent = React.forwardRef<
19 | HTMLUListElement,
20 | React.ComponentProps<"ul">
21 | >(({ className, ...props }, ref) => (
22 |
27 | ))
28 | PaginationContent.displayName = "PaginationContent"
29 |
30 | const PaginationItem = React.forwardRef<
31 | HTMLLIElement,
32 | React.ComponentProps<"li">
33 | >(({ className, ...props }, ref) => (
34 |
35 | ))
36 | PaginationItem.displayName = "PaginationItem"
37 |
38 | type PaginationLinkProps = {
39 | isActive?: boolean
40 | } & Pick &
41 | React.ComponentProps
42 |
43 | const PaginationLink = ({
44 | className,
45 | isActive,
46 | size = "icon",
47 | ...props
48 | }: PaginationLinkProps) => (
49 |
60 | )
61 | PaginationLink.displayName = "PaginationLink"
62 |
63 | const PaginationPrevious = ({
64 | className,
65 | ...props
66 | }: React.ComponentProps) => (
67 |
73 |
74 | Previous
75 |
76 | )
77 | PaginationPrevious.displayName = "PaginationPrevious"
78 |
79 | const PaginationNext = ({
80 | className,
81 | ...props
82 | }: React.ComponentProps) => (
83 |
89 | Next
90 |
91 |
92 | )
93 | PaginationNext.displayName = "PaginationNext"
94 |
95 | const PaginationEllipsis = ({
96 | className,
97 | ...props
98 | }: React.ComponentProps<"span">) => (
99 |
104 |
105 | More pages
106 |
107 | )
108 | PaginationEllipsis.displayName = "PaginationEllipsis"
109 |
110 | export {
111 | Pagination,
112 | PaginationContent,
113 | PaginationEllipsis,
114 | PaginationItem,
115 | PaginationLink,
116 | PaginationNext,
117 | PaginationPrevious,
118 | }
119 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/popover.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as PopoverPrimitive from "@radix-ui/react-popover"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Popover = PopoverPrimitive.Root
9 |
10 | const PopoverTrigger = PopoverPrimitive.Trigger
11 |
12 | const PopoverContent = React.forwardRef<
13 | React.ElementRef,
14 | React.ComponentPropsWithoutRef
15 | >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
16 |
17 |
27 |
28 | ))
29 | PopoverContent.displayName = PopoverPrimitive.Content.displayName
30 |
31 | export { Popover, PopoverTrigger, PopoverContent }
32 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/progress.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as ProgressPrimitive from "@radix-ui/react-progress"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Progress = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, value, ...props }, ref) => (
12 |
20 |
24 |
25 | ))
26 | Progress.displayName = ProgressPrimitive.Root.displayName
27 |
28 | export { Progress }
29 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/scroll-area.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const ScrollArea = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, children, ...props }, ref) => (
12 |
17 |
18 | {children}
19 |
20 |
21 |
22 |
23 | ))
24 | ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
25 |
26 | const ScrollBar = React.forwardRef<
27 | React.ElementRef,
28 | React.ComponentPropsWithoutRef
29 | >(({ className, orientation = "vertical", ...props }, ref) => (
30 |
43 |
44 |
45 | ))
46 | ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
47 |
48 | export { ScrollArea, ScrollBar }
49 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/separator.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as SeparatorPrimitive from "@radix-ui/react-separator"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Separator = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(
12 | (
13 | { className, orientation = "horizontal", decorative = true, ...props },
14 | ref
15 | ) => (
16 |
27 | )
28 | )
29 | Separator.displayName = SeparatorPrimitive.Root.displayName
30 |
31 | export { Separator }
32 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/sheet.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as SheetPrimitive from "@radix-ui/react-dialog"
5 | import { cva, type VariantProps } from "class-variance-authority"
6 | import { X } from "lucide-react"
7 |
8 | import { cn } from "@/lib/utils"
9 |
10 | const Sheet = SheetPrimitive.Root
11 |
12 | const SheetTrigger = SheetPrimitive.Trigger
13 |
14 | const SheetClose = SheetPrimitive.Close
15 |
16 | const SheetPortal = SheetPrimitive.Portal
17 |
18 | const SheetOverlay = React.forwardRef<
19 | React.ElementRef,
20 | React.ComponentPropsWithoutRef
21 | >(({ className, ...props }, ref) => (
22 |
30 | ))
31 | SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
32 |
33 | const sheetVariants = cva(
34 | "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
35 | {
36 | variants: {
37 | side: {
38 | top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
39 | bottom:
40 | "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
41 | left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
42 | right:
43 | "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
44 | },
45 | },
46 | defaultVariants: {
47 | side: "right",
48 | },
49 | }
50 | )
51 |
52 | interface SheetContentProps
53 | extends React.ComponentPropsWithoutRef,
54 | VariantProps {}
55 |
56 | const SheetContent = React.forwardRef<
57 | React.ElementRef,
58 | SheetContentProps
59 | >(({ side = "right", className, children, ...props }, ref) => (
60 |
61 |
62 |
67 | {children}
68 |
69 |
70 | Close
71 |
72 |
73 |
74 | ))
75 | SheetContent.displayName = SheetPrimitive.Content.displayName
76 |
77 | const SheetHeader = ({
78 | className,
79 | ...props
80 | }: React.HTMLAttributes) => (
81 |
88 | )
89 | SheetHeader.displayName = "SheetHeader"
90 |
91 | const SheetFooter = ({
92 | className,
93 | ...props
94 | }: React.HTMLAttributes) => (
95 |
102 | )
103 | SheetFooter.displayName = "SheetFooter"
104 |
105 | const SheetTitle = React.forwardRef<
106 | React.ElementRef,
107 | React.ComponentPropsWithoutRef
108 | >(({ className, ...props }, ref) => (
109 |
114 | ))
115 | SheetTitle.displayName = SheetPrimitive.Title.displayName
116 |
117 | const SheetDescription = React.forwardRef<
118 | React.ElementRef,
119 | React.ComponentPropsWithoutRef
120 | >(({ className, ...props }, ref) => (
121 |
126 | ))
127 | SheetDescription.displayName = SheetPrimitive.Description.displayName
128 |
129 | export {
130 | Sheet,
131 | SheetPortal,
132 | SheetOverlay,
133 | SheetTrigger,
134 | SheetClose,
135 | SheetContent,
136 | SheetHeader,
137 | SheetFooter,
138 | SheetTitle,
139 | SheetDescription,
140 | }
141 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/skeleton.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from "@/lib/utils"
2 |
3 | function Skeleton({
4 | className,
5 | ...props
6 | }: React.HTMLAttributes) {
7 | return (
8 |
12 | )
13 | }
14 |
15 | export { Skeleton }
16 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/table.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | const Table = React.forwardRef<
6 | HTMLTableElement,
7 | React.HTMLAttributes
8 | >(({ className, ...props }, ref) => (
9 |
16 | ))
17 | Table.displayName = "Table"
18 |
19 | const TableHeader = React.forwardRef<
20 | HTMLTableSectionElement,
21 | React.HTMLAttributes
22 | >(({ className, ...props }, ref) => (
23 |
24 | ))
25 | TableHeader.displayName = "TableHeader"
26 |
27 | const TableBody = React.forwardRef<
28 | HTMLTableSectionElement,
29 | React.HTMLAttributes
30 | >(({ className, ...props }, ref) => (
31 |
36 | ))
37 | TableBody.displayName = "TableBody"
38 |
39 | const TableFooter = React.forwardRef<
40 | HTMLTableSectionElement,
41 | React.HTMLAttributes
42 | >(({ className, ...props }, ref) => (
43 | tr]:last:border-b-0",
47 | className
48 | )}
49 | {...props}
50 | />
51 | ))
52 | TableFooter.displayName = "TableFooter"
53 |
54 | const TableRow = React.forwardRef<
55 | HTMLTableRowElement,
56 | React.HTMLAttributes
57 | >(({ className, ...props }, ref) => (
58 |
66 | ))
67 | TableRow.displayName = "TableRow"
68 |
69 | const TableHead = React.forwardRef<
70 | HTMLTableCellElement,
71 | React.ThHTMLAttributes
72 | >(({ className, ...props }, ref) => (
73 | |
81 | ))
82 | TableHead.displayName = "TableHead"
83 |
84 | const TableCell = React.forwardRef<
85 | HTMLTableCellElement,
86 | React.TdHTMLAttributes
87 | >(({ className, ...props }, ref) => (
88 | |
93 | ))
94 | TableCell.displayName = "TableCell"
95 |
96 | const TableCaption = React.forwardRef<
97 | HTMLTableCaptionElement,
98 | React.HTMLAttributes
99 | >(({ className, ...props }, ref) => (
100 |
105 | ))
106 | TableCaption.displayName = "TableCaption"
107 |
108 | export {
109 | Table,
110 | TableHeader,
111 | TableBody,
112 | TableFooter,
113 | TableHead,
114 | TableRow,
115 | TableCell,
116 | TableCaption,
117 | }
118 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/tabs.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as TabsPrimitive from "@radix-ui/react-tabs"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Tabs = TabsPrimitive.Root
9 |
10 | const TabsList = React.forwardRef<
11 | React.ElementRef,
12 | React.ComponentPropsWithoutRef
13 | >(({ className, ...props }, ref) => (
14 |
22 | ))
23 | TabsList.displayName = TabsPrimitive.List.displayName
24 |
25 | const TabsTrigger = React.forwardRef<
26 | React.ElementRef,
27 | React.ComponentPropsWithoutRef
28 | >(({ className, ...props }, ref) => (
29 |
37 | ))
38 | TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
39 |
40 | const TabsContent = React.forwardRef<
41 | React.ElementRef,
42 | React.ComponentPropsWithoutRef
43 | >(({ className, ...props }, ref) => (
44 |
52 | ))
53 | TabsContent.displayName = TabsPrimitive.Content.displayName
54 |
55 | export { Tabs, TabsList, TabsTrigger, TabsContent }
56 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/theme-provider.tsx:
--------------------------------------------------------------------------------
1 | import { AppSettings } from "@/models/settings-model"
2 | import { createContext, useContext, useEffect, useState } from "react"
3 | import { Store } from "@tauri-apps/plugin-store"
4 |
5 | export type Theme = "dark" | "light" | "system" | "dl2" | "spooked" | "skyfall" | "hope" | "mchawk" | "batang" | "beast"
6 |
7 | type ThemeProviderProps = {
8 | children: React.ReactNode
9 | defaultTheme?: Theme
10 | storageKey?: string
11 | appSettings: AppSettings
12 | settingsManager: Store | undefined
13 | }
14 |
15 | type ThemeProviderState = {
16 | theme: Theme
17 | setTheme: (theme: Theme) => void
18 | }
19 |
20 | const initialState: ThemeProviderState = {
21 | theme: "system",
22 | setTheme: () => null,
23 | }
24 |
25 | const ThemeProviderContext = createContext(initialState)
26 |
27 | export function ThemeProvider({
28 | children,
29 | defaultTheme = "dl2",
30 | storageKey = "vite-ui-theme",
31 | appSettings,
32 | settingsManager,
33 | ...props
34 | }: ThemeProviderProps) {
35 | const [theme, setTheme] = useState(
36 | () => appSettings.theme.value || defaultTheme
37 | )
38 |
39 | useEffect(() => {
40 | const root = window.document.documentElement
41 |
42 | root.classList.remove("light", "dark", "dl2", "spooked", "skyfall", "hope", "mchawk", "batang", "beast")
43 |
44 | if (theme === "system") {
45 | const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
46 | .matches
47 | ? "dark"
48 | : "light"
49 |
50 | root.classList.add(systemTheme)
51 | return
52 | }
53 |
54 | root.classList.add(theme)
55 | }, [theme])
56 |
57 | const value = {
58 | theme,
59 | setTheme: (theme: Theme) => {
60 | if (settingsManager) {
61 | settingsManager.set(storageKey, { value: theme })
62 | }
63 | appSettings.theme.setValue(theme)
64 | setTheme(theme)
65 | },
66 | }
67 |
68 | return (
69 |
70 | {children}
71 |
72 | )
73 | }
74 |
75 | export const getTheme = (appSettings: AppSettings) => {
76 | return appSettings.theme.value
77 | }
78 |
79 | export const useTheme = () => {
80 | const context = useContext(ThemeProviderContext)
81 |
82 | if (context === undefined)
83 | throw new Error("useTheme must be used within a ThemeProvider")
84 |
85 | return context
86 | }
87 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/toaster.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import {
4 | Toast,
5 | ToastClose,
6 | ToastDescription,
7 | ToastProvider,
8 | ToastTitle,
9 | ToastViewport,
10 | } from "@/components/ui/toast"
11 | import { useToast } from "@/components/ui/use-toast"
12 |
13 | export function Toaster() {
14 | const { toasts } = useToast()
15 |
16 | return (
17 |
18 | {toasts.map(function ({ id, title, description, action, ...props }) {
19 | return (
20 |
21 |
22 | {title && {title}}
23 | {description && (
24 | {description}
25 | )}
26 |
27 | {action}
28 |
29 |
30 | )
31 | })}
32 |
33 |
34 | )
35 | }
36 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/tooltip.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as TooltipPrimitive from "@radix-ui/react-tooltip"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const TooltipProvider = TooltipPrimitive.Provider
9 |
10 | const Tooltip = TooltipPrimitive.Root
11 |
12 | const TooltipTrigger = TooltipPrimitive.Trigger
13 |
14 | const TooltipContent = React.forwardRef<
15 | React.ElementRef,
16 | React.ComponentPropsWithoutRef
17 | >(({ className, sideOffset = 4, ...props }, ref) => (
18 |
27 | ))
28 | TooltipContent.displayName = TooltipPrimitive.Content.displayName
29 |
30 | export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
31 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/typography.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from "@/lib/utils";
2 |
3 | export const TypographyH1 = ({
4 | text,
5 | className,
6 | fontType,
7 | }: {
8 | text: string;
9 | className?: string;
10 | fontType?: string;
11 | }) => {
12 | return (
13 |
22 | {text}
23 |
24 | );
25 | };
26 |
27 | export const TypographyH1Thin = ({ text }: { text: string }) => {
28 | return (
29 | {text}
30 | );
31 | };
32 |
33 | export const TypographyH2 = ({ text }: { text: string }) => {
34 | return (
35 |
36 | {text}
37 |
38 | );
39 | };
40 |
41 | export const TypographyH3 = ({ text }: { text: string }) => {
42 | return (
43 |
44 | {text}
45 |
46 | );
47 | };
48 |
49 | export const TypographyH4 = ({ text }: { text: string }) => {
50 | return (
51 | {text}
52 | );
53 | };
54 |
55 | export const TypographyP = ({ text }: { text: string }) => {
56 | return {text}
;
57 | };
58 |
59 | export const TypographyBlockquote = ({ text }: { text: string }) => {
60 | return (
61 | {text}
62 | );
63 | };
64 |
65 | export const TypographyTable = ({
66 | table_content,
67 | }: {
68 | table_content: string[][];
69 | }) => {
70 | return (
71 |
72 |
73 |
74 |
75 | {table_content[0].map((header, index) => (
76 |
80 | {header}
81 | |
82 | ))}
83 |
84 |
85 |
86 | {table_content.slice(1).map((row, index) => (
87 |
88 | {row.map((cell, index) => (
89 |
93 | {cell}
94 | |
95 | ))}
96 |
97 | ))}
98 |
99 |
100 |
101 | );
102 | };
103 |
104 | export const TypographyList = ({ texts }: { texts: string[] }) => {
105 | return (
106 |
107 | {texts.map((text, index) => (
108 | - {text}
109 | ))}
110 |
111 | );
112 | };
113 |
114 | export const TypographyInlineCode = ({ text }: { text: string }) => {
115 | return (
116 |
117 | {text}
118 |
119 | );
120 | };
121 |
--------------------------------------------------------------------------------
/savegame-editor/src/components/ui/use-toast.ts:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | // Inspired by react-hot-toast library
4 | import * as React from "react"
5 |
6 | import type {
7 | ToastActionElement,
8 | ToastProps,
9 | } from "@/components/ui/toast"
10 |
11 | const TOAST_LIMIT = 1
12 | const TOAST_REMOVE_DELAY = 1000000
13 |
14 | type ToasterToast = ToastProps & {
15 | id: string
16 | title?: React.ReactNode
17 | description?: React.ReactNode
18 | action?: ToastActionElement
19 | }
20 |
21 | const actionTypes = {
22 | ADD_TOAST: "ADD_TOAST",
23 | UPDATE_TOAST: "UPDATE_TOAST",
24 | DISMISS_TOAST: "DISMISS_TOAST",
25 | REMOVE_TOAST: "REMOVE_TOAST",
26 | } as const
27 |
28 | let count = 0
29 |
30 | function genId() {
31 | count = (count + 1) % Number.MAX_SAFE_INTEGER
32 | return count.toString()
33 | }
34 |
35 | type ActionType = typeof actionTypes
36 |
37 | type Action =
38 | | {
39 | type: ActionType["ADD_TOAST"]
40 | toast: ToasterToast
41 | }
42 | | {
43 | type: ActionType["UPDATE_TOAST"]
44 | toast: Partial
45 | }
46 | | {
47 | type: ActionType["DISMISS_TOAST"]
48 | toastId?: ToasterToast["id"]
49 | }
50 | | {
51 | type: ActionType["REMOVE_TOAST"]
52 | toastId?: ToasterToast["id"]
53 | }
54 |
55 | interface State {
56 | toasts: ToasterToast[]
57 | }
58 |
59 | const toastTimeouts = new Map>()
60 |
61 | const addToRemoveQueue = (toastId: string) => {
62 | if (toastTimeouts.has(toastId)) {
63 | return
64 | }
65 |
66 | const timeout = setTimeout(() => {
67 | toastTimeouts.delete(toastId)
68 | dispatch({
69 | type: "REMOVE_TOAST",
70 | toastId: toastId,
71 | })
72 | }, TOAST_REMOVE_DELAY)
73 |
74 | toastTimeouts.set(toastId, timeout)
75 | }
76 |
77 | export const reducer = (state: State, action: Action): State => {
78 | switch (action.type) {
79 | case "ADD_TOAST":
80 | return {
81 | ...state,
82 | toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
83 | }
84 |
85 | case "UPDATE_TOAST":
86 | return {
87 | ...state,
88 | toasts: state.toasts.map((t) =>
89 | t.id === action.toast.id ? { ...t, ...action.toast } : t
90 | ),
91 | }
92 |
93 | case "DISMISS_TOAST": {
94 | const { toastId } = action
95 |
96 | // ! Side effects ! - This could be extracted into a dismissToast() action,
97 | // but I'll keep it here for simplicity
98 | if (toastId) {
99 | addToRemoveQueue(toastId)
100 | } else {
101 | state.toasts.forEach((toast) => {
102 | addToRemoveQueue(toast.id)
103 | })
104 | }
105 |
106 | return {
107 | ...state,
108 | toasts: state.toasts.map((t) =>
109 | t.id === toastId || toastId === undefined
110 | ? {
111 | ...t,
112 | open: false,
113 | }
114 | : t
115 | ),
116 | }
117 | }
118 | case "REMOVE_TOAST":
119 | if (action.toastId === undefined) {
120 | return {
121 | ...state,
122 | toasts: [],
123 | }
124 | }
125 | return {
126 | ...state,
127 | toasts: state.toasts.filter((t) => t.id !== action.toastId),
128 | }
129 | }
130 | }
131 |
132 | const listeners: Array<(state: State) => void> = []
133 |
134 | let memoryState: State = { toasts: [] }
135 |
136 | function dispatch(action: Action) {
137 | memoryState = reducer(memoryState, action)
138 | listeners.forEach((listener) => {
139 | listener(memoryState)
140 | })
141 | }
142 |
143 | type Toast = Omit
144 |
145 | function toast({ ...props }: Toast) {
146 | const id = genId()
147 |
148 | const update = (props: ToasterToast) =>
149 | dispatch({
150 | type: "UPDATE_TOAST",
151 | toast: { ...props, id },
152 | })
153 | const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id })
154 |
155 | dispatch({
156 | type: "ADD_TOAST",
157 | toast: {
158 | ...props,
159 | id,
160 | open: true,
161 | onOpenChange: (open) => {
162 | if (!open) dismiss()
163 | },
164 | },
165 | })
166 |
167 | return {
168 | id: id,
169 | dismiss,
170 | update,
171 | }
172 | }
173 |
174 | function useToast() {
175 | const [state, setState] = React.useState(memoryState)
176 |
177 | React.useEffect(() => {
178 | listeners.push(setState)
179 | return () => {
180 | const index = listeners.indexOf(setState)
181 | if (index > -1) {
182 | listeners.splice(index, 1)
183 | }
184 | }
185 | }, [state])
186 |
187 | return {
188 | ...state,
189 | toast,
190 | dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
191 | }
192 | }
193 |
194 | export { useToast, toast }
195 |
--------------------------------------------------------------------------------
/savegame-editor/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { type ClassValue, clsx } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/savegame-editor/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom/client";
3 | import App from "./App";
4 | import "./index.css";
5 |
6 | ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
7 |
8 |
9 | ,
10 | );
11 |
--------------------------------------------------------------------------------
/savegame-editor/src/models/models.ts:
--------------------------------------------------------------------------------
1 | export type Sponsor = {
2 | name: string;
3 | avatar: string;
4 | tier: string;
5 | }
6 |
7 | export interface SearchResponse {
8 | ids: string[];
9 | }
--------------------------------------------------------------------------------
/savegame-editor/src/models/save-models.ts:
--------------------------------------------------------------------------------
1 | export interface IdData {
2 | filename: string,
3 | ids: string[]
4 | }
5 |
6 | export interface PatchedItems {
7 | not_dropable: string[],
8 | not_shareable: string[]
9 | }
10 |
11 | export interface InventoryChunk {
12 | level: Uint8Array,
13 | seed: Uint8Array,
14 | amount: Uint8Array,
15 | durability: Uint8Array,
16 | space: Uint8Array,
17 | index: number,
18 | level_value: number,
19 | seed_value: number,
20 | amount_value: number,
21 | durability_value: number
22 | }
23 |
24 | export interface Mod {
25 | name: string,
26 | index: number,
27 | data_content: Uint8Array,
28 | data_string: string
29 | }
30 |
31 | export interface InventoryItem {
32 | name: string,
33 | index: number,
34 | size: number,
35 | sgd_data: Uint8Array,
36 | chunk_data: InventoryChunk,
37 | mod_data: Mod[]
38 | }
39 |
40 | export interface InventoryItemRow {
41 | name: string,
42 | inventory_items: InventoryItem[]
43 | }
44 |
45 | export interface SkillItem {
46 | name: string,
47 | index: number,
48 | size: number,
49 | sgd_data: Uint8Array,
50 | points_data: Uint8Array,
51 | points_value: number
52 | }
53 |
54 | export interface Skills {
55 | base_skills: SkillItem[],
56 | legend_skills: SkillItem[],
57 | }
58 |
59 | export interface UnlockableItem {
60 | name: string,
61 | index: number,
62 | size: number,
63 | sgd_data: Uint8Array,
64 | }
65 |
66 | export interface SaveFile {
67 | path: string,
68 | file_content: Uint8Array,
69 | file_string: string,
70 | skills: Skills,
71 | unlockable_items: UnlockableItem[],
72 | items: InventoryItemRow[],
73 | log_history: string[],
74 | is_compressed: boolean,
75 | game_version: string
76 | }
77 |
78 | export interface OutpostSave {
79 | name: string,
80 | owner: string,
81 | description: string,
82 | features: string[],
83 | version: string,
84 | save_file: SaveFile
85 | }
86 |
--------------------------------------------------------------------------------
/savegame-editor/src/models/settings-model.ts:
--------------------------------------------------------------------------------
1 | import { Theme } from '@/components/ui/theme-provider';
2 | import { Dispatch, SetStateAction } from 'react';
3 |
4 | export type SettingState = {
5 | value: T;
6 | setValue: Dispatch>;
7 | storageKey?: string;
8 | };
9 |
10 | export type DefaultItemLayout = "list" | "grid";
11 |
12 | export type DefaultHeaderFont = "drip" | "mono" | "sans";
13 |
14 | export type AppSettings = {
15 | theme: SettingState;
16 | crc: SettingState;
17 | gameFolderPath: SettingState;
18 | isDebugging: SettingState;
19 | hasAutomaticBackup: SettingState;
20 | defaultItemLayout: SettingState;
21 | defaultHeaderFont: SettingState;
22 | };
23 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/backpack-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
3 |
4 | export const BackpackPage = () => {
5 | return (
6 | <>
7 |
8 |
9 |
10 |
11 |
12 |
Backpack Page
13 |
14 |
15 |
16 |
17 | There is nothing to see here
18 |
19 |
20 |
21 | Hold on, we're still working on this page. Please ignore it for now.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | >
31 | );
32 | };
33 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/campaign-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
3 |
4 | export const CampaignPage = () => {
5 | return (
6 | <>
7 |
8 |
9 |
10 |
11 |
12 |
Campaign Page
13 |
14 |
15 |
16 |
17 | There is nothing to see here
18 |
19 |
20 |
21 | Hold on, we're still working on this page. Please ignore it for now.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | >
31 | );
32 | };
33 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/debug-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { DataTable } from "@/components/custom/data-table-component";
3 | import { Card, CardContent } from "@/components/ui/card";
4 | import { ColumnDef } from "@tanstack/react-table";
5 |
6 | type LogEntry = {
7 | log: string;
8 | }
9 |
10 | type DebugPageProps = {
11 | log_history?: string[];
12 | };
13 |
14 | const columns: ColumnDef[] = [
15 | {
16 | accessorKey: "log",
17 | header: "Logs",
18 | },
19 | ];
20 |
21 | export const DebugPage = ({log_history}: DebugPageProps) => {
22 | // Transform log_history into an array of objects
23 | const data = log_history ? log_history.map(log => ({ log })) : [];
24 |
25 | return (
26 | <>
27 |
28 |
29 |
30 |
31 |
32 |
Debug Page
33 |
34 |
35 |
36 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | >
47 | );
48 | };
49 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/ids-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { DataTable } from "@/components/custom/data-table-component";
3 | import { Button } from "@/components/ui/button";
4 | import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
5 | import { IdData } from "@/models/save-models";
6 | import { ColumnDef } from "@tanstack/react-table";
7 | import { useEffect, useState } from "react";
8 | import { ChevronsUpDown, Copy } from "lucide-react";
9 | import {
10 | TooltipProvider,
11 | Tooltip,
12 | TooltipTrigger,
13 | TooltipContent,
14 | } from "@radix-ui/react-tooltip";
15 |
16 | type SkillsPageProps = {
17 | ids?: IdData[];
18 | };
19 |
20 | export const columns: ColumnDef[] = [
21 | {
22 | accessorKey: "name",
23 | accessorFn: (row) => row,
24 | header: ({ column }) => {
25 | return (
26 |
34 | );
35 | },
36 | cell: ({ row }) => (
37 |
38 | {row.getValue("name")}
39 |
40 |
41 |
42 |
53 |
54 | Copy Path
55 |
56 |
57 |
58 | ),
59 | },
60 | ];
61 |
62 | export const IDsPage = ({ ids }: SkillsPageProps) => {
63 | const [allIDs, setAllIDs] = useState();
64 |
65 | useEffect(() => {
66 | const fetchAllIDs = async () => {
67 | const allIDs = ids?.reduce((acc, idData) => {
68 | return acc.concat(idData.ids);
69 | }, [] as string[]);
70 |
71 | setAllIDs(allIDs);
72 | };
73 |
74 | fetchAllIDs();
75 | }, [ids]);
76 |
77 | return (
78 | <>
79 |
80 |
81 |
82 |
83 |
84 |
IDs Page
85 | {ids ? (
86 | <>
87 |
88 |
89 |
90 | All
91 |
92 | {ids?.map((idData, index) => (
93 |
98 | {idData.filename}
99 |
100 | ))}
101 |
102 |
103 |
104 |
110 |
111 | {ids?.map((idData, index) => (
112 |
113 |
119 |
120 | ))}
121 |
122 | >
123 | ) : (
124 | <>>
125 | )}
126 |
127 |
128 |
129 |
130 | >
131 | );
132 | };
133 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/knowledge-vault.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { KnowledgeCarouselComponent } from "@/components/custom/knowledge-carousel-component";
3 |
4 | export const KnowledgeVaultPage = () => {
5 |
6 | return (
7 | <>
8 |
9 |
10 |
11 |
12 |
13 |
Knowledge Vault Page
14 |
15 |
16 |
17 |
18 |
19 |
20 | >
21 | );
22 | };
--------------------------------------------------------------------------------
/savegame-editor/src/pages/outpost-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { HelixLoader } from "@/components/custom/helix-loader/helix-loader-component";
3 | import { OutPostCarouselComponent } from "@/components/custom/outpost-carousel-component";
4 | import { ToastAction } from "@/components/ui/toast";
5 | import { toast } from "@/components/ui/use-toast";
6 | import { OutpostSave, SaveFile } from "@/models/save-models";
7 | import { SettingState } from "@/models/settings-model";
8 | import { invoke } from "@tauri-apps/api/core";
9 | import { useEffect, useState } from "react";
10 |
11 | type OutpostProps = {
12 | currentSaveFile: SettingState;
13 | outpostSaves: SettingState;
14 | };
15 |
16 | export const HawksOutpostPage = ({
17 | currentSaveFile,
18 | outpostSaves,
19 | }: OutpostProps) => {
20 | const [isLoading, setIsLoading] = useState(false);
21 |
22 | useEffect(() => {
23 | const fetchOutpostSaves = async () => {
24 | setIsLoading(true);
25 | const result = await invoke("get_outpost_saves").catch(
26 | (err) => {
27 | toast({
28 | title: "Uh oh! Something went wrong.",
29 | description: err,
30 | action: Try again,
31 | });
32 | return;
33 | }
34 | );
35 |
36 | if (result) {
37 | outpostSaves.setValue(result);
38 | setIsLoading(false);
39 | }
40 | };
41 |
42 | // Check if outpostSaves has been set
43 | if (outpostSaves.value === undefined) {
44 | fetchOutpostSaves();
45 | }
46 | }, [outpostSaves.value]);
47 |
48 | return (
49 | <>
50 |
51 |
52 |
53 |
54 |
55 |
Hawks Outpost
56 |
57 |
58 |
59 |
60 |
61 | {/* Loading Animation */}
62 | {isLoading && (
63 | <>
64 |
67 | >
68 | )}
69 |
70 | >
71 | );
72 | };
73 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/player-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
3 |
4 | export const PlayerPage = () => {
5 | return (
6 | <>
7 |
8 |
9 |
10 |
11 |
12 |
Player Page
13 |
14 |
15 |
16 |
17 | There is nothing to see here
18 |
19 |
20 |
21 | Hold on, we're still working on this page. Please ignore it for now.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | >
31 | );
32 | };
33 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/unlockables-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { DataTable } from "@/components/custom/data-table-component";
3 | import { UnlockableItem } from "@/models/save-models";
4 | import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
5 | import { Button } from "@/components/ui/button";
6 | import { ColumnDef } from "@tanstack/react-table";
7 | import { ChevronsUpDown } from "lucide-react";
8 |
9 | type UnlockablesPageProps = {
10 | unlockables?: UnlockableItem[];
11 | };
12 |
13 | export const columns: ColumnDef[] = [
14 | {
15 | accessorKey: "name",
16 | accessorFn: (row) => row.name,
17 | header: ({ column }) => {
18 | return (
19 |
26 | );
27 | },
28 | cell: ({ row }) => {row.getValue("name")}
,
29 | },
30 | {
31 | accessorKey: "offset",
32 | accessorFn: (row) => row.index,
33 | header: ({ column }) => {
34 | return (
35 |
42 | );
43 | },
44 | cell: ({ row }) => {row.getValue("offset")}
,
45 | },
46 | ];
47 |
48 | export const UnlockablesPage = ({ unlockables }: UnlockablesPageProps) => {
49 | return (
50 | <>
51 |
52 |
53 |
54 |
55 |
56 |
Unlockables Page
57 |
58 | {unlockables ? (
59 |
60 | ) : (
61 | <>
62 |
63 |
64 |
65 | There is nothing to see here
66 |
67 |
68 |
69 | No Unlockables found. Please make sure that you have
70 | loaded a valid save file.
71 |
72 |
73 |
74 |
75 | >
76 | )}
77 |
78 |
79 |
80 |
81 | >
82 | );
83 | };
84 |
--------------------------------------------------------------------------------
/savegame-editor/src/pages/welcome-page.tsx:
--------------------------------------------------------------------------------
1 | import { NavbarComponent } from "@/components/custom/custom-navbar-component";
2 | import { Button } from "@/components/ui/button";
3 | import {
4 | Dialog,
5 | DialogContent,
6 | DialogDescription,
7 | DialogFooter,
8 | DialogHeader,
9 | DialogTitle,
10 | } from "@/components/ui/dialog";
11 | import { useTheme } from "@/components/ui/theme-provider";
12 | import { AppSettings } from "@/models/settings-model";
13 | import { useNavigate } from "react-router-dom";
14 |
15 | type WelcomePageProps = {
16 | appSettings: AppSettings;
17 | };
18 |
19 | export const WelcomePage = ({ appSettings }: WelcomePageProps) => {
20 | const { setTheme } = useTheme();
21 | const navigate = useNavigate();
22 |
23 | const handleContinueWithEditor = () => {
24 | setTheme(appSettings.theme.value);
25 | navigate("/main");
26 | };
27 |
28 | return (
29 | <>
30 |
31 |
32 |
33 |
34 |
35 |
Welcome
36 |
37 |
61 |
62 |
63 |
64 |
65 | >
66 | );
67 | };
68 |
--------------------------------------------------------------------------------
/savegame-editor/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/savegame-editor/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | darkMode: ["class"],
4 | content: [
5 | './pages/**/*.{ts,tsx}',
6 | './components/**/*.{ts,tsx}',
7 | './app/**/*.{ts,tsx}',
8 | './src/**/*.{ts,tsx}',
9 | ],
10 | prefix: "",
11 | theme: {
12 | container: {
13 | center: true,
14 | padding: "2rem",
15 | screens: {
16 | "2xl": "1400px",
17 | },
18 | },
19 | extend: {
20 | colors: {
21 | border: "hsl(var(--border))",
22 | input: "hsl(var(--input))",
23 | ring: "hsl(var(--ring))",
24 | background: "hsl(var(--background))",
25 | foreground: "hsl(var(--foreground))",
26 | primary: {
27 | DEFAULT: "hsl(var(--primary))",
28 | foreground: "hsl(var(--primary-foreground))",
29 | },
30 | secondary: {
31 | DEFAULT: "hsl(var(--secondary))",
32 | foreground: "hsl(var(--secondary-foreground))",
33 | },
34 | destructive: {
35 | DEFAULT: "hsl(var(--destructive))",
36 | foreground: "hsl(var(--destructive-foreground))",
37 | },
38 | muted: {
39 | DEFAULT: "hsl(var(--muted))",
40 | foreground: "hsl(var(--muted-foreground))",
41 | },
42 | accent: {
43 | DEFAULT: "hsl(var(--accent))",
44 | foreground: "hsl(var(--accent-foreground))",
45 | },
46 | popover: {
47 | DEFAULT: "hsl(var(--popover))",
48 | foreground: "hsl(var(--popover-foreground))",
49 | },
50 | card: {
51 | DEFAULT: "hsl(var(--card))",
52 | foreground: "hsl(var(--card-foreground))",
53 | },
54 | },
55 | fontFamily: {
56 | 'drip': ["Drip", "sans-serif"],
57 | },
58 | borderRadius: {
59 | lg: "var(--radius)",
60 | md: "calc(var(--radius) - 2px)",
61 | sm: "calc(var(--radius) - 4px)",
62 | },
63 | keyframes: {
64 | "accordion-down": {
65 | from: { height: "0" },
66 | to: { height: "var(--radix-accordion-content-height)" },
67 | },
68 | "accordion-up": {
69 | from: { height: "var(--radix-accordion-content-height)" },
70 | to: { height: "0" },
71 | },
72 | popUpAndVanish: {
73 | '0%, 100%': { transform: 'scale(0)', opacity: '0' },
74 | '50%': { transform: 'scale(1.5)', opacity: '1' },
75 | },
76 | },
77 | animation: {
78 | "accordion-down": "accordion-down 0.2s ease-out",
79 | "accordion-up": "accordion-up 0.2s ease-out",
80 | "popUpAndVanish": "popUpAndVanish 1s ease-out forwards",
81 | },
82 | },
83 | },
84 | plugins: [require("tailwindcss-animate")],
85 | }
--------------------------------------------------------------------------------
/savegame-editor/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "useDefineForClassFields": true,
5 | "lib": ["ES2020", "DOM", "DOM.Iterable"],
6 | "module": "ESNext",
7 | "skipLibCheck": true,
8 | "baseUrl": ".",
9 | "paths": {
10 | "@/*": [
11 | "./src/*"
12 | ]
13 | },
14 |
15 | /* Bundler mode */
16 | "moduleResolution": "bundler",
17 | "allowImportingTsExtensions": true,
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx",
22 |
23 | /* Linting */
24 | "strict": true,
25 | "noUnusedLocals": true,
26 | "noUnusedParameters": true,
27 | "noFallthroughCasesInSwitch": true
28 | },
29 | "include": ["src"],
30 | "references": [{ "path": "./tsconfig.node.json" }]
31 | }
32 |
--------------------------------------------------------------------------------
/savegame-editor/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/savegame-editor/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vite";
2 | import react from "@vitejs/plugin-react";
3 | import path from "path"
4 |
5 | // https://vitejs.dev/config/
6 | export default defineConfig(async () => ({
7 | plugins: [react()],
8 | resolve: {
9 | alias: {
10 | "@": path.resolve(__dirname, "./src"),
11 | },
12 | },
13 |
14 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
15 | //
16 | // 1. prevent vite from obscuring rust errors
17 | clearScreen: false,
18 | // 2. tauri expects a fixed port, fail if that port is not available
19 | server: {
20 | port: 1420,
21 | strictPort: true,
22 | watch: {
23 | // 3. tell vite to ignore watching `src-tauri`
24 | ignored: ["**/src-tauri/**"],
25 | },
26 | },
27 | }));
28 |
--------------------------------------------------------------------------------