Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
endernon | 85fd671a65 | ||
endernon | 00796f3e98 | ||
endernon | 1e9d46b6ef | ||
endernon | 769a8c46cf | ||
endernon | a2914bdb33 | ||
endernon | fd7bc7acc8 | ||
endernon | 9e2d94c625 | ||
endernon | 8c111c1b11 | ||
endernon | 1daeb1df56 |
213
Cargo.lock
generated
213
Cargo.lock
generated
|
@ -2,12 +2,113 @@
|
|||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.6.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"is_terminal_polyfill",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "3.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.22.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
"strsim",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.5.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
||||
|
||||
[[package]]
|
||||
name = "idmangler-lib"
|
||||
version = "0.3.0"
|
||||
|
@ -17,6 +118,23 @@ dependencies = [
|
|||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "idmanglercli"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"clap",
|
||||
"idmangler-lib",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "is_terminal_polyfill"
|
||||
version = "1.70.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.11"
|
||||
|
@ -29,16 +147,6 @@ version = "2.7.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
||||
|
||||
[[package]]
|
||||
name = "newestidmangler"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"idmangler-lib",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.86"
|
||||
|
@ -95,6 +203,12 @@ dependencies = [
|
|||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.77"
|
||||
|
@ -131,3 +245,82 @@ name = "unicode-ident"
|
|||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
[package]
|
||||
name = "newestidmangler"
|
||||
version = "0.3.0"
|
||||
name = "idmanglercli"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
base64 = "0.22.1"
|
||||
clap = { version = "4.5.20", features = ["derive"] }
|
||||
idmangler-lib = "0.3.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
|
9
LICENSE
Normal file
9
LICENSE
Normal file
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 endernon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
README.md
17
README.md
|
@ -1,6 +1,9 @@
|
|||
# idmangler-cli
|
||||
Basically this generates fake items by loading from a json. Effectively a wrapper for [zatzou's idmangler-lib](https://github.com/Zatzou/idmangler-lib).
|
||||
|
||||
Any bugs? DM endernon on discord.
|
||||
|
||||
|
||||
## How to get the program
|
||||
### Option 1: prebuilt
|
||||
Go to the [releases tab](https://git.frfrnocap.men/endernon/idmangler-cli/releases)
|
||||
|
@ -9,7 +12,13 @@ requirements: rust, cargo
|
|||
use cargo run --release to build and run.
|
||||
|
||||
## Usage
|
||||
Move the program to some folder. Download these three files and place them next to the program:
|
||||
https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json
|
||||
https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json
|
||||
read the provided config markdown file to understand how to edit config.json
|
||||
- Move the program to some folder along with config.json . Download these three files and place them next to the program:
|
||||
- https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json
|
||||
- https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json
|
||||
|
||||
- Open a terminal (Windows: use cmd or Powershell , Linux: use your preferred Terminal Emulator)
|
||||
- Use the command "cd DIRECTORY" (where DIRECTORY is where the program is stored)
|
||||
- read the provided config markdown file to understand how to edit config.json
|
||||
|
||||
|
||||
|
||||
|
|
267
config.json
267
config.json
|
@ -3,11 +3,10 @@
|
|||
"Refer to config.md to understand how to apply the data shown here.",
|
||||
"There are also some values you cannot increase beyond a limit."
|
||||
],
|
||||
"debug":true,
|
||||
"name":"Singularity",
|
||||
"shiny": {
|
||||
"key": "raidsWon",
|
||||
"value": 69
|
||||
"key": "playersKilled",
|
||||
"value": 9223372036854775807
|
||||
},
|
||||
"ids": [
|
||||
{"id": "mainAttackDamage","base": 320,"roll": 69},
|
||||
|
@ -21,10 +20,262 @@
|
|||
],
|
||||
"powder_limit": 255,
|
||||
"powders": [
|
||||
{ "type":"T", "tier":6, "amount":5 },
|
||||
{"type":"e","tier":6,"amount":5},
|
||||
{"type":"f", "tier":6,"amount":1},
|
||||
{ "type" : "f" , "tier":6 }
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6}
|
||||
|
||||
],
|
||||
"rerolls": 0
|
||||
"rerolls": 255
|
||||
}
|
|
@ -2,7 +2,9 @@
|
|||
## Name
|
||||
**Name** is stored as a String. It must be a valid Wynncraft item for it to display as intended.
|
||||
## Shiny ID
|
||||
not yet implemented
|
||||
Inside the Shiny{} list, there will be two elements: "key" and "value".
|
||||
The potential keys for any shiny value are listed here: https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json
|
||||
The value is the shown amount.
|
||||
## Powders
|
||||
|
||||
### Powder Limit
|
||||
|
|
25
config_hanafupookie.json
Normal file
25
config_hanafupookie.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"READMEFIRST": [
|
||||
"Refer to config.md to understand how to apply the data shown here.",
|
||||
"There are also some values you cannot increase beyond a limit."
|
||||
],
|
||||
"name":"Hanafubuki",
|
||||
"shiny": {
|
||||
"key": "playersKilled",
|
||||
"value": 9223372036854775807
|
||||
},
|
||||
"ids": [
|
||||
{"id": "3rdSpellCost","base": -25,"roll": 70},
|
||||
{"id": "4thSpellCost", "base":-15 , "roll":70 },
|
||||
{"id": "earthDefence", "base":25 , "roll": 130 },
|
||||
{"id": "elementalDamage", "base":256 , "roll":130},
|
||||
{"id": "jumpHeight", "base":3, "roll":130 },
|
||||
{"id": "rawStrength", "base":15}
|
||||
],
|
||||
"powder_limit": 255,
|
||||
"powders": [
|
||||
|
||||
|
||||
],
|
||||
"rerolls": 255
|
||||
}
|
281
config_singu.json
Normal file
281
config_singu.json
Normal file
|
@ -0,0 +1,281 @@
|
|||
{
|
||||
"READMEFIRST": [
|
||||
"Refer to config.md to understand how to apply the data shown here.",
|
||||
"There are also some values you cannot increase beyond a limit."
|
||||
],
|
||||
"name":"Singularity",
|
||||
"shiny": {
|
||||
"key": "playersKilled",
|
||||
"value": 9223372036854775807
|
||||
},
|
||||
"ids": [
|
||||
{"id": "mainAttackDamage","base": 320,"roll": 69},
|
||||
{"id": "healthRegenRaw", "base":250 , "roll":130 },
|
||||
{"id": "rawDexterity", "base":35 },
|
||||
{"id": "walkSpeed", "base":-40 , "roll":69},
|
||||
{"id": "mainAttackDamage", "base":15, "roll":130 },
|
||||
{"id": "rawMainAttackDamage", "base":444 , "roll":130 },
|
||||
{"id": "rawSpellDamage", "base":222 , "roll":130 },
|
||||
{"id": "spellDamage", "base":10 , "roll":130 }
|
||||
],
|
||||
"powder_limit": 255,
|
||||
"powders": [
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6},
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
{"type":"W", "tier":6},
|
||||
{"type":"F", "tier":6},
|
||||
{"type":"A", "tier":6}
|
||||
|
||||
],
|
||||
"rerolls": 255
|
||||
}
|
140
src/main.rs
140
src/main.rs
|
@ -17,52 +17,57 @@ use std::collections::HashMap;
|
|||
use std::fs;
|
||||
use std::panic;
|
||||
use std::env;
|
||||
use std::string::ToString;
|
||||
use serde_json;
|
||||
use serde::Deserialize;
|
||||
mod structures;
|
||||
use crate::structures::*;
|
||||
|
||||
// structs
|
||||
#[derive(Deserialize)]
|
||||
struct Powder {
|
||||
r#type: char,
|
||||
tier: u8,
|
||||
amount: Option<u8>
|
||||
}
|
||||
#[derive(Deserialize)]
|
||||
struct Identificationer {
|
||||
id: String,
|
||||
base: i32,
|
||||
roll: Option<u8>
|
||||
}
|
||||
#[derive(Deserialize)]
|
||||
struct jsonconfig {
|
||||
debug:Option<bool>,
|
||||
name: String,
|
||||
shiny: Option<shinyjson>,
|
||||
ids: Vec<Identificationer>,
|
||||
powder_limit: u8,
|
||||
powders: Vec<Powder>,
|
||||
rerolls:Option<u8>
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct shinystruct{
|
||||
id: u8,
|
||||
key:String
|
||||
}
|
||||
#[derive(Deserialize)]
|
||||
struct shinyjson {
|
||||
key: String,
|
||||
value: u8
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
/// Path for config path
|
||||
#[arg(short, long)]
|
||||
configpath: Option<String>,
|
||||
|
||||
/// Enable debug mode
|
||||
#[arg(short, long, default_value_t = false)]
|
||||
debugmode: bool,
|
||||
}
|
||||
|
||||
// const fallbackconfigpath: String = "config.json".to_owned();
|
||||
|
||||
fn main() {
|
||||
// enable fancypanic when building for release
|
||||
// fancypanic();
|
||||
let args = Args::parse();
|
||||
|
||||
|
||||
|
||||
let mut debugMode = false;
|
||||
if args.debugmode == true {
|
||||
debugMode = true;
|
||||
println!("Debug mode enabled");
|
||||
};
|
||||
let mut configpath:String = String::from("config.json");
|
||||
if let Some(configpathargs) = args.configpath {
|
||||
configpath = configpathargs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// newest json reading code
|
||||
let json_config: jsonconfig = serde_json::from_reader(
|
||||
fs::File::open("config.json").expect(ERROR[1]))
|
||||
fs::File::open(configpath).expect(ERROR[1]))
|
||||
.expect(ERROR[2]);
|
||||
let idsmap: HashMap<String, u8> = serde_json::from_reader(
|
||||
fs::File::open("id_keys.json").expect(ERROR[3]))
|
||||
|
@ -73,7 +78,6 @@ fn main() {
|
|||
// println!("{:?}",idsmap.get("airDamage"));
|
||||
|
||||
|
||||
|
||||
let mut out = Vec::new();
|
||||
let ver = TransformVersion::Version1;
|
||||
|
||||
|
@ -140,38 +144,60 @@ fn main() {
|
|||
for _i in 0..powderamount {
|
||||
powdervec.push((Powders::EARTH,powdertier))
|
||||
}
|
||||
if debugMode {
|
||||
println!("Powder type: Earth");
|
||||
}
|
||||
},
|
||||
'T' | 't' => {
|
||||
for _i in 0..powderamount {
|
||||
powdervec.push((Powders::THUNDER,powdertier))
|
||||
}
|
||||
if debugMode {
|
||||
println!("Powder type: Thunder");
|
||||
}
|
||||
},
|
||||
'W' | 'w' => {
|
||||
for _i in 0..powderamount {
|
||||
powdervec.push((Powders::WATER,powdertier))
|
||||
}
|
||||
if debugMode {
|
||||
println!("Powder type: Water");
|
||||
}
|
||||
},
|
||||
'F' | 'f' => {
|
||||
for _i in 0..powderamount {
|
||||
powdervec.push((Powders::FIRE,powdertier))
|
||||
}
|
||||
if debugMode {
|
||||
println!("Powder type: Fire");
|
||||
}
|
||||
},
|
||||
'A' | 'a' => {
|
||||
for _i in 0..powderamount {
|
||||
powdervec.push((Powders::AIR,powdertier))
|
||||
}
|
||||
if debugMode {
|
||||
println!("Powder type: Air");
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
for _i in 0..powderamount {
|
||||
powdervec.push((Powders::THUNDER,powdertier))
|
||||
}
|
||||
if debugMode {
|
||||
println!("Powder type: Broken, fallback Thunder");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// println!("tier {}",powdertier);
|
||||
// println!("amount {}",powderamount);
|
||||
if debugMode {
|
||||
println!("Powder tier: {}",powdertier);
|
||||
println!("Powder amount: {}",powderamount);
|
||||
}
|
||||
}
|
||||
if debugMode {
|
||||
println!("Powders Vec: {:?}",powdervec);
|
||||
}
|
||||
// println!("{:?}",powdervec);
|
||||
|
||||
// old powder data encode kinda, takes data from new encode
|
||||
PowderData {
|
||||
|
@ -186,6 +212,9 @@ fn main() {
|
|||
Some(i) => {
|
||||
if i != 0 {
|
||||
RerollData(i).encode(ver, &mut out).unwrap();
|
||||
if debugMode {
|
||||
println!("Rerolls: {}",i)
|
||||
}
|
||||
}
|
||||
},
|
||||
None => pass()
|
||||
|
@ -195,22 +224,27 @@ fn main() {
|
|||
if let Some(shiny) = json_config.shiny {
|
||||
if let ref shinykey = shiny.key {
|
||||
if let shinyvalue = shiny.value{
|
||||
realshinykey = 1;
|
||||
for i in json_shiny {
|
||||
if i.key == shiny.key {
|
||||
realshinykey = i.id;
|
||||
println!("shiny key {}",shiny.key);
|
||||
realshinykey = 1;
|
||||
for i in json_shiny {
|
||||
if i.key == shiny.key {
|
||||
realshinykey = i.id;
|
||||
if debugMode {
|
||||
println!("shiny key {}", shiny.key);
|
||||
}
|
||||
}
|
||||
println!("realshinykey: {}",realshinykey);
|
||||
println!("shinyvalue: {}",shinyvalue);
|
||||
ShinyData {
|
||||
id: realshinykey,
|
||||
val: shinyvalue as i64, //- 0b0100_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000,
|
||||
// u16::MAX is the max value of unsigned 16bit value
|
||||
}
|
||||
.encode(ver, &mut out)
|
||||
.unwrap();
|
||||
}
|
||||
if debugMode {
|
||||
println!("realshinykey: {}", realshinykey);
|
||||
println!("shinyvalue: {}", shinyvalue);
|
||||
}
|
||||
|
||||
ShinyData {
|
||||
id: realshinykey,
|
||||
val: shinyvalue as i64, //- 0b0100_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000,
|
||||
// u16::MAX is the max value of unsigned 16bit value
|
||||
}
|
||||
.encode(ver, &mut out)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
35
src/structures/mod.rs
Normal file
35
src/structures/mod.rs
Normal file
|
@ -0,0 +1,35 @@
|
|||
use serde::Deserialize;
|
||||
// structs
|
||||
#[derive(Deserialize)]
|
||||
pub struct Powder {
|
||||
pub r#type: char,
|
||||
pub tier: u8,
|
||||
pub amount: Option<u8>
|
||||
}
|
||||
#[derive(Deserialize)]
|
||||
pub struct Identificationer {
|
||||
pub id: String,
|
||||
pub base: i32,
|
||||
pub roll: Option<u8>
|
||||
}
|
||||
#[derive(Deserialize)]
|
||||
pub struct jsonconfig {
|
||||
pub debug: Option<bool>,
|
||||
pub name: String,
|
||||
pub shiny: Option<shinyjson>,
|
||||
pub ids: Vec<Identificationer>,
|
||||
pub powder_limit: u8,
|
||||
pub powders: Vec<Powder>,
|
||||
pub rerolls:Option<u8>
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct shinystruct{
|
||||
pub id: u8,
|
||||
pub key:String
|
||||
}
|
||||
#[derive(Deserialize)]
|
||||
pub struct shinyjson {
|
||||
pub key: String,
|
||||
pub value: i64
|
||||
}
|
Loading…
Reference in a new issue