From b2b7074213c66a67a93abec342b8333d84a8fa8e Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 27 Oct 2021 00:07:07 +0900 Subject: [PATCH 01/34] improved readability --- README.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 926aae0..56ee695 100644 --- a/README.md +++ b/README.md @@ -41,17 +41,17 @@ Only Windows, MacOS, and Linux are officially supported. It is Not compatible wi How to find game location:
![how to find game location](./images/local_files.png) - The folder structure should look like this after unzipping file: + The folder structure should look like this after unzipping the file: ``` WarBrokers/ ├── BepInEx/ - │  ├── core/ - │ └ other files... + │  ├── core/ + │ └── other files... └ other files... ``` -3. If you are using Linux or MacOS, you must also perform the following setup: +3. **If you are using Linux or MacOS**, you must also perform the following setup: 1. make `run_bepinex.sh` executable: `chmod u+x run_bepinex.sh` 2. Add launch option @@ -59,40 +59,44 @@ Only Windows, MacOS, and Linux are officially supported. It is Not compatible wi where to find game properties:
![where to find game properties](images/properties.png) - If you're on linux, set the launch option to: + **If you're using linux**, set the launch option to: ```bash ./run_bepinex.sh %command% ``` - If you're on Mac, open a terminal in the game folder and run + **If you're using Mac**, open a terminal in the game folder and run ```bash pwd ``` - This will print the full path to the game folder. Copy it. Next, set launch option to + This will print the full path to the game folder. Copy it, then set the launch option to: ```bash - "PUT_RESULT_FROM_PWD_HERE/run_bepinex.sh" %command% + "PWD_RESULT_HERE/run_bepinex.sh" %command% ``` -4. Run the game at least once to generate the plugins folder as well as other necessary files. +4. **RUN THE GAME AT LEAST ONCE** to generate the plugins folder as well as other necessary files. ### 2. Install WBM 1. [Download](https://github.com/War-Brokers-Mods/WBM/releases/latest) the latest version of WBM. (`WBM.zip` file) 2. Unzip it in the `/BepInEx/plugins` folder. - It should look like this: + The folder structure should look like this after unzipping the file: ``` - plugins (in the BepInEx folder) - └── WBM - ├── assets - │   └── audio - │   └── ... - └── WBM.dll + WarBrokers/ + ├── BepInEx/ + │ ├── plugins/ + │ │ └── WBM + │ │ ├── assets/ + │ │ ├── other files... + │ │ └── WBM.dll + │  ├── core/ + │ └── other files... + └── other files... ``` ### 3. Set up OBS (optional) From 195e44c005319274eaa6fd0628c42f47cd95aa59 Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 27 Oct 2021 00:08:20 +0900 Subject: [PATCH 02/34] made folder tree more consistent --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56ee695..2e3b092 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Only Windows, MacOS, and Linux are officially supported. It is Not compatible wi ├── BepInEx/ │  ├── core/ │ └── other files... - └ other files... + └── other files... ``` 3. **If you are using Linux or MacOS**, you must also perform the following setup: From c39649d1ffe6e5adecc2f414448b0c519af32b1e Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 1 Jan 2022 15:53:24 +0900 Subject: [PATCH 03/34] fixed incorrectly formatted markdown --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2e3b092..d60409a 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Only Windows, MacOS, and Linux are officially supported. It is Not compatible wi ``` WarBrokers/ ├── BepInEx/ - │  ├── core/ + │ ├── core/ │ └── other files... └── other files... ``` @@ -94,7 +94,7 @@ Only Windows, MacOS, and Linux are officially supported. It is Not compatible wi │ │ ├── assets/ │ │ ├── other files... │ │ └── WBM.dll - │  ├── core/ + │ ├── core/ │ └── other files... └── other files... ``` @@ -152,7 +152,7 @@ The order of keystroke matter. For example, pressing RShift+A disabled~1000) +- Extended fps limit (5\~240 => disabled\~1000) ### in-game overlays From 7d15cf225ff5c3c52303e20b485a955113bc1736 Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 1 Jan 2022 15:57:53 +0900 Subject: [PATCH 04/34] added link to sound effects --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d60409a..881aebd 100644 --- a/README.md +++ b/README.md @@ -197,11 +197,11 @@ The order of keystroke matter. For example, pressing RShift+A) +- 30 kill streak: ["unstoppable"](./assets/audio/unstoppable.wav) +- 50 kill streak: ["godlike"](./assets/audio/godlike.wav) +- 69 kill streak: ["nice"](./assets/audio/nice.wav) ### OBS overlays From f78c0ccd8b5f613300e837362beb1815d107c37c Mon Sep 17 00:00:00 2001 From: developomp Date: Sun, 23 Jan 2022 14:41:57 +0900 Subject: [PATCH 05/34] improved readability and added link to installer --- README.md | 98 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 881aebd..6cc71bd 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,12 @@ ## Installation -Only Windows, MacOS, and Linux are officially supported. It is Not compatible with browsers. +Only Windows, MacOS, and Linux are officially supported. It is **NOT** compatible with browsers. -> **WARNING**
-> I do not upload WBM anywhere other than github. If you find it elsewhere, IT IS NOT UPLOADED BY ME. +[WBM Installer](https://github.com/War-Brokers-Mods/WBM-installer) will be available soon. + +
+Manual Installation Instruction (click to unfold) ### 1. Install BepInEx @@ -114,51 +116,57 @@ Only Windows, MacOS, and Linux are officially supported. It is Not compatible wi Simply go through the installation process again and replace existing files. You don't have to reinstall BepInEx to reinstall WBM. +
+ ## Usage +### Warning + +The order of keystroke matters. +For example, pressing RShift+A is different from pressing A+RShift. This is to prevent situation where RShift+A fires when the user intended to press LCtrl+RShift+A. + ### Default shortcuts - Hold down LCtrl or RShift to show shortcuts in-game. -- Press F1 to show menu. Press outside the menu to close. +- Press F1 to show menu. Click outside the menu to close. -| Function | Default Shortcut | -| ------------------------------------ | --------------------------------------------------- | -| Show Menu | F1 | -|
| | -| Move GUI | LCtrl+LShift+Arrow | -| Move GUI by one pixel | LCtrl+Arrow | -| Reset GUI position | LCtrl+R | -|
| | -| Toggle All GUI visibility | RShift+A | -| Toggle Player statistics visibility | RShift+P | -| Toggle Weapon statistics visibility | RShift+W | -| Toggle Team statistics visibility | RShift+L | -| Toggle Elo visibility on leaderboard | RShift+E | -| Squad server visibility | RShift+S | -| Testing servers visibility | RShift+T | -| Kill streak sound effect | RShift+F | -| Clear chat | RShift+Z | -| Clear Messages (kills and death log) | RShift+X | -|
| | -| Toggle shift to crouch | RShift+C | - -#### Warning - -The order of keystroke matter. For example, pressing RShift+A is different from pressing A+RShift. This is to prevent situation where RShift+A fires when the user intended to press LCtrl+RShift+A. +| Function | Default Shortcut | +| ------------------------------------------ | --------------------------------------------------- | +| Show Menu | F1 | +|
| | +| Move GUI (long press) | LCtrl+LShift+Arrow | +| Move GUI by one pixel | LCtrl+Arrow | +| Reset GUI position | LCtrl+R | +|
| | +| Toggle All GUI visibility | RShift+A | +| Toggle player statistics visibility | RShift+P | +| Toggle weapon statistics visibility | RShift+W | +| Toggle team statistics visibility | RShift+L | +| Toggle kills Elo visibility on leaderboard | RShift+E | +| Toggle squad server visibility | RShift+S | +| Toggle Testing servers visibility | RShift+T | +| Toggle kill streak sound effect | RShift+F | +| Clear chat | RShift+Z | +| Clear kills and death log | RShift+X | +|
| | +| Toggle shift to crouch | RShift+C | ## Features +
+A list of all the features in WBM (click to unfold) + - in-game menu -- reconfigure shortcut keys +- custom shortcut keys - clear chat - clear game messages (kills, deaths, missile launch, bomb diffuse, etc.) -- Extended fps limit (5\~240 => disabled\~1000) +- Extended fps limit (5\~240 => disabled\~1000) (may be buggy) ### in-game overlays -- Tab Leaderboard +- Leaderboard - - show kills Elo + - kills Elo for each player - Player statistics @@ -211,19 +219,29 @@ The order of keystroke matter. For example, pressing RShift+A ## Limitations -WBM is not a hack. WBM will not include any features that will give unfair advantage. These features include but not limited to: extended minimap zoom, quick weapon swap, instant zoom, extended field of view, audio filter, etc. +WBM is not a hack. +WBM will not include any features that will give unfair advantages. +These features include but not limited to: +extended minimap zoom, quick weapon swap, instant zoom, extended field of view, audio filter, etc. -WBM will not include any custom skins. Micro-transaction accounts for a significant portion of the developers' income and WBM will not include any feature that will damage it. +WBM will not include any custom skins. +Micro-transaction accounts for a significant portion of the developers' income, +and WBM will not include any feature that will affect it. ## Building -If you are a casual user, this is completely unnecessary. **This is only recommended for developers.** +If you are a casual user, this is completely unnecessary. +**This is only recommended for developers.** + +
+ Building instructions (click to unfold) > Assumes that working directory is project root. @@ -244,13 +262,15 @@ If you are a casual user, this is completely unnecessary. **This is only recomme - `scripts/debug.sh`: Build WBM in debug mode and copy the files to the plugins directory. - `scripts/release.sh`: Create a zip file that can be uploaded in the gh release section. +
+ ## Bug reports / Suggestions If you have a cool idea that will make WBM better, or if WBM misbehaves in any way (no matter how minor the problem is), feel free go to the [Issues page](https://github.com/War-Brokers-Mods/WBM/issues) and open a new issue! ## Contributing -- use GH pull request +- use the github pull request. - use vscode and install [recommended extensions](.vscode/extensions.json). This is required for code formatting. ## Special thanks @@ -261,7 +281,7 @@ If you have a cool idea that will make WBM better, or if WBM misbehaves in any w ## License -This project is licenced under the [MIT License](https://opensource.org/licenses/MIT). +The source code for this project is available under the [MIT License](https://opensource.org/licenses/MIT). Fonts: From d509a618b47d589c8b6b5a429ac2e9f199bba078 Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 9 Feb 2022 11:51:31 +0900 Subject: [PATCH 06/34] updated install instruction --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6cc71bd..71d2210 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Only Windows, MacOS, and Linux are officially supported. It is **NOT** compatible with browsers. -[WBM Installer](https://github.com/War-Brokers-Mods/WBM-installer) will be available soon. +Usage of the [WBM Installer](https://github.com/War-Brokers-Mods/WBM-installer/releases) is recommended.
Manual Installation Instruction (click to unfold) @@ -79,12 +79,10 @@ Only Windows, MacOS, and Linux are officially supported. It is **NOT** compatibl "PWD_RESULT_HERE/run_bepinex.sh" %command% ``` -4. **RUN THE GAME AT LEAST ONCE** to generate the plugins folder as well as other necessary files. - ### 2. Install WBM 1. [Download](https://github.com/War-Brokers-Mods/WBM/releases/latest) the latest version of WBM. (`WBM.zip` file) -2. Unzip it in the `/BepInEx/plugins` folder. +2. Unzip it in the `/BepInEx/plugins` folder. Create one if it doesn't exist. The folder structure should look like this after unzipping the file: @@ -101,6 +99,8 @@ Only Windows, MacOS, and Linux are officially supported. It is **NOT** compatibl └── other files... ``` +That's it! You can open War Brokers now. + ### 3. Set up OBS (optional) 1. [Download](https://github.com/War-Brokers-Mods/WBM-Overlays/archive/refs/heads/master.zip) the overlays and Unzip it anywhere. (Source code can be found [here](https://github.com/War-Brokers-Mods/WBM-Overlays)) From b517914b45cb7c65982d36ad1140bf9fc8a1744d Mon Sep 17 00:00:00 2001 From: developomp Date: Tue, 8 Mar 2022 13:22:53 +0900 Subject: [PATCH 07/34] updated README - made badges bigger - improved readability in general - moved OBS related information to the WBM-Overlays repository --- README.md | 97 ++++++++++++++++-------------------- images/elo.png | Bin 24500 -> 0 bytes images/obs_source.png | Bin 18182 -> 0 bytes images/obs_source_props.png | Bin 18799 -> 0 bytes 4 files changed, 43 insertions(+), 54 deletions(-) delete mode 100644 images/elo.png delete mode 100644 images/obs_source.png delete mode 100644 images/obs_source_props.png diff --git a/README.md b/README.md index 71d2210..8fe35a2 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ # [War Brokers Mods (WBM)](https://github.com/War-Brokers-Mods/WBM) -![License: MIT](https://img.shields.io/github/license/War-Brokers-Mods/WBM?style=flat-square&color=blue) -[![discord invite](https://img.shields.io/badge/Discord-5865F2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/aQqamSCUcS) +![License: MIT](https://img.shields.io/github/license/War-Brokers-Mods/WBM?style=for-the-badge&color=blue) +[![discord invite](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/aQqamSCUcS) -> **IF YOU USE THIS TO DEVELOP HACKS YOUR MOM IS GAY.** +

+ IF YOU USE THIS TO DEVELOP HACKS YOUR MOM IS GAY. +

WBM logo

-**W**ar **B**rokers **M**ods, AKA **WBM** is a unofficial mod for [War Brokers](https://store.steampowered.com/app/750470).
+**W**ar **B**rokers **M**ods, AKA **WBM** is a mod for [War Brokers](https://store.steampowered.com/app/750470).
Example Images (click to unfold) @@ -22,38 +24,38 @@ ## Installation -Only Windows, MacOS, and Linux are officially supported. It is **NOT** compatible with browsers. +Only Windows, MacOS, and Linux are officially supported. It does **NOT** work on browsers. Usage of the [WBM Installer](https://github.com/War-Brokers-Mods/WBM-installer/releases) is recommended.
-Manual Installation Instruction (click to unfold) +Manual Installation Instruction (not recommended) (click to unfold) ### 1. Install BepInEx -1. Download the latest version of BepInEx **version 5** from [here](https://github.com/BepInEx/BepInEx/releases). It is important that you download the right version. +1. Download the latest version of [BepInEx](https://github.com/BepInEx/BepInEx/releases) **version 5**. | Platform | Filename | | ------------: | :---------------------------- | | Linux & MacOS | BepInEx\_**unix_5**.Y.Z.W.zip | | Windows | BepInEx\_**x86_5**.Y.Z.W.zip | -2. Extract (Unzip) the content**S** to where the game is installed. +2. Extract all the contents to where the game is installed. How to find game location:
![how to find game location](./images/local_files.png) - The folder structure should look like this after unzipping the file: + Now the folder structure should look like this: ``` WarBrokers/ ├── BepInEx/ │ ├── core/ - │ └── other files... - └── other files... + │ └── ... + └── ... ``` -3. **If you are using Linux or MacOS**, you must also perform the following setup: +3. **If you are using Linux or MacOS:** 1. make `run_bepinex.sh` executable: `chmod u+x run_bepinex.sh` 2. Add launch option @@ -82,7 +84,7 @@ Usage of the [WBM Installer](https://github.com/War-Brokers-Mods/WBM-installer/r ### 2. Install WBM 1. [Download](https://github.com/War-Brokers-Mods/WBM/releases/latest) the latest version of WBM. (`WBM.zip` file) -2. Unzip it in the `/BepInEx/plugins` folder. Create one if it doesn't exist. +2. Unzip it in the `/BepInEx/plugins` folder. Create one if it doesn't exist. The folder structure should look like this after unzipping the file: @@ -92,26 +94,15 @@ Usage of the [WBM Installer](https://github.com/War-Brokers-Mods/WBM-installer/r │ ├── plugins/ │ │ └── WBM │ │ ├── assets/ - │ │ ├── other files... - │ │ └── WBM.dll + │ │ ├── WBM.dll + │ │ └── ... │ ├── core/ - │ └── other files... - └── other files... + │ └── ... + └── ... ``` That's it! You can open War Brokers now. -### 3. Set up OBS (optional) - -1. [Download](https://github.com/War-Brokers-Mods/WBM-Overlays/archive/refs/heads/master.zip) the overlays and Unzip it anywhere. (Source code can be found [here](https://github.com/War-Brokers-Mods/WBM-Overlays)) -2. Create a new browser source in OBS studio. - - ![OBS source](./images/obs_source.png) - -3. Check the `Local file` checkbox and use a `.html` file of the overlay you want to use. Width and height of the overlays can be found [here](#obs-overlays). - - ![OBS source property](./images/obs_source_props.png) - ### Updating Simply go through the installation process again and replace existing files. You don't have to reinstall BepInEx to reinstall WBM. @@ -122,13 +113,14 @@ Simply go through the installation process again and replace existing files. You ### Warning -The order of keystroke matters. -For example, pressing RShift+A is different from pressing A+RShift. This is to prevent situation where RShift+A fires when the user intended to press LCtrl+RShift+A. +The order of keystroke matters.
+For example, pressing RShift+A is different from pressing A+RShift.
+This is to prevent situation where RShift+A fires when the user intended to press LCtrl+RShift+A. ### Default shortcuts - Hold down LCtrl or RShift to show shortcuts in-game. -- Press F1 to show menu. Click outside the menu to close. +- Press F1 to show menu. Click outside the menu to close it. | Function | Default Shortcut | | ------------------------------------------ | --------------------------------------------------- | @@ -211,11 +203,7 @@ For example, pressing RShift+A is different from pressing - 50 kill streak: ["godlike"](./assets/audio/godlike.wav) - 69 kill streak: ["nice"](./assets/audio/nice.wav) -### OBS overlays - -- kills and games Elo (size: 355x140) - -![Elo overlay](./images/elo.png) +### [OBS overlays](https://github.com/War-Brokers-Mods/WBM-Overlays) ### Etc @@ -228,7 +216,7 @@ For example, pressing RShift+A is different from pressing WBM is not a hack. WBM will not include any features that will give unfair advantages. -These features include but not limited to: +These features include but are not limited to: extended minimap zoom, quick weapon swap, instant zoom, extended field of view, audio filter, etc. WBM will not include any custom skins. @@ -238,46 +226,47 @@ and WBM will not include any feature that will affect it. ## Building If you are a casual user, this is completely unnecessary. -**This is only recommended for developers.** +**This is only intended for developers.**
Building instructions (click to unfold) +
+ +The guide is intentionally left incomplete. +To prevent any regular developers from using this mod to develop hacks, +I won't provide any help when it comes to building the mod from scratch. + +This guide is only useful to people who's already familiar with reverse engineering, +and can create hacks on their own anyway. + > Assumes that working directory is project root. 1. Install .NET sdk. -2. Clone this repository. -3. Copy all DLL files from `/war_brokers_Data/Managed/` and `/BepInEx/core` to `WBM/dll/`. Create directory if it does not exist. -4. Download [BepInEx configuration manager v16](https://github.com/BepInEx/BepInEx.ConfigurationManager/releases) and put the dll file in `WBM/dll` directory. Other file(s) in the zip file can be deleted. -5. Create `scripts/config.sh`. +2. Copy all DLL files from `/war_brokers_Data/Managed/` and `/BepInEx/core` to `WBM/dll/`. Create directory if it does not exist. +3. Download and unzip [BepInEx configuration manager v16](https://github.com/BepInEx/BepInEx.ConfigurationManager/releases) then copy the dll file to the `WBM/dll` directory. +4. Create `scripts/config.sh`. This will be used to quickly test the mod without having to manually install it. ```bash #!/bin/bash - WB_PLUGINS_DIR="" + WB_PLUGINS_DIR="" ``` -6. Now you can run the scripts. +5. Now you can run the scripts. - - `scripts/debug.sh`: Build WBM in debug mode and copy the files to the plugins directory. - - `scripts/release.sh`: Create a zip file that can be uploaded in the gh release section. + - `scripts/debug.sh`: Builds WBM in debug mode and copy the files to the plugins directory. + - `scripts/release.sh`: Creates a zip file that can be uploaded to the gh release section.
## Bug reports / Suggestions -If you have a cool idea that will make WBM better, or if WBM misbehaves in any way (no matter how minor the problem is), feel free go to the [Issues page](https://github.com/War-Brokers-Mods/WBM/issues) and open a new issue! - -## Contributing - -- use the github pull request. -- use vscode and install [recommended extensions](.vscode/extensions.json). This is required for code formatting. +If you have a cool idea that will make WBM better, or if WBM misbehaves in any way (no matter how minor the problem is), feel free go to the [Issues page](https://github.com/War-Brokers-Mods/WBM/issues) and open a new issue! Alternatively, you can report the bug in my [discord server](https://discord.gg/aQqamSCUcS). ## Special thanks -- [inorganik](https://github.com/inorganik) for [countUp.js](https://github.com/inorganik/countUp.js) - [l3lackShark](https://github.com/l3lackShark) for [inspiration](https://github.com/l3lackShark/gosumemory) -- [jassper0](https://github.com/jassper0) for [Elo overlay design](https://github.com/l3lackShark/static/tree/master/Simplistic) ## License diff --git a/images/elo.png b/images/elo.png deleted file mode 100644 index e915d1015c8dd44a920e723ccf2a8802a69eb207..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24500 zcmYhi1yEaE*ex8SP@EPk4h4!!f#MJ-rL@rE?oM%cFHp3&776a|9z3|aTW}372|w@m ze|PSk%$&)bIWuSPNB6VVI$;WO(m0r8m;e9(=li!WN&os8nxWn_N{8WO@l#xk#~oauk7(VdbLw}NZoOaS2DEgCC?w(1;8HNkl{Ojv({~6ZucPLcpPwe*Tr!7 zPS6JMxtQ8-T=O~|eq2%bgA7(%y!Ymm9h(HVhW@r;M18Xo=G3hJxAL$RM0*b{r1l=2 z_>8?J|IM&@q6b5mtz(=^(>Pq1xC0`PyE0#ru&_nQDG}!rOc24Vsl+f8sr@A`{;ng* z9<+RVX;viS@rvVbfI)yZ;(8c<`WtvJWbWzs<@XW0k2@ws?kueaSswz*jrn%0)Yg;W z>E;>%@nI=bkZ8B4u&#Q%2zo~*R>eR9=yn;pMc2<}E7fXa`Yxia`2$~O!wDZp@b0ZK z2JQDU!lGIj6EiLgzRI>y?8h(@OXaRN50qT2ALFmwl0kswlmZ z)Rl@aF=N-Nw{X*R9Qxp<1AM9Yc2eooCR;^(jLHqD7@+E(qC zBbhq$W2+ggp41Kl-z24}OlKy)f;!C$ih0JlkF0Aen@sZaSu1M}Elba;0^*h}j>cM# zTb57J%P0j8_6G~oJ(mv7RJ~NMLn^^VTJEasYch*2(00oyl8jGR79Fm}+Tf&iwGn>IZ3oqO>KZr3YtJ+n z)3DcCPp;&q<1pSk z&S^eTsLTn`Y;-$WQh~(EG$jE$PVME;Ic*QFbw2*ch_Xk)X z=}W8%w6@`NZ6ni2ncGv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(h{Tp8ImhHrfxkpX`Oh^~&dQB9R z=0D~j6&Z6~E)s^i=cN2@u<%DVlh1UrDyZmaKhvkL$?15+8%T+idhmDikKG$jMS5dg zwe3bYm~SWKh)rb?6%o#SFsvjJu&f1uW4UcW04_M5ocJwPH>m`#&8lqnX-9JreFXZ;v; zPJ7#Rq)~4e_%)v;2#zL{!+Xh}%RfQDW!nh2BqXAv8&km)eOYBZ-~|T-NVgK-xxQlt7)wMk9i*`n|)^3?*7~ zt!NCRos6nN#c9uLo7c1deiDTykWJJH!0!_p!F7cOZl^QDp}fS`wTAn+bg3PxSb*>` z0N5!qo0w+zjXQ2@q;OvJz43g{U?5{D`KsZm*SjNZjkDD;%tcPF_@|}>(K7Fa<`CoP zGL`zDLV6_LkxhDpet-rWtpxCYOXSa(MH44|@jx?xnduvrq18mg$B2?A5!^QG>0<79i&AhD+=Ilv|(DF;;BbKm-2c|OG3=W(4 zBM`<0VyJN}`rQvr#19Y1i_I`d5eoi@1_b(G8j$cfer8jLtG2JZK1prqL~=Up(ZFHS zL0Bg3t`$S|n@az+Z+!%5 zj*P1a^TUAv86e0&%4)Dmp`6|V1}V9NZ>wnf66<8en{?94VvPtVn+E^ba_MpU9?FFz zW-fBLj-ssLPwju5LL^0&qID`&Yx}Cj&pB2xc*J_l;4n5%seiau8&7)iKlasuc`B%l z1DsJ(0Vy=yzq4`|%O5Y}5*Lu5i^3F^EnKQozJzWEg$s)Va2+s%O{^BkO$$|kONLZy zuj+z0i~_(V#ti<`!7W$~V0G;58D9#TL2_UK1}x)&%S%BX5%2=e_XJ!DzYFFt0K=8x zL&-{z$t{zBAwKe~DVV<|+P2|zDL4!|99D3gVCEOCyb5k;G6L6Uv2z4W2Z!PcjvWDe o_LzrET^$EXLIRCvgn!gu*qCpyl=bBq;Q2NTp00i_>zopr07()l`Tzg` diff --git a/images/obs_source_props.png b/images/obs_source_props.png deleted file mode 100644 index b91f4bed2efe149da4873d5b312900d4c6f2c505..0000000000000000000000000000000000000000 GI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6JJ?Aobx`jyQgeMeJ87}=FS%n zi@d9^>{)igYRc8ylT^LZN=0>$+_I_H!L9D7fc+HVCzDQJT@b?anRAL>aMWMmP_^GT zrXYJkTconZo#W5n>-TS60uKGMM;SHmVmz&SM71u{0J>$1M|<_DDY}d2i%c@?g0)J4 z Date: Thu, 10 Mar 2022 14:59:21 +0900 Subject: [PATCH 08/34] added more words to vscode workspace dictionary --- .vscode/settings.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 72e2a38..7171c91 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,13 @@ { - "cSpell.words": ["Behaviour", "Prefs", "headshot", "leaderboard", "wbm"], + "cSpell.words": [ + "Behaviour", + "developomp", + "headshot", + "leaderboard", + "Prefs", + "wbm" + ], + "editor.formatOnSave": true, "editor.formatOnPaste": true, From 4c10c59b3bc09a629edb84c34c722064d459b8fc Mon Sep 17 00:00:00 2001 From: developomp Date: Thu, 10 Mar 2022 15:14:48 +0900 Subject: [PATCH 09/34] code formatting update - applied new code formatting - code splitting on `WBM.cs` --- WBM/Data.cs | 148 +++++------ WBM/Patches.cs | 54 ++-- WBM/PrefNames.cs | 26 +- WBM/Util.cs | 106 ++++---- WBM/WBM.cs | 511 ++++++++++++++++++------------------ WBM/WBMVariable.cs | 604 +++++++++++++++++++++---------------------- WBM/WSJSONService.cs | 6 +- 7 files changed, 735 insertions(+), 720 deletions(-) diff --git a/WBM/Data.cs b/WBM/Data.cs index d1c37fc..7fe2e2e 100644 --- a/WBM/Data.cs +++ b/WBM/Data.cs @@ -2,84 +2,84 @@ using System.Runtime.Serialization; namespace WBM { - public class Data - { - public enum TeamEnum - { - None, - Red, - Blue - } + public class Data + { + public enum TeamEnum + { + None, + Red, + Blue + } - private enum QuestTypeEnum - { - Kill, - Damage, - Package, - Missile, - Capture, - Play, - Travel, - Assist, - Finish - } + private enum QuestTypeEnum + { + Kill, + Damage, + Package, + Missile, + Capture, + Play, + Travel, + Assist, + Finish + } - public struct PlayerStatsStruct - { - public int kills; - public int deaths; - public int damage; - public int longestKill; - public int points; - public int headShots; - public int vote; - public int mapVote; - public int gamesElo; - public int gamesEloDelta; - public int killsElo; - public int killsEloDelta; - } + public struct PlayerStatsStruct + { + public int kills; + public int deaths; + public int damage; + public int longestKill; + public int points; + public int headShots; + public int vote; + public int mapVote; + public int gamesElo; + public int gamesEloDelta; + public int killsElo; + public int killsEloDelta; + } - public enum GameModeEnum - { - DeathMatch, - DemolitionDerby, - ProtectLeader, - ResourceCapture, - Race, - TankBattle, - TankKing, - CapturePoint, - VehicleEscort, - PackageDrop, - ScudLaunch, - BattleRoyale, - Competitive, - LobbyCompetitive, - LobbyBR, - Count - } + public enum GameModeEnum + { + DeathMatch, + DemolitionDerby, + ProtectLeader, + ResourceCapture, + Race, + TankBattle, + TankKing, + CapturePoint, + VehicleEscort, + PackageDrop, + ScudLaunch, + BattleRoyale, + Competitive, + LobbyCompetitive, + LobbyBR, + Count + } - public enum GameStateEnum - { - WaitingOnPlayers, - Countdown, - GameInProgress, - Results - } + public enum GameStateEnum + { + WaitingOnPlayers, + Countdown, + GameInProgress, + Results + } - [DataContract] - public class SerializableData - { - // game version - // gamemode - // teammate list - // team rank (array of player index) + [DataContract] + public class SerializableData + { + // game version + // gamemode + // teammate list + // team rank (array of player index) - [DataMember] public int localPlayerIndex = -1; - [DataMember] public string[] nickList = new string[] { }; - [DataMember] public PlayerStatsStruct[] playerStatsArray = new PlayerStatsStruct[] { }; - [DataMember] public Data.GameStateEnum gameState; - } - } + [DataMember] public int localPlayerIndex = -1; + [DataMember] public string[] nickList = new string[] { }; + [DataMember] public PlayerStatsStruct[] playerStatsArray = new PlayerStatsStruct[] { }; + [DataMember] public Data.GameStateEnum gameState; + } + } } diff --git a/WBM/Patches.cs b/WBM/Patches.cs index 945b0c6..4bdfd8b 100644 --- a/WBM/Patches.cs +++ b/WBM/Patches.cs @@ -5,36 +5,36 @@ using UnityEngine.UI; namespace WBM { - [HarmonyPatch(typeof(webguy))] - [HarmonyPatch("FHBMKCDMGII")] - class FPSSliderPatch - { - private static int defaultTargetFrameRate = -1; - private static int maxTargetFrameRate = 1000; + [HarmonyPatch(typeof(webguy))] + [HarmonyPatch("FHBMKCDMGII")] + class FPSSliderPatch + { + private static int defaultTargetFrameRate = -1; + private static int maxTargetFrameRate = 1000; - private static GameObject fpsSliderTextObj = GameObject.Find("fpsSlideFuckText"); - private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); - private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess("CLLNACDIPHE"); + private static GameObject fpsSliderTextObj = GameObject.Find("fpsSlideFuckText"); + private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); + private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess("CLLNACDIPHE"); - static bool Prefix(webguy __instance, float JKNNNLEEIAO) - { - fpsValueRef(__instance) = JKNNNLEEIAO; - int targetFrameRate = (int)(JKNNNLEEIAO * maxTargetFrameRate); + static bool Prefix(webguy __instance, float JKNNNLEEIAO) + { + fpsValueRef(__instance) = JKNNNLEEIAO; + int targetFrameRate = (int)(JKNNNLEEIAO * maxTargetFrameRate); - if (targetFrameRate == 0) - { - ((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, __instance.HNDAMJPNGAE("Disabled")); - targetFrameRate = defaultTargetFrameRate; - } - else - { - ((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, targetFrameRate.ToString()); - } + if (targetFrameRate == 0) + { + ((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, __instance.HNDAMJPNGAE("Disabled")); + targetFrameRate = defaultTargetFrameRate; + } + else + { + ((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, targetFrameRate.ToString()); + } - if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; + if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; - Application.targetFrameRate = targetFrameRate; - return false; - } - } + Application.targetFrameRate = targetFrameRate; + return false; + } + } } diff --git a/WBM/PrefNames.cs b/WBM/PrefNames.cs index 1f57e46..b4d8e40 100644 --- a/WBM/PrefNames.cs +++ b/WBM/PrefNames.cs @@ -1,16 +1,16 @@ namespace WBM { - class PrefNames - { - public const string showSquadServer = "showSquadServer"; - public const string showTestingServer = "showTestingServer"; - public const string GUIOffsetX = "GUIOffsetX"; - public const string GUIOffsetY = "GUIOffsetY"; - public const string showGUI = "showGUI"; - public const string showPlayerStats = "showPlayerStats"; - public const string showWeaponStats = "showWeaponStats"; - public const string showTeammateStats = "showTeammateStats"; - public const string showElo = "showElo"; - public const string shiftToCrouch = "shiftToCrouch"; - } + class PrefNames + { + public const string showSquadServer = "showSquadServer"; + public const string showTestingServer = "showTestingServer"; + public const string GUIOffsetX = "GUIOffsetX"; + public const string GUIOffsetY = "GUIOffsetY"; + public const string showGUI = "showGUI"; + public const string showPlayerStats = "showPlayerStats"; + public const string showWeaponStats = "showWeaponStats"; + public const string showTeammateStats = "showTeammateStats"; + public const string showElo = "showElo"; + public const string shiftToCrouch = "shiftToCrouch"; + } } diff --git a/WBM/Util.cs b/WBM/Util.cs index 510cdde..f1f4809 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -9,70 +9,70 @@ using System.Runtime.Serialization.Json; namespace WBM { - public class Util - { - public async static Task fetchAudioClip(string where) - { - using (UnityWebRequest uwr = UnityWebRequestMultimedia.GetAudioClip("file://" + where, AudioType.WAV)) - { - uwr.SendWebRequest(); + public class Util + { + public async static Task fetchAudioClip(string where) + { + using (UnityWebRequest uwr = UnityWebRequestMultimedia.GetAudioClip("file://" + where, AudioType.WAV)) + { + uwr.SendWebRequest(); - while (!uwr.isDone) await Task.Delay(10); + while (!uwr.isDone) await Task.Delay(10); - return DownloadHandlerAudioClip.GetContent(uwr); - } - } + return DownloadHandlerAudioClip.GetContent(uwr); + } + } - public static string data2JSON(Data.SerializableData data) - { - MemoryStream stream = new MemoryStream(); - DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Data.SerializableData)); + public static string data2JSON(Data.SerializableData data) + { + MemoryStream stream = new MemoryStream(); + DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Data.SerializableData)); - serializer.WriteObject(stream, data); - byte[] json = stream.ToArray(); - stream.Close(); + serializer.WriteObject(stream, data); + byte[] json = stream.ToArray(); + stream.Close(); - return Encoding.UTF8.GetString(json, 0, json.Length); - } + return Encoding.UTF8.GetString(json, 0, json.Length); + } - public static string formatKDR(int kills, int deaths) - { - return deaths == 0 ? "inf" : formatDecimal((float)kills / deaths); - } + public static string formatKDR(int kills, int deaths) + { + return deaths == 0 ? "inf" : formatDecimal((float)kills / deaths); + } - public static string formatDecimal(float number) - { - return String.Format("{0:0.0}", number); - } + public static string formatDecimal(float number) + { + return String.Format("{0:0.0}", number); + } - public static float getGunZoom(NGNJNHEFLHB gun) - { - return gun.ADLGCCMDNED; - } + public static float getGunZoom(NGNJNHEFLHB gun) + { + return gun.ADLGCCMDNED; + } - public static float getGunFireTimer(NGNJNHEFLHB gun) - { - return gun.MAKBOBOAAHG; - } + public static float getGunFireTimer(NGNJNHEFLHB gun) + { + return gun.MAKBOBOAAHG; + } - public static float getGunFireVelocity(NGNJNHEFLHB gun) - { - return gun.HOIKHOJJBOG; - } + public static float getGunFireVelocity(NGNJNHEFLHB gun) + { + return gun.HOIKHOJJBOG; + } - public static float getGunFireRate(NGNJNHEFLHB gun) - { - return gun.IHEEIAIOABG; - } + public static float getGunFireRate(NGNJNHEFLHB gun) + { + return gun.IHEEIAIOABG; + } - public static float getGunReloadTimer(NGNJNHEFLHB gun) - { - return gun.NBLDKJAKFIB; - } + public static float getGunReloadTimer(NGNJNHEFLHB gun) + { + return gun.NBLDKJAKFIB; + } - public static float getGunCooldownTimer(NGNJNHEFLHB gun) - { - return gun.LBOBALHJBDM; - } - } + public static float getGunCooldownTimer(NGNJNHEFLHB gun) + { + return gun.LBOBALHJBDM; + } + } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index c59875d..fe1eb9c 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -10,189 +10,130 @@ using System.IO; namespace WBM { - [BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.7.1.0")] - public partial class WBM : BaseUnityPlugin - { - private void Awake() - { - this.harmony = new Harmony("com.developomp.wbm"); - this.harmony.PatchAll(); - } + [BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.7.1.0")] + public partial class WBM : BaseUnityPlugin + { + private void Awake() + { + this.harmony = new Harmony("com.developomp.wbm"); + this.harmony.PatchAll(); + } - private async void Start() - { - Logger.LogDebug("Initializing"); + private async void Start() + { + Logger.LogDebug("Initializing"); - this.webguy = FindObjectOfType(); + this.webguy = FindObjectOfType(); - System.Type webguyType = typeof(webguy); + System.Type webguyType = typeof(webguy); - this.showEloOnLeaderboardRef = webguyType.GetField("KDOBENAOLLF", bindFlags); - this.showSquadServerRef = webguyType.GetField("PHPIBBCFKFI", bindFlags); - this.showTestingServerRef = webguyType.GetField("LHHEGFHLNJE", bindFlags); - this.playerStatsArrayRef = webguyType.GetField("NAFCGDLLFJC", bindFlags); - this.currentAreaRef = webguyType.GetField("FLJLJNLDFAM", bindFlags); - this.teamListRef = webguyType.GetField("MNEJLPDLMBH", bindFlags); - this.localPlayerIndexRef = webguyType.GetField("ALEJJPEPFOG", bindFlags); - this.personGunRef = webguyType.GetField("IEGLIMLBDPH", bindFlags); - this.nickListRef = webguyType.GetField("CLLDJOMEKIP", bindFlags); - this.gameStateRef = webguyType.GetField("MCGMEPGBCKK", bindFlags); - this.chatListRef = webguyType.GetField("MOOBJBOCANE", bindFlags); + this.fetchReferences(webguyType); + this.setupConfiguration(); - this.addMessageFuncRef = webguyType.GetMethod("NBPKLIOLLEI", bindFlags); - this.clearMessagesFuncRef = webguyType.GetMethod("IOCHBBACKFA", bindFlags); - this.drawChatMessageFuncRef = webguyType.GetMethod("EBDKFEJMEMB", bindFlags); + // + // Audio + // - this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags); - this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags); - this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags); - // Configurations - this.showGUI = Config.Bind("Config", "show GUI", true); - this.showGUIShortcut = Config.Bind("Hotkeys", "show GUI Shortcut", new KeyboardShortcut(KeyCode.A, KeyCode.RightShift)); + this.killStreakAudioSource = this.gameObject.AddComponent(); - this.GUIOffsetX = Config.Bind("Config", "GUI Horizontal position", 38, new ConfigDescription("WBM GUI Horizontal position", new AcceptableValueRange(0, Screen.width))); - this.GUIOffsetY = Config.Bind("Config", "GUI Vertical position", 325, new ConfigDescription("WBM GUI Vertical position", new AcceptableValueRange(0, Screen.height))); - this.resetGUIShortcut = Config.Bind("Hotkeys", "reset GUI position", new KeyboardShortcut(KeyCode.R, KeyCode.LeftControl)); + if (!Directory.Exists(this.audioPath)) + { + Logger.LogError($"Directory {this.audioPath} does not exist. Aborting!"); + GameObject.Destroy(this); + } - this.shiftToCrouch = Config.Bind("Config", "shift to crouch", true); - this.shiftToCrouchShortcut = Config.Bind("Hotkeys", "shift to crouch", new KeyboardShortcut(KeyCode.C, KeyCode.RightShift)); + foreach (string fileName in Directory.GetFiles(this.audioPath)) + { + Logger.LogDebug("Loading AudioClip " + Path.GetFileNameWithoutExtension(fileName)); - this.killStreakSFX = Config.Bind("Config", "kill streak sound effect", true); - this.killStreakSFXShortcut = Config.Bind("Hotkeys", "kill streak sound effect", new KeyboardShortcut(KeyCode.F, KeyCode.RightShift)); + this.AudioDict.Add( + Path.GetFileNameWithoutExtension(fileName), + await Util.fetchAudioClip(Path.Combine(this.audioPath, fileName)) + ); + } - this.showPlayerStats = Config.Bind("Config", "show player statistics", true); - this.showPlayerStatsShortcut = Config.Bind("Hotkeys", "show player statistics", new KeyboardShortcut(KeyCode.P, KeyCode.RightShift)); + this.oldGunSound = this.oldGunSoundRaw; + this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; + this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; - this.showWeaponStats = Config.Bind("Config", "show weapon statistics", true); - this.showWeaponStatsShortcut = Config.Bind("Hotkeys", "show weapon statistics", new KeyboardShortcut(KeyCode.W, KeyCode.RightShift)); - this.showTeamStats = Config.Bind("Config", "show team statistics", true); - this.showTeamStatsShortcut = Config.Bind("Hotkeys", "show team statistics", new KeyboardShortcut(KeyCode.L, KeyCode.RightShift)); + // + // Websocket + // - this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true); - this.showEloOnLeaderboard.SettingChanged += this.showEloOnLeaderboardChanged; - this.showEloOnLeaderboardShortcut = Config.Bind("Hotkeys", "show Elo on leaderboard", new KeyboardShortcut(KeyCode.E, KeyCode.RightShift)); - this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; + server = new WebSocketSharp.Server.WebSocketServer($"ws://127.0.0.1:{this.serverPort}"); + server.AddWebSocketService("/json"); + server.Start(); - this.showSquadServer = Config.Bind("Config", "show squad server", true); - this.showSquadServer.SettingChanged += this.showSquadServerChanged; - this.showSquadServerShortcut = Config.Bind("Hotkeys", "show squad server", new KeyboardShortcut(KeyCode.S, KeyCode.RightShift)); - this.showSquadServerRaw = this.showSquadServer.Value; + StartCoroutine(UpdateValuesFunction()); - this.showTestingServer = Config.Bind("Config", "show testing server", true); - this.showTestingServer.SettingChanged += this.showTestingServerChanged; - this.showTestingServerShortcut = Config.Bind("Hotkeys", "show testing server", new KeyboardShortcut(KeyCode.T, KeyCode.RightShift)); - this.showTestingServerRaw = this.showTestingServer.Value; + Logger.LogDebug("Ready!"); + } - this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift)); - this.clearDeathLogShortcut = Config.Bind("Hotkeys", "clear messages", new KeyboardShortcut(KeyCode.X, KeyCode.RightShift)); + private void Update() + { + // Move UI + if (Input.GetKey(KeyCode.LeftControl)) + { + // move GUI + if (Input.GetKey(KeyCode.LeftShift)) + { + if (Input.GetKey(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; + if (Input.GetKey(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; + if (Input.GetKey(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; + if (Input.GetKey(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; + } + else + { + if (Input.GetKeyDown(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; + if (Input.GetKeyDown(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; + if (Input.GetKeyDown(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; + if (Input.GetKeyDown(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; + } + } - this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); - this.useOldGunSoundConf.SettingChanged += this.useOldGunSoundChanged; + // reset GUI position + if (this.resetGUIShortcut.Value.IsDown()) + { + this.GUIOffsetX.Value = (int)this.GUIOffsetX.DefaultValue; + this.GUIOffsetY.Value = (int)this.GUIOffsetY.DefaultValue; + } - // Audio + if (this.showGUIShortcut.Value.IsDown()) this.showGUI.Value = !this.showGUI.Value; + if (this.shiftToCrouchShortcut.Value.IsDown()) this.shiftToCrouch.Value = !this.shiftToCrouch.Value; + if (this.killStreakSFXShortcut.Value.IsDown()) this.killStreakSFX.Value = !this.killStreakSFX.Value; + if (this.showPlayerStatsShortcut.Value.IsDown()) this.showPlayerStats.Value = !this.showPlayerStats.Value; + if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; + if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; + if (this.showEloOnLeaderboardShortcut.Value.IsDown()) this.showEloOnLeaderboard.Value = !this.showEloOnLeaderboard.Value; + if (this.showSquadServerShortcut.Value.IsDown()) this.showSquadServer.Value = !this.showSquadServer.Value; + if (this.showTestingServerShortcut.Value.IsDown()) this.showTestingServer.Value = !this.showTestingServer.Value; + if (this.clearChatShortcut.Value.IsDown()) this.clearChat(); + if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); - this.killStreakAudioSource = this.gameObject.AddComponent(); + // config visibility + if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightShift)) this._showConfig = true; + if (!Input.GetKey(KeyCode.LeftControl) && !Input.GetKey(KeyCode.RightShift)) this._showConfig = false; - if (!Directory.Exists(this.audioPath)) - { - Logger.LogError($"Directory {this.audioPath} does not exist. Aborting!"); - GameObject.Destroy(this); - } + // only if right buttton is not held + if (this.shiftToCrouch.Value && !Input.GetMouseButton(1)) + { + if (Input.GetKeyDown(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = true; + if (Input.GetKeyUp(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = false; + } + } - foreach (string fileName in Directory.GetFiles(this.audioPath)) - { - Logger.LogDebug("Loading AudioClip " + Path.GetFileNameWithoutExtension(fileName)); + private void OnGUI() + { + GUI.skin.box.fontSize = 15; + GUI.skin.label.fontSize = 15; + GUI.skin.label.wordWrap = false; - this.AudioDict.Add( - Path.GetFileNameWithoutExtension(fileName), - await Util.fetchAudioClip(Path.Combine(this.audioPath, fileName)) - ); - } - - this.oldGunSound = this.oldGunSoundRaw; - this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; - this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; - - // Websocket - - server = new WebSocketSharp.Server.WebSocketServer($"ws://127.0.0.1:{this.serverPort}"); - server.AddWebSocketService("/json"); - server.Start(); - - StartCoroutine(UpdateValuesFunction()); - - // Final tasks - - this.useOldGunSoundChanged(new object(), new EventArgs()); - - Logger.LogDebug("Ready!"); - } - - private void Update() - { - // Move UI - if (Input.GetKey(KeyCode.LeftControl)) - { - // move GUI - if (Input.GetKey(KeyCode.LeftShift)) - { - if (Input.GetKey(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; - if (Input.GetKey(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; - if (Input.GetKey(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; - if (Input.GetKey(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; - } - else - { - if (Input.GetKeyDown(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; - if (Input.GetKeyDown(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; - if (Input.GetKeyDown(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; - if (Input.GetKeyDown(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; - } - } - - // reset GUI position - if (this.resetGUIShortcut.Value.IsDown()) - { - this.GUIOffsetX.Value = (int)this.GUIOffsetX.DefaultValue; - this.GUIOffsetY.Value = (int)this.GUIOffsetY.DefaultValue; - } - - if (this.showGUIShortcut.Value.IsDown()) this.showGUI.Value = !this.showGUI.Value; - if (this.shiftToCrouchShortcut.Value.IsDown()) this.shiftToCrouch.Value = !this.shiftToCrouch.Value; - if (this.killStreakSFXShortcut.Value.IsDown()) this.killStreakSFX.Value = !this.killStreakSFX.Value; - if (this.showPlayerStatsShortcut.Value.IsDown()) this.showPlayerStats.Value = !this.showPlayerStats.Value; - if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; - if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; - if (this.showEloOnLeaderboardShortcut.Value.IsDown()) this.showEloOnLeaderboard.Value = !this.showEloOnLeaderboard.Value; - if (this.showSquadServerShortcut.Value.IsDown()) this.showSquadServer.Value = !this.showSquadServer.Value; - if (this.showTestingServerShortcut.Value.IsDown()) this.showTestingServer.Value = !this.showTestingServer.Value; - if (this.clearChatShortcut.Value.IsDown()) this.clearChat(); - if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); - - // config visibility - if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightShift)) this._showConfig = true; - if (!Input.GetKey(KeyCode.LeftControl) && !Input.GetKey(KeyCode.RightShift)) this._showConfig = false; - - // only if right buttton is not held - if (this.shiftToCrouch.Value && !Input.GetMouseButton(1)) - { - if (Input.GetKeyDown(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = true; - if (Input.GetKeyUp(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = false; - } - } - - private void OnGUI() - { - GUI.skin.box.fontSize = 15; - GUI.skin.label.fontSize = 15; - GUI.skin.label.wordWrap = false; - - if (this._showConfig) - { - GUI.Box( - new Rect(Screen.width - 370, 60, 360, 370), $@"Configuration + if (this._showConfig) + { + GUI.Box( + new Rect(Screen.width - 370, 60, 360, 370), $@"Configuration move GUI: LCtrl+LShift+Arrow move GUI by pixel: LCtrl+Arrow @@ -211,30 +152,30 @@ show squad server: {this.showSquadServer.Value} ({this.showSquadServerShortcut.V show testing server: {this.showTestingServer.Value} ({this.showTestingServerShortcut.Value}) shift to crouch: {this.shiftToCrouch.Value} ({this.shiftToCrouchShortcut.Value}) kill streak SFX: {this.killStreakSFX.Value} ({this.killStreakSFXShortcut.Value})" - ); - } + ); + } - if (!this.showGUI.Value) return; + if (!this.showGUI.Value) return; - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60), - @"War Brokers Mods + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60), + @"War Brokers Mods Made by [LP] POMP v1.7.1.0" - ); + ); - if (this.data.localPlayerIndex >= 0) - { - if (this.showPlayerStats.Value) - { - try - { - string killsEloDeltaSign = this.myPlayerStats.killsEloDelta >= 0 ? "+" : ""; - string gamesEloDeltaSign = this.myPlayerStats.gamesEloDelta >= 0 ? "+" : ""; + if (this.data.localPlayerIndex >= 0) + { + if (this.showPlayerStats.Value) + { + try + { + string killsEloDeltaSign = this.myPlayerStats.killsEloDelta >= 0 ? "+" : ""; + string gamesEloDeltaSign = this.myPlayerStats.gamesEloDelta >= 0 ? "+" : ""; - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 65, 220, 180), - $@"Player stats + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 65, 220, 180), + $@"Player stats KDR: {Util.formatKDR(this.myPlayerStats.kills, this.myPlayerStats.deaths)} kills Elo: {this.myPlayerStats.killsElo} {killsEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.killsEloDelta / 10)} @@ -244,91 +185,165 @@ Longest Kill: {this.myPlayerStats.longestKill}m Points: {this.myPlayerStats.points} Headshots: {this.myPlayerStats.headShots} Kill streak: {this.killStreak}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } - if (this.showWeaponStats.Value) - { - try - { - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 250, 230, 130), - $@"Weapon stats + if (this.showWeaponStats.Value) + { + try + { + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 250, 230, 130), + $@"Weapon stats fire Timer: {String.Format("{0:0.00}", Util.getGunFireTimer(this.personGun))}s (max: {String.Format("{0:0.00}", Util.getGunFireRate(this.personGun))}s) reload Timer: {Util.getGunReloadTimer(this.personGun)} cooldown Timer: {Util.getGunCooldownTimer(this.personGun)} speed: {Util.getGunFireVelocity(this.personGun)} zoom: {Util.getGunZoom(this.personGun)}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } - if (this.showTeamStats.Value) - { - try - { - string teamNames = "Nickname\n\n"; - string teamKDR = "KDR\n\n"; - string teamPoints = "pts\n\n"; - string teamDamage = "Damage\n\n"; + if (this.showTeamStats.Value) + { + try + { + string teamNames = "Nickname\n\n"; + string teamKDR = "KDR\n\n"; + string teamPoints = "pts\n\n"; + string teamDamage = "Damage\n\n"; - int teamTotalKills = 0; - int teamTotalDeaths = 0; - int teamTotalDamage = 0; + int teamTotalKills = 0; + int teamTotalDeaths = 0; + int teamTotalDamage = 0; - for (int i = 0; i < this.data.playerStatsArray.Length; i++) - { - Data.PlayerStatsStruct stat = this.data.playerStatsArray[i]; + for (int i = 0; i < this.data.playerStatsArray.Length; i++) + { + Data.PlayerStatsStruct stat = this.data.playerStatsArray[i]; - // if player is not a bot and if player is in my team - if ((stat.killsElo != 0) && (this.teamList[i] == this.myTeam)) - { - teamNames += $"{this.data.nickList[i]}\n"; - teamKDR += $"{Util.formatKDR(stat.kills, stat.deaths)}\n"; - teamPoints += $"{stat.points}\n"; - teamDamage += $"{stat.damage}\n"; + // if player is not a bot and if player is in my team + if ((stat.killsElo != 0) && (this.teamList[i] == this.myTeam)) + { + teamNames += $"{this.data.nickList[i]}\n"; + teamKDR += $"{Util.formatKDR(stat.kills, stat.deaths)}\n"; + teamPoints += $"{stat.points}\n"; + teamDamage += $"{stat.damage}\n"; - teamTotalKills += stat.kills; - teamTotalDeaths += stat.deaths; - teamTotalDamage += stat.damage; - } - } + teamTotalKills += stat.kills; + teamTotalDeaths += stat.deaths; + teamTotalDamage += stat.damage; + } + } - int teamStatOffset = (this.data.gameState == Data.GameStateEnum.Results) ? 280 : 0; - GUI.Box(new Rect(Screen.width - 320, 445 + teamStatOffset, 300, 270), "Team Stats"); - GUI.Label(new Rect(Screen.width - 315, 470 + teamStatOffset, 105, 190), teamNames); - GUI.Label(new Rect(Screen.width - 200, 470 + teamStatOffset, 40, 190), teamKDR); - GUI.Label(new Rect(Screen.width - 150, 470 + teamStatOffset, 40, 190), teamPoints); - GUI.Label(new Rect(Screen.width - 100, 470 + teamStatOffset, 70, 190), teamDamage); + int teamStatOffset = (this.data.gameState == Data.GameStateEnum.Results) ? 280 : 0; + GUI.Box(new Rect(Screen.width - 320, 445 + teamStatOffset, 300, 270), "Team Stats"); + GUI.Label(new Rect(Screen.width - 315, 470 + teamStatOffset, 105, 190), teamNames); + GUI.Label(new Rect(Screen.width - 200, 470 + teamStatOffset, 40, 190), teamKDR); + GUI.Label(new Rect(Screen.width - 150, 470 + teamStatOffset, 40, 190), teamPoints); + GUI.Label(new Rect(Screen.width - 100, 470 + teamStatOffset, 70, 190), teamDamage); - GUI.Label( - new Rect(Screen.width - 315, 655 + teamStatOffset, 300, 55), - $@"total damage: {teamTotalDamage} + GUI.Label( + new Rect(Screen.width - 315, 655 + teamStatOffset, 300, 55), + $@"total damage: {teamTotalDamage} total deaths: {teamTotalDeaths} total kills: {teamTotalKills}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } - } - } + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } + } + } - private void onDestroy() - { - this.server.Stop(); - } - } + private void onDestroy() + { + this.server.Stop(); + } + + // + // + // + + private void fetchReferences(System.Type webguyType) + { + this.showEloOnLeaderboardRef = webguyType.GetField("KDOBENAOLLF", bindFlags); + this.showSquadServerRef = webguyType.GetField("PHPIBBCFKFI", bindFlags); + this.showTestingServerRef = webguyType.GetField("LHHEGFHLNJE", bindFlags); + this.playerStatsArrayRef = webguyType.GetField("NAFCGDLLFJC", bindFlags); + this.currentAreaRef = webguyType.GetField("FLJLJNLDFAM", bindFlags); + this.teamListRef = webguyType.GetField("MNEJLPDLMBH", bindFlags); + this.localPlayerIndexRef = webguyType.GetField("ALEJJPEPFOG", bindFlags); + this.personGunRef = webguyType.GetField("IEGLIMLBDPH", bindFlags); + this.nickListRef = webguyType.GetField("CLLDJOMEKIP", bindFlags); + this.gameStateRef = webguyType.GetField("MCGMEPGBCKK", bindFlags); + this.chatListRef = webguyType.GetField("MOOBJBOCANE", bindFlags); + + this.addMessageFuncRef = webguyType.GetMethod("NBPKLIOLLEI", bindFlags); + this.clearMessagesFuncRef = webguyType.GetMethod("IOCHBBACKFA", bindFlags); + this.drawChatMessageFuncRef = webguyType.GetMethod("EBDKFEJMEMB", bindFlags); + + this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags); + this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags); + this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags); + } + + private void setupConfiguration() + { + this.showGUI = Config.Bind("Config", "show GUI", true); + this.showGUIShortcut = Config.Bind("Hotkeys", "show GUI Shortcut", new KeyboardShortcut(KeyCode.A, KeyCode.RightShift)); + + this.GUIOffsetX = Config.Bind("Config", "GUI Horizontal position", 38, new ConfigDescription("WBM GUI Horizontal position", new AcceptableValueRange(0, Screen.width))); + this.GUIOffsetY = Config.Bind("Config", "GUI Vertical position", 325, new ConfigDescription("WBM GUI Vertical position", new AcceptableValueRange(0, Screen.height))); + this.resetGUIShortcut = Config.Bind("Hotkeys", "reset GUI position", new KeyboardShortcut(KeyCode.R, KeyCode.LeftControl)); + + this.shiftToCrouch = Config.Bind("Config", "shift to crouch", true); + this.shiftToCrouchShortcut = Config.Bind("Hotkeys", "shift to crouch", new KeyboardShortcut(KeyCode.C, KeyCode.RightShift)); + + this.killStreakSFX = Config.Bind("Config", "kill streak sound effect", true); + this.killStreakSFXShortcut = Config.Bind("Hotkeys", "kill streak sound effect", new KeyboardShortcut(KeyCode.F, KeyCode.RightShift)); + + this.showPlayerStats = Config.Bind("Config", "show player statistics", true); + this.showPlayerStatsShortcut = Config.Bind("Hotkeys", "show player statistics", new KeyboardShortcut(KeyCode.P, KeyCode.RightShift)); + + this.showWeaponStats = Config.Bind("Config", "show weapon statistics", true); + this.showWeaponStatsShortcut = Config.Bind("Hotkeys", "show weapon statistics", new KeyboardShortcut(KeyCode.W, KeyCode.RightShift)); + + this.showTeamStats = Config.Bind("Config", "show team statistics", true); + this.showTeamStatsShortcut = Config.Bind("Hotkeys", "show team statistics", new KeyboardShortcut(KeyCode.L, KeyCode.RightShift)); + + this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true); + this.showEloOnLeaderboard.SettingChanged += this.showEloOnLeaderboardChanged; + this.showEloOnLeaderboardShortcut = Config.Bind("Hotkeys", "show Elo on leaderboard", new KeyboardShortcut(KeyCode.E, KeyCode.RightShift)); + this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; + + this.showSquadServer = Config.Bind("Config", "show squad server", true); + this.showSquadServer.SettingChanged += this.showSquadServerChanged; + this.showSquadServerShortcut = Config.Bind("Hotkeys", "show squad server", new KeyboardShortcut(KeyCode.S, KeyCode.RightShift)); + this.showSquadServerRaw = this.showSquadServer.Value; + + this.showTestingServer = Config.Bind("Config", "show testing server", true); + this.showTestingServer.SettingChanged += this.showTestingServerChanged; + this.showTestingServerShortcut = Config.Bind("Hotkeys", "show testing server", new KeyboardShortcut(KeyCode.T, KeyCode.RightShift)); + this.showTestingServerRaw = this.showTestingServer.Value; + + this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift)); + this.clearDeathLogShortcut = Config.Bind("Hotkeys", "clear messages", new KeyboardShortcut(KeyCode.X, KeyCode.RightShift)); + + this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); + this.useOldGunSoundConf.SettingChanged += this.useOldGunSoundChanged; + this.useOldGunSoundChanged(new object(), new EventArgs()); + } + } } diff --git a/WBM/WBMVariable.cs b/WBM/WBMVariable.cs index 96416e7..e3fd3bd 100644 --- a/WBM/WBMVariable.cs +++ b/WBM/WBMVariable.cs @@ -12,349 +12,349 @@ using System.Collections.Generic; namespace WBM { - public partial class WBM - { - // important boy - private webguy webguy; - private Harmony harmony; - private IEnumerator UpdateValues; + public partial class WBM + { + // important boy + private webguy webguy; + private Harmony harmony; + private IEnumerator UpdateValues; - // websocket data stuff - private WebSocketSharp.Server.WebSocketServer server; - private ushort serverPort = 24601; - private Data.SerializableData data = new Data.SerializableData(); + // websocket data stuff + private WebSocketSharp.Server.WebSocketServer server; + private ushort serverPort = 24601; + private Data.SerializableData data = new Data.SerializableData(); - // internal or temporary - private bool _showConfig; + // internal or temporary + private bool _showConfig; - // Configurations - private ConfigEntry showGUI; - private ConfigEntry showGUIShortcut; + // Configurations + private ConfigEntry showGUI; + private ConfigEntry showGUIShortcut; - private ConfigEntry GUIOffsetX; - private ConfigEntry GUIOffsetY; - private ConfigEntry resetGUIShortcut; + private ConfigEntry GUIOffsetX; + private ConfigEntry GUIOffsetY; + private ConfigEntry resetGUIShortcut; - private ConfigEntry shiftToCrouch; - private ConfigEntry shiftToCrouchShortcut; + private ConfigEntry shiftToCrouch; + private ConfigEntry shiftToCrouchShortcut; - private ConfigEntry killStreakSFX; - private ConfigEntry killStreakSFXShortcut; + private ConfigEntry killStreakSFX; + private ConfigEntry killStreakSFXShortcut; - private ConfigEntry showPlayerStats; - private ConfigEntry showPlayerStatsShortcut; - private ConfigEntry showWeaponStats; - private ConfigEntry showWeaponStatsShortcut; - private ConfigEntry showTeamStats; - private ConfigEntry showTeamStatsShortcut; + private ConfigEntry showPlayerStats; + private ConfigEntry showPlayerStatsShortcut; + private ConfigEntry showWeaponStats; + private ConfigEntry showWeaponStatsShortcut; + private ConfigEntry showTeamStats; + private ConfigEntry showTeamStatsShortcut; - private ConfigEntry showEloOnLeaderboard; - private void showEloOnLeaderboardChanged(object sender, EventArgs e) - { - this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; - } - private ConfigEntry showEloOnLeaderboardShortcut; + private ConfigEntry showEloOnLeaderboard; + private void showEloOnLeaderboardChanged(object sender, EventArgs e) + { + this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; + } + private ConfigEntry showEloOnLeaderboardShortcut; - private ConfigEntry showSquadServer; - private void showSquadServerChanged(object sender, EventArgs e) - { - this.showSquadServerRaw = this.showSquadServer.Value; - } - private ConfigEntry showSquadServerShortcut; + private ConfigEntry showSquadServer; + private void showSquadServerChanged(object sender, EventArgs e) + { + this.showSquadServerRaw = this.showSquadServer.Value; + } + private ConfigEntry showSquadServerShortcut; - private ConfigEntry showTestingServer; - private void showTestingServerChanged(object sender, EventArgs e) - { - this.showTestingServerRaw = this.showTestingServer.Value; - } - private ConfigEntry showTestingServerShortcut; + private ConfigEntry showTestingServer; + private void showTestingServerChanged(object sender, EventArgs e) + { + this.showTestingServerRaw = this.showTestingServer.Value; + } + private ConfigEntry showTestingServerShortcut; - private ConfigEntry clearChatShortcut; - private ConfigEntry clearDeathLogShortcut; + private ConfigEntry clearChatShortcut; + private ConfigEntry clearDeathLogShortcut; - private ConfigEntry useOldGunSoundConf; - private void useOldGunSoundChanged(object sender, EventArgs e) - { - if (this.useOldGunSoundConf.Value) - { - this.AKSoundRaw.ADCOCHNNCHM = this.oldGunSound; - this.SMGSoundRaw.ADCOCHNNCHM = this.oldGunSound; - } - else - { - this.AKSoundRaw.ADCOCHNNCHM = this.newAKSound; - this.SMGSoundRaw.ADCOCHNNCHM = this.newSMGSound; - } - } + private ConfigEntry useOldGunSoundConf; + private void useOldGunSoundChanged(object sender, EventArgs e) + { + if (this.useOldGunSoundConf.Value) + { + this.AKSoundRaw.ADCOCHNNCHM = this.oldGunSound; + this.SMGSoundRaw.ADCOCHNNCHM = this.oldGunSound; + } + else + { + this.AKSoundRaw.ADCOCHNNCHM = this.newAKSound; + this.SMGSoundRaw.ADCOCHNNCHM = this.newSMGSound; + } + } - // Audio - private AudioClip oldGunSound; - private AudioClip newAKSound; - private AudioClip newSMGSound; + // Audio + private AudioClip oldGunSound; + private AudioClip newAKSound; + private AudioClip newSMGSound; - private Dictionary AudioDict = new Dictionary(); - private string audioPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "assets/audio"); - private AudioSource killStreakAudioSource; - private Dictionary killStreakSFXDictionary = new Dictionary() - { - {10, "rampage"}, - {20, "killing spree"}, - {30, "unstoppable"}, - {50, "godlike"}, - {69, "nice"}, - }; + private Dictionary AudioDict = new Dictionary(); + private string audioPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "assets/audio"); + private AudioSource killStreakAudioSource; + private Dictionary killStreakSFXDictionary = new Dictionary() + { + {10, "rampage"}, + {20, "killing spree"}, + {30, "unstoppable"}, + {50, "godlike"}, + {69, "nice"}, + }; - // memory stuff - private static BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; + // memory stuff + private static BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; - private FieldInfo showEloOnLeaderboardRef; - private bool showEloOnLeaderboardRaw - { - get - { - return (bool)this.showEloOnLeaderboardRef.GetValue(this.webguy); - } - set - { - this.showEloOnLeaderboardRef.SetValue(this.webguy, value); - } - } + private FieldInfo showEloOnLeaderboardRef; + private bool showEloOnLeaderboardRaw + { + get + { + return (bool)this.showEloOnLeaderboardRef.GetValue(this.webguy); + } + set + { + this.showEloOnLeaderboardRef.SetValue(this.webguy, value); + } + } - private FieldInfo showSquadServerRef; - private bool showSquadServerRaw - { - get - { - return (bool)this.showSquadServerRef.GetValue(this.webguy); - } - set - { - this.showSquadServerRef.SetValue(this.webguy, value); - } - } + private FieldInfo showSquadServerRef; + private bool showSquadServerRaw + { + get + { + return (bool)this.showSquadServerRef.GetValue(this.webguy); + } + set + { + this.showSquadServerRef.SetValue(this.webguy, value); + } + } - private FieldInfo showTestingServerRef; - private bool showTestingServerRaw - { - get - { - return (bool)this.showTestingServerRef.GetValue(this.webguy); - } - set - { - this.showTestingServerRef.SetValue(this.webguy, value); - } - } + private FieldInfo showTestingServerRef; + private bool showTestingServerRaw + { + get + { + return (bool)this.showTestingServerRef.GetValue(this.webguy); + } + set + { + this.showTestingServerRef.SetValue(this.webguy, value); + } + } - private FieldInfo playerStatsArrayRef; - private Data.PlayerStatsStruct[] playerStatsArrayRaw - { - get - { - PDEMAFHPNBD[] rawPlayerStatsArray = (PDEMAFHPNBD[])this.playerStatsArrayRef.GetValue(this.webguy); - Data.PlayerStatsStruct[] result = new Data.PlayerStatsStruct[rawPlayerStatsArray.Length]; + private FieldInfo playerStatsArrayRef; + private Data.PlayerStatsStruct[] playerStatsArrayRaw + { + get + { + PDEMAFHPNBD[] rawPlayerStatsArray = (PDEMAFHPNBD[])this.playerStatsArrayRef.GetValue(this.webguy); + Data.PlayerStatsStruct[] result = new Data.PlayerStatsStruct[rawPlayerStatsArray.Length]; - for (int i = 0; i < rawPlayerStatsArray.Length; i++) - { - PDEMAFHPNBD currentlyParsing = rawPlayerStatsArray[i]; + for (int i = 0; i < rawPlayerStatsArray.Length; i++) + { + PDEMAFHPNBD currentlyParsing = rawPlayerStatsArray[i]; - result[i] = new Data.PlayerStatsStruct - { - kills = currentlyParsing.CFMGCOGACPA, - deaths = currentlyParsing.GABHLIIJHBJ, - damage = currentlyParsing.CECNBFABADA, - longestKill = currentlyParsing.GDFIBEEKMJA, - points = currentlyParsing.HNHFAABONHO, - headShots = currentlyParsing.GJLLOFLEHHD, - vote = currentlyParsing.JCBAKMONPGC, - mapVote = currentlyParsing.BOFANBBCNOH, - gamesElo = currentlyParsing.IBHFIBAOKCB, - gamesEloDelta = currentlyParsing.JMGOHGIGLPI, - killsElo = currentlyParsing.GBIABKEEFOC, - killsEloDelta = currentlyParsing.JAAKOCPIGJL, - }; - } + result[i] = new Data.PlayerStatsStruct + { + kills = currentlyParsing.CFMGCOGACPA, + deaths = currentlyParsing.GABHLIIJHBJ, + damage = currentlyParsing.CECNBFABADA, + longestKill = currentlyParsing.GDFIBEEKMJA, + points = currentlyParsing.HNHFAABONHO, + headShots = currentlyParsing.GJLLOFLEHHD, + vote = currentlyParsing.JCBAKMONPGC, + mapVote = currentlyParsing.BOFANBBCNOH, + gamesElo = currentlyParsing.IBHFIBAOKCB, + gamesEloDelta = currentlyParsing.JMGOHGIGLPI, + killsElo = currentlyParsing.GBIABKEEFOC, + killsEloDelta = currentlyParsing.JAAKOCPIGJL, + }; + } - return result; - } - } - private Data.PlayerStatsStruct myPlayerStats; - private int prevDeaths = 0; - private int prevKills = 0; - private int killCountBeforeDeath = 0; - private int killStreak = 0; + return result; + } + } + private Data.PlayerStatsStruct myPlayerStats; + private int prevDeaths = 0; + private int prevKills = 0; + private int killCountBeforeDeath = 0; + private int killStreak = 0; - private FieldInfo currentAreaRef; - private int currentAreaRaw - { - get - { - return (int)this.currentAreaRef.GetValue(this.webguy); - } - } + private FieldInfo currentAreaRef; + private int currentAreaRaw + { + get + { + return (int)this.currentAreaRef.GetValue(this.webguy); + } + } - private FieldInfo teamListRef; - private Data.TeamEnum[] teamListRaw - { - get - { - return (Data.TeamEnum[])this.teamListRef.GetValue(this.webguy); - } - } - private Data.TeamEnum[] teamList; - private Data.TeamEnum myTeam; + private FieldInfo teamListRef; + private Data.TeamEnum[] teamListRaw + { + get + { + return (Data.TeamEnum[])this.teamListRef.GetValue(this.webguy); + } + } + private Data.TeamEnum[] teamList; + private Data.TeamEnum myTeam; - private FieldInfo localPlayerIndexRef; - private int localPlayerIndexRaw - { - get - { - return (int)this.localPlayerIndexRef.GetValue(this.webguy); - } - } + private FieldInfo localPlayerIndexRef; + private int localPlayerIndexRaw + { + get + { + return (int)this.localPlayerIndexRef.GetValue(this.webguy); + } + } - private FieldInfo personGunRef; - private NGNJNHEFLHB personGunRaw - { - get - { - return (NGNJNHEFLHB)this.personGunRef.GetValue(this.webguy); - } - } - private NGNJNHEFLHB personGun; + private FieldInfo personGunRef; + private NGNJNHEFLHB personGunRaw + { + get + { + return (NGNJNHEFLHB)this.personGunRef.GetValue(this.webguy); + } + } + private NGNJNHEFLHB personGun; - private FieldInfo nickListRef; - private string[] nickListRaw - { - get - { - return (string[])this.nickListRef.GetValue(this.webguy); - } - } + private FieldInfo nickListRef; + private string[] nickListRaw + { + get + { + return (string[])this.nickListRef.GetValue(this.webguy); + } + } - private FieldInfo gameStateRef; - private Data.GameStateEnum gameStateRaw - { - get - { - return (Data.GameStateEnum)this.gameStateRef.GetValue(this.webguy); - } - } + private FieldInfo gameStateRef; + private Data.GameStateEnum gameStateRaw + { + get + { + return (Data.GameStateEnum)this.gameStateRef.GetValue(this.webguy); + } + } - private FieldInfo chatListRef; - private string[] chatListRaw - { - get - { - return (string[])this.chatListRef.GetValue(this.webguy); - } - set - { - this.chatListRef.SetValue(this.webguy, value); - } - } + private FieldInfo chatListRef; + private string[] chatListRaw + { + get + { + return (string[])this.chatListRef.GetValue(this.webguy); + } + set + { + this.chatListRef.SetValue(this.webguy, value); + } + } - private FieldInfo oldGunSoundRef; - private AudioClip oldGunSoundRaw - { - get - { - return ((LPJKBALIFCC)this.oldGunSoundRef.GetValue(this.webguy)).ADCOCHNNCHM; - } - } + private FieldInfo oldGunSoundRef; + private AudioClip oldGunSoundRaw + { + get + { + return ((LPJKBALIFCC)this.oldGunSoundRef.GetValue(this.webguy)).ADCOCHNNCHM; + } + } - private FieldInfo AKSoundRef; - private LPJKBALIFCC AKSoundRaw - { - get - { - return (LPJKBALIFCC)this.AKSoundRef.GetValue(this.webguy); - } - set - { - this.AKSoundRef.SetValue(this.webguy, value); - } - } + private FieldInfo AKSoundRef; + private LPJKBALIFCC AKSoundRaw + { + get + { + return (LPJKBALIFCC)this.AKSoundRef.GetValue(this.webguy); + } + set + { + this.AKSoundRef.SetValue(this.webguy, value); + } + } - private FieldInfo SMGSoundRef; - private LPJKBALIFCC SMGSoundRaw - { - get - { - return (LPJKBALIFCC)this.SMGSoundRef.GetValue(this.webguy); - } - set - { - this.SMGSoundRef.SetValue(this.webguy, value); - } - } + private FieldInfo SMGSoundRef; + private LPJKBALIFCC SMGSoundRaw + { + get + { + return (LPJKBALIFCC)this.SMGSoundRef.GetValue(this.webguy); + } + set + { + this.SMGSoundRef.SetValue(this.webguy, value); + } + } - // Methods - private MethodInfo addMessageFuncRef; - private MethodInfo clearMessagesFuncRef; - private MethodInfo drawChatMessageFuncRef; + // Methods + private MethodInfo addMessageFuncRef; + private MethodInfo clearMessagesFuncRef; + private MethodInfo drawChatMessageFuncRef; - private IEnumerator UpdateValuesFunction() - { - try - { - this.data.localPlayerIndex = this.localPlayerIndexRaw; + private IEnumerator UpdateValuesFunction() + { + try + { + this.data.localPlayerIndex = this.localPlayerIndexRaw; - if (this.data.localPlayerIndex >= 0) - { - this.data.playerStatsArray = this.playerStatsArrayRaw; - this.myPlayerStats = this.data.playerStatsArray[this.data.localPlayerIndex]; - this.teamList = this.teamListRaw; - this.myTeam = this.teamList[this.data.localPlayerIndex]; - this.personGun = this.personGunRaw; - this.data.nickList = this.nickListRaw; - this.data.gameState = this.gameStateRaw; + if (this.data.localPlayerIndex >= 0) + { + this.data.playerStatsArray = this.playerStatsArrayRaw; + this.myPlayerStats = this.data.playerStatsArray[this.data.localPlayerIndex]; + this.teamList = this.teamListRaw; + this.myTeam = this.teamList[this.data.localPlayerIndex]; + this.personGun = this.personGunRaw; + this.data.nickList = this.nickListRaw; + this.data.gameState = this.gameStateRaw; - // check if deaths has changed since the last value update - if (this.prevDeaths == this.myPlayerStats.deaths) - { - this.killStreak = this.myPlayerStats.kills - this.killCountBeforeDeath; + // check if deaths has changed since the last value update + if (this.prevDeaths == this.myPlayerStats.deaths) + { + this.killStreak = this.myPlayerStats.kills - this.killCountBeforeDeath; - if (this.prevKills != this.myPlayerStats.kills) - { - if (this.killStreakSFX.Value && this.killStreakSFXDictionary.ContainsKey(this.killStreak)) - { - this.killStreakAudioSource.clip = this.AudioDict[this.killStreakSFXDictionary[this.killStreak]]; - this.killStreakAudioSource.Play(); + if (this.prevKills != this.myPlayerStats.kills) + { + if (this.killStreakSFX.Value && this.killStreakSFXDictionary.ContainsKey(this.killStreak)) + { + this.killStreakAudioSource.clip = this.AudioDict[this.killStreakSFXDictionary[this.killStreak]]; + this.killStreakAudioSource.Play(); - this.addMessageFuncRef.Invoke(this.webguy, new object[] { $"You are on a {this.killStreak} kill streak", -1 }); - } - } - } - else - { - // reset kill streak when death count changes + this.addMessageFuncRef.Invoke(this.webguy, new object[] { $"You are on a {this.killStreak} kill streak", -1 }); + } + } + } + else + { + // reset kill streak when death count changes - this.killCountBeforeDeath = this.myPlayerStats.kills; - this.prevDeaths = this.myPlayerStats.deaths; - this.killStreak = 0; - } - this.prevKills = this.myPlayerStats.kills; - } + this.killCountBeforeDeath = this.myPlayerStats.kills; + this.prevDeaths = this.myPlayerStats.deaths; + this.killStreak = 0; + } + this.prevKills = this.myPlayerStats.kills; + } - this.server.WebSocketServices["/json"].Sessions.Broadcast(Util.data2JSON(data)); - } - catch (Exception e) - { - Logger.LogError(e); - } + this.server.WebSocketServices["/json"].Sessions.Broadcast(Util.data2JSON(data)); + } + catch (Exception e) + { + Logger.LogError(e); + } - yield return new WaitForSeconds(0.1f); + yield return new WaitForSeconds(0.1f); - this.UpdateValues = UpdateValuesFunction(); - StartCoroutine(this.UpdateValues); - } + this.UpdateValues = UpdateValuesFunction(); + StartCoroutine(this.UpdateValues); + } - private void clearChat() - { - Logger.LogDebug($"clear1 {chatListRaw.Length}"); - for (int i = 0; i < this.chatListRaw.Length; i++) this.chatListRaw[i] = string.Empty; - this.drawChatMessageFuncRef.Invoke(this.webguy, new object[] { "" }); - } - } + private void clearChat() + { + Logger.LogDebug($"clear1 {chatListRaw.Length}"); + for (int i = 0; i < this.chatListRaw.Length; i++) this.chatListRaw[i] = string.Empty; + this.drawChatMessageFuncRef.Invoke(this.webguy, new object[] { "" }); + } + } } diff --git a/WBM/WSJSONService.cs b/WBM/WSJSONService.cs index c58bd28..ee2817a 100644 --- a/WBM/WSJSONService.cs +++ b/WBM/WSJSONService.cs @@ -1,6 +1,6 @@ namespace WBM { - public class WSJSONService : WebSocketSharp.Server.WebSocketBehavior - { - } + public class WSJSONService : WebSocketSharp.Server.WebSocketBehavior + { + } } From 4dc04d25da0546ecc342edea088601b6a4c4a5c6 Mon Sep 17 00:00:00 2001 From: developomp Date: Thu, 10 Mar 2022 15:54:45 +0900 Subject: [PATCH 10/34] code splitting for key presses --- WBM/KeyPressHandlers.cs | 110 ++++++++++++++++++++++++++++++++++++++++ WBM/WBM.cs | 68 ++++++------------------- 2 files changed, 126 insertions(+), 52 deletions(-) create mode 100644 WBM/KeyPressHandlers.cs diff --git a/WBM/KeyPressHandlers.cs b/WBM/KeyPressHandlers.cs new file mode 100644 index 0000000..0832741 --- /dev/null +++ b/WBM/KeyPressHandlers.cs @@ -0,0 +1,110 @@ +using UnityEngine; + + +namespace WBM +{ + public partial class WBM + { + private void moveUIOnKeyPress() + { + if (Input.GetKey(KeyCode.LeftControl)) + { + // move GUI + if (Input.GetKey(KeyCode.LeftShift)) + { + if (Input.GetKey(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; + if (Input.GetKey(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; + if (Input.GetKey(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; + if (Input.GetKey(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; + } + else + { + if (Input.GetKeyDown(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; + if (Input.GetKeyDown(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; + if (Input.GetKeyDown(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; + if (Input.GetKeyDown(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; + } + } + } + + private void resetUIOnKeyPress() + { + if (this.resetGUIShortcut.Value.IsDown()) + { + this.GUIOffsetX.Value = (int)this.GUIOffsetX.DefaultValue; + this.GUIOffsetY.Value = (int)this.GUIOffsetY.DefaultValue; + } + } + + private void toggleUIOnKeyPress() + { + if (this.showGUIShortcut.Value.IsDown()) this.showGUI.Value = !this.showGUI.Value; + } + + private void toggleShiftToCrouchOnKeyPress() + { + if (this.shiftToCrouchShortcut.Value.IsDown()) this.shiftToCrouch.Value = !this.shiftToCrouch.Value; + } + + private void toggleKillStreakSFXOnKeyPress() + { + if (this.killStreakSFXShortcut.Value.IsDown()) this.killStreakSFX.Value = !this.killStreakSFX.Value; + } + + private void togglePlayerStatsOnKeyPress() + { + if (this.showPlayerStatsShortcut.Value.IsDown()) this.showPlayerStats.Value = !this.showPlayerStats.Value; + } + + private void toggleWeaponStatsOnKeyPress() + { + if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; + } + + private void toggleTeamStatsOnKeyPress() + { + if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; + } + + private void toggleLeaderboardEloOnKeyPress() + { + if (this.showEloOnLeaderboardShortcut.Value.IsDown()) this.showEloOnLeaderboard.Value = !this.showEloOnLeaderboard.Value; + } + + private void toggleSquadServerOnKeyPress() + { + if (this.showSquadServerShortcut.Value.IsDown()) this.showSquadServer.Value = !this.showSquadServer.Value; + } + + private void toggleTestingServerOnKeyPress() + { + if (this.showTestingServerShortcut.Value.IsDown()) this.showTestingServer.Value = !this.showTestingServer.Value; + } + + private void clearChatOnKeyPress() + { + if (this.clearChatShortcut.Value.IsDown()) this.clearChat(); + } + + private void clearDeathLogOnKeyPress() + { + if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); + } + + private void showConfigOnKeyPress() + { + if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightShift)) this._showConfig = true; + if (!Input.GetKey(KeyCode.LeftControl) && !Input.GetKey(KeyCode.RightShift)) this._showConfig = false; + } + + private void crouchOnKeyPress() + { + // only if right buttton is not held + if (this.shiftToCrouch.Value && !Input.GetMouseButton(1)) + { + if (Input.GetKeyDown(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = true; + if (Input.GetKeyUp(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = false; + } + } + } +} diff --git a/WBM/WBM.cs b/WBM/WBM.cs index fe1eb9c..75bf64b 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -34,7 +34,6 @@ namespace WBM // Audio // - this.killStreakAudioSource = this.gameObject.AddComponent(); if (!Directory.Exists(this.audioPath)) @@ -57,7 +56,6 @@ namespace WBM this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; - // // Websocket // @@ -73,55 +71,21 @@ namespace WBM private void Update() { - // Move UI - if (Input.GetKey(KeyCode.LeftControl)) - { - // move GUI - if (Input.GetKey(KeyCode.LeftShift)) - { - if (Input.GetKey(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; - if (Input.GetKey(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; - if (Input.GetKey(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; - if (Input.GetKey(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; - } - else - { - if (Input.GetKeyDown(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; - if (Input.GetKeyDown(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; - if (Input.GetKeyDown(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; - if (Input.GetKeyDown(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; - } - } - - // reset GUI position - if (this.resetGUIShortcut.Value.IsDown()) - { - this.GUIOffsetX.Value = (int)this.GUIOffsetX.DefaultValue; - this.GUIOffsetY.Value = (int)this.GUIOffsetY.DefaultValue; - } - - if (this.showGUIShortcut.Value.IsDown()) this.showGUI.Value = !this.showGUI.Value; - if (this.shiftToCrouchShortcut.Value.IsDown()) this.shiftToCrouch.Value = !this.shiftToCrouch.Value; - if (this.killStreakSFXShortcut.Value.IsDown()) this.killStreakSFX.Value = !this.killStreakSFX.Value; - if (this.showPlayerStatsShortcut.Value.IsDown()) this.showPlayerStats.Value = !this.showPlayerStats.Value; - if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; - if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; - if (this.showEloOnLeaderboardShortcut.Value.IsDown()) this.showEloOnLeaderboard.Value = !this.showEloOnLeaderboard.Value; - if (this.showSquadServerShortcut.Value.IsDown()) this.showSquadServer.Value = !this.showSquadServer.Value; - if (this.showTestingServerShortcut.Value.IsDown()) this.showTestingServer.Value = !this.showTestingServer.Value; - if (this.clearChatShortcut.Value.IsDown()) this.clearChat(); - if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); - - // config visibility - if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightShift)) this._showConfig = true; - if (!Input.GetKey(KeyCode.LeftControl) && !Input.GetKey(KeyCode.RightShift)) this._showConfig = false; - - // only if right buttton is not held - if (this.shiftToCrouch.Value && !Input.GetMouseButton(1)) - { - if (Input.GetKeyDown(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = true; - if (Input.GetKeyUp(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = false; - } + this.moveUIOnKeyPress(); + this.resetUIOnKeyPress(); + this.toggleUIOnKeyPress(); + this.toggleShiftToCrouchOnKeyPress(); + this.toggleKillStreakSFXOnKeyPress(); + this.togglePlayerStatsOnKeyPress(); + this.toggleWeaponStatsOnKeyPress(); + this.toggleTeamStatsOnKeyPress(); + this.toggleLeaderboardEloOnKeyPress(); + this.toggleSquadServerOnKeyPress(); + this.toggleTestingServerOnKeyPress(); + this.clearChatOnKeyPress(); + this.clearDeathLogOnKeyPress(); + this.showConfigOnKeyPress(); + this.crouchOnKeyPress(); } private void OnGUI() @@ -273,7 +237,7 @@ total kills: {teamTotalKills}" } // - // + // setup functions // private void fetchReferences(System.Type webguyType) From 3fd5113d2077eeca8cdaa3fd29030a533661f84e Mon Sep 17 00:00:00 2001 From: developomp Date: Thu, 10 Mar 2022 15:57:01 +0900 Subject: [PATCH 11/34] simplified `Update` function --- WBM/KeyPressHandlers.cs | 18 ++++++++++++++++++ WBM/WBM.cs | 16 +--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/WBM/KeyPressHandlers.cs b/WBM/KeyPressHandlers.cs index 0832741..715167d 100644 --- a/WBM/KeyPressHandlers.cs +++ b/WBM/KeyPressHandlers.cs @@ -5,6 +5,24 @@ namespace WBM { public partial class WBM { + private void handleKeyPresses() + { + this.moveUIOnKeyPress(); + this.resetUIOnKeyPress(); + this.toggleUIOnKeyPress(); + this.toggleShiftToCrouchOnKeyPress(); + this.toggleKillStreakSFXOnKeyPress(); + this.togglePlayerStatsOnKeyPress(); + this.toggleWeaponStatsOnKeyPress(); + this.toggleTeamStatsOnKeyPress(); + this.toggleLeaderboardEloOnKeyPress(); + this.toggleSquadServerOnKeyPress(); + this.toggleTestingServerOnKeyPress(); + this.clearChatOnKeyPress(); + this.clearDeathLogOnKeyPress(); + this.showConfigOnKeyPress(); + this.crouchOnKeyPress(); + } private void moveUIOnKeyPress() { if (Input.GetKey(KeyCode.LeftControl)) diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 75bf64b..417ae44 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -71,21 +71,7 @@ namespace WBM private void Update() { - this.moveUIOnKeyPress(); - this.resetUIOnKeyPress(); - this.toggleUIOnKeyPress(); - this.toggleShiftToCrouchOnKeyPress(); - this.toggleKillStreakSFXOnKeyPress(); - this.togglePlayerStatsOnKeyPress(); - this.toggleWeaponStatsOnKeyPress(); - this.toggleTeamStatsOnKeyPress(); - this.toggleLeaderboardEloOnKeyPress(); - this.toggleSquadServerOnKeyPress(); - this.toggleTestingServerOnKeyPress(); - this.clearChatOnKeyPress(); - this.clearDeathLogOnKeyPress(); - this.showConfigOnKeyPress(); - this.crouchOnKeyPress(); + this.handleKeyPresses(); } private void OnGUI() From 22de1eee4b52c2f7db840bb2d4c86935371bd7f8 Mon Sep 17 00:00:00 2001 From: developomp Date: Thu, 10 Mar 2022 16:30:59 +0900 Subject: [PATCH 12/34] moved UI related code to separate file --- WBM/WBM.cs | 142 +++------------------------------------------ WBM/WBMGUI.cs | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+), 133 deletions(-) create mode 100644 WBM/WBMGUI.cs diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 417ae44..2ba977a 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -76,149 +76,25 @@ namespace WBM private void OnGUI() { - GUI.skin.box.fontSize = 15; - GUI.skin.label.fontSize = 15; - GUI.skin.label.wordWrap = false; + this.setupGUI(); - if (this._showConfig) - { - GUI.Box( - new Rect(Screen.width - 370, 60, 360, 370), $@"Configuration - -move GUI: LCtrl+LShift+Arrow -move GUI by pixel: LCtrl+Arrow -reset GUI position: {this.resetGUIShortcut.Value} -clear chat: {this.clearChatShortcut.Value} -clear death log: {this.clearDeathLogShortcut.Value} - -GUI X offset: {this.GUIOffsetX.Value} -GUI Y offset: {this.GUIOffsetY.Value} -Show WBM GUI: {this.showGUI.Value} ({this.showGUIShortcut.Value}) -Show Elo on leaderboard: {this.showEloOnLeaderboard.Value} ({this.showEloOnLeaderboardShortcut.Value}) -Show player stats: {this.showPlayerStats.Value} ({this.showPlayerStatsShortcut.Value}) -Show weapon stats: {this.showWeaponStats.Value} ({this.showWeaponStatsShortcut.Value}) -Show teammate stats: {this.showTeamStats.Value} ({this.showTeamStatsShortcut.Value}) -show squad server: {this.showSquadServer.Value} ({this.showSquadServerShortcut.Value}) -show testing server: {this.showTestingServer.Value} ({this.showTestingServerShortcut.Value}) -shift to crouch: {this.shiftToCrouch.Value} ({this.shiftToCrouchShortcut.Value}) -kill streak SFX: {this.killStreakSFX.Value} ({this.killStreakSFXShortcut.Value})" - ); - } + if (this._showConfig) this.drawConfig(); if (!this.showGUI.Value) return; - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60), - @"War Brokers Mods -Made by [LP] POMP -v1.7.1.0" - ); + this.drawWBMVersion(); - if (this.data.localPlayerIndex >= 0) - { - if (this.showPlayerStats.Value) - { - try - { - string killsEloDeltaSign = this.myPlayerStats.killsEloDelta >= 0 ? "+" : ""; - string gamesEloDeltaSign = this.myPlayerStats.gamesEloDelta >= 0 ? "+" : ""; + // don't draw if player is not in a games + if (this.data.localPlayerIndex < 0) return; - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 65, 220, 180), - $@"Player stats - -KDR: {Util.formatKDR(this.myPlayerStats.kills, this.myPlayerStats.deaths)} -kills Elo: {this.myPlayerStats.killsElo} {killsEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.killsEloDelta / 10)} -games Elo: {this.myPlayerStats.gamesElo} {gamesEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.gamesEloDelta / 10)} -Damage dealt: {this.myPlayerStats.damage} -Longest Kill: {this.myPlayerStats.longestKill}m -Points: {this.myPlayerStats.points} -Headshots: {this.myPlayerStats.headShots} -Kill streak: {this.killStreak}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } - - if (this.showWeaponStats.Value) - { - try - { - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 250, 230, 130), - $@"Weapon stats - -fire Timer: {String.Format("{0:0.00}", Util.getGunFireTimer(this.personGun))}s (max: {String.Format("{0:0.00}", Util.getGunFireRate(this.personGun))}s) -reload Timer: {Util.getGunReloadTimer(this.personGun)} -cooldown Timer: {Util.getGunCooldownTimer(this.personGun)} -speed: {Util.getGunFireVelocity(this.personGun)} -zoom: {Util.getGunZoom(this.personGun)}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } - - if (this.showTeamStats.Value) - { - try - { - string teamNames = "Nickname\n\n"; - string teamKDR = "KDR\n\n"; - string teamPoints = "pts\n\n"; - string teamDamage = "Damage\n\n"; - - int teamTotalKills = 0; - int teamTotalDeaths = 0; - int teamTotalDamage = 0; - - for (int i = 0; i < this.data.playerStatsArray.Length; i++) - { - Data.PlayerStatsStruct stat = this.data.playerStatsArray[i]; - - // if player is not a bot and if player is in my team - if ((stat.killsElo != 0) && (this.teamList[i] == this.myTeam)) - { - teamNames += $"{this.data.nickList[i]}\n"; - teamKDR += $"{Util.formatKDR(stat.kills, stat.deaths)}\n"; - teamPoints += $"{stat.points}\n"; - teamDamage += $"{stat.damage}\n"; - - teamTotalKills += stat.kills; - teamTotalDeaths += stat.deaths; - teamTotalDamage += stat.damage; - } - } - - int teamStatOffset = (this.data.gameState == Data.GameStateEnum.Results) ? 280 : 0; - GUI.Box(new Rect(Screen.width - 320, 445 + teamStatOffset, 300, 270), "Team Stats"); - GUI.Label(new Rect(Screen.width - 315, 470 + teamStatOffset, 105, 190), teamNames); - GUI.Label(new Rect(Screen.width - 200, 470 + teamStatOffset, 40, 190), teamKDR); - GUI.Label(new Rect(Screen.width - 150, 470 + teamStatOffset, 40, 190), teamPoints); - GUI.Label(new Rect(Screen.width - 100, 470 + teamStatOffset, 70, 190), teamDamage); - - GUI.Label( - new Rect(Screen.width - 315, 655 + teamStatOffset, 300, 55), - $@"total damage: {teamTotalDamage} -total deaths: {teamTotalDeaths} -total kills: {teamTotalKills}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } - } + this.drawPlayerStats(); + this.drawWeaponStats(); + this.drawTeamStats(); } private void onDestroy() { + // properly stop websocket server this.server.Stop(); } diff --git a/WBM/WBMGUI.cs b/WBM/WBMGUI.cs new file mode 100644 index 0000000..b520ec1 --- /dev/null +++ b/WBM/WBMGUI.cs @@ -0,0 +1,158 @@ +using UnityEngine; + +using System; + + +namespace WBM +{ + public partial class WBM + { + private void setupGUI() + { + GUI.skin.box.fontSize = 15; + GUI.skin.label.fontSize = 15; + GUI.skin.label.wordWrap = false; + } + + private void drawConfig() + { + GUI.Box( + new Rect(Screen.width - 370, 60, 360, 370), $@"Configuration + +move GUI: LCtrl+LShift+Arrow +move GUI by pixel: LCtrl+Arrow +reset GUI position: {this.resetGUIShortcut.Value} +clear chat: {this.clearChatShortcut.Value} +clear death log: {this.clearDeathLogShortcut.Value} + +GUI X offset: {this.GUIOffsetX.Value} +GUI Y offset: {this.GUIOffsetY.Value} +Show WBM GUI: {this.showGUI.Value} ({this.showGUIShortcut.Value}) +Show Elo on leaderboard: {this.showEloOnLeaderboard.Value} ({this.showEloOnLeaderboardShortcut.Value}) +Show player stats: {this.showPlayerStats.Value} ({this.showPlayerStatsShortcut.Value}) +Show weapon stats: {this.showWeaponStats.Value} ({this.showWeaponStatsShortcut.Value}) +Show teammate stats: {this.showTeamStats.Value} ({this.showTeamStatsShortcut.Value}) +show squad server: {this.showSquadServer.Value} ({this.showSquadServerShortcut.Value}) +show testing server: {this.showTestingServer.Value} ({this.showTestingServerShortcut.Value}) +shift to crouch: {this.shiftToCrouch.Value} ({this.shiftToCrouchShortcut.Value}) +kill streak SFX: {this.killStreakSFX.Value} ({this.killStreakSFXShortcut.Value})" + ); + } + + private void drawWBMVersion() + { + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60), + @"War Brokers Mods +Made by [LP] POMP +v1.7.1.0" + ); + } + + private void drawPlayerStats() + { + if (!this.showPlayerStats.Value) return; + + try + { + string killsEloDeltaSign = this.myPlayerStats.killsEloDelta >= 0 ? "+" : ""; + string gamesEloDeltaSign = this.myPlayerStats.gamesEloDelta >= 0 ? "+" : ""; + + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 65, 220, 180), + $@"Player stats + +KDR: {Util.formatKDR(this.myPlayerStats.kills, this.myPlayerStats.deaths)} +kills Elo: {this.myPlayerStats.killsElo} {killsEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.killsEloDelta / 10)} +games Elo: {this.myPlayerStats.gamesElo} {gamesEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.gamesEloDelta / 10)} +Damage dealt: {this.myPlayerStats.damage} +Longest Kill: {this.myPlayerStats.longestKill}m +Points: {this.myPlayerStats.points} +Headshots: {this.myPlayerStats.headShots} +Kill streak: {this.killStreak}" + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } + + private void drawWeaponStats() + { + + if (!this.showWeaponStats.Value) return; + + try + { + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 250, 230, 130), + $@"Weapon stats + +fire Timer: {String.Format("{0:0.00}", Util.getGunFireTimer(this.personGun))}s (max: {String.Format("{0:0.00}", Util.getGunFireRate(this.personGun))}s) +reload Timer: {Util.getGunReloadTimer(this.personGun)} +cooldown Timer: {Util.getGunCooldownTimer(this.personGun)} +speed: {Util.getGunFireVelocity(this.personGun)} +zoom: {Util.getGunZoom(this.personGun)}" + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } + + private void drawTeamStats() + { + if (!this.showTeamStats.Value) return; + + try + { + string teamNames = "Nickname\n\n"; + string teamKDR = "KDR\n\n"; + string teamPoints = "pts\n\n"; + string teamDamage = "Damage\n\n"; + + int teamTotalKills = 0; + int teamTotalDeaths = 0; + int teamTotalDamage = 0; + + for (int i = 0; i < this.data.playerStatsArray.Length; i++) + { + Data.PlayerStatsStruct stat = this.data.playerStatsArray[i]; + + // if player is not a bot and if player is in my team + if ((stat.killsElo != 0) && (this.teamList[i] == this.myTeam)) + { + teamNames += $"{this.data.nickList[i]}\n"; + teamKDR += $"{Util.formatKDR(stat.kills, stat.deaths)}\n"; + teamPoints += $"{stat.points}\n"; + teamDamage += $"{stat.damage}\n"; + + teamTotalKills += stat.kills; + teamTotalDeaths += stat.deaths; + teamTotalDamage += stat.damage; + } + } + + int teamStatOffset = (this.data.gameState == Data.GameStateEnum.Results) ? 280 : 0; + GUI.Box(new Rect(Screen.width - 320, 445 + teamStatOffset, 300, 270), "Team Stats"); + GUI.Label(new Rect(Screen.width - 315, 470 + teamStatOffset, 105, 190), teamNames); + GUI.Label(new Rect(Screen.width - 200, 470 + teamStatOffset, 40, 190), teamKDR); + GUI.Label(new Rect(Screen.width - 150, 470 + teamStatOffset, 40, 190), teamPoints); + GUI.Label(new Rect(Screen.width - 100, 470 + teamStatOffset, 70, 190), teamDamage); + + GUI.Label( + new Rect(Screen.width - 315, 655 + teamStatOffset, 300, 55), + $@"total damage: {teamTotalDamage} +total deaths: {teamTotalDeaths} +total kills: {teamTotalKills}" + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } + } +} From 25184a27d26708469ac946b8f1af83c00635ce82 Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 11 Mar 2022 11:50:54 +0900 Subject: [PATCH 13/34] improved section separation --- WBM/WBMVariable.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/WBM/WBMVariable.cs b/WBM/WBMVariable.cs index e3fd3bd..a9a66cc 100644 --- a/WBM/WBMVariable.cs +++ b/WBM/WBMVariable.cs @@ -14,20 +14,32 @@ namespace WBM { public partial class WBM { + // // important boy + // + private webguy webguy; private Harmony harmony; private IEnumerator UpdateValues; + // // websocket data stuff + // + private WebSocketSharp.Server.WebSocketServer server; private ushort serverPort = 24601; private Data.SerializableData data = new Data.SerializableData(); + // // internal or temporary + // + private bool _showConfig; + // // Configurations + // + private ConfigEntry showGUI; private ConfigEntry showGUIShortcut; @@ -87,7 +99,10 @@ namespace WBM } } + // // Audio + // + private AudioClip oldGunSound; private AudioClip newAKSound; private AudioClip newSMGSound; @@ -104,7 +119,10 @@ namespace WBM {69, "nice"}, }; + // // memory stuff + // + private static BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; private FieldInfo showEloOnLeaderboardRef; @@ -289,7 +307,10 @@ namespace WBM } } + // // Methods + // + private MethodInfo addMessageFuncRef; private MethodInfo clearMessagesFuncRef; private MethodInfo drawChatMessageFuncRef; From 0317053e4c9d5f591cd6ac71c0c5928f0908fa0e Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 11 Mar 2022 13:08:03 +0900 Subject: [PATCH 14/34] updated feature description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fe35a2..967ff03 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ This is to prevent situation where RShift+A fires when the ### Controls -- Shift to crouch +- Shift to crouch (does not interfere with breath holding) ### Sound effects From beabe6b56a712eccefd5686254cb27786f5c098f Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 12 Mar 2022 10:25:37 +0900 Subject: [PATCH 15/34] separated logic to dedicated files/directories --- WBM/KeyPressHandlers.cs | 128 ------- WBM/PrefNames.cs | 16 - WBM/WBM.cs | 176 +++------ WBM/WSJSONService.cs | 6 - WBM/features/BRStats.cs | 0 WBM/features/WSServer.cs | 26 ++ WBM/features/clearChat.cs | 32 ++ WBM/features/clearMessage.cs | 14 + WBM/{WBMVariable.cs => features/core/core.cs} | 351 +++++++----------- WBM/{WBMGUI.cs => features/core/ui.cs} | 54 ++- WBM/{Patches.cs => features/fpsUnlock.cs} | 0 WBM/features/killStreakSFX.cs | 37 ++ WBM/features/oldGunSound.cs | 81 ++++ WBM/features/playerStats.cs | 15 + WBM/features/shiftToCrouch.cs | 40 ++ WBM/features/showEloOnLeaderboard.cs | 48 +++ WBM/features/showSquadServer.cs | 48 +++ WBM/features/showTestingServer.cs | 48 +++ WBM/features/teamStats.cs | 15 + WBM/features/weaponStats.cs | 15 + 20 files changed, 645 insertions(+), 505 deletions(-) delete mode 100644 WBM/KeyPressHandlers.cs delete mode 100644 WBM/PrefNames.cs delete mode 100644 WBM/WSJSONService.cs create mode 100644 WBM/features/BRStats.cs create mode 100644 WBM/features/WSServer.cs create mode 100644 WBM/features/clearChat.cs create mode 100644 WBM/features/clearMessage.cs rename WBM/{WBMVariable.cs => features/core/core.cs} (56%) rename WBM/{WBMGUI.cs => features/core/ui.cs} (74%) rename WBM/{Patches.cs => features/fpsUnlock.cs} (100%) create mode 100644 WBM/features/killStreakSFX.cs create mode 100644 WBM/features/oldGunSound.cs create mode 100644 WBM/features/playerStats.cs create mode 100644 WBM/features/shiftToCrouch.cs create mode 100644 WBM/features/showEloOnLeaderboard.cs create mode 100644 WBM/features/showSquadServer.cs create mode 100644 WBM/features/showTestingServer.cs create mode 100644 WBM/features/teamStats.cs create mode 100644 WBM/features/weaponStats.cs diff --git a/WBM/KeyPressHandlers.cs b/WBM/KeyPressHandlers.cs deleted file mode 100644 index 715167d..0000000 --- a/WBM/KeyPressHandlers.cs +++ /dev/null @@ -1,128 +0,0 @@ -using UnityEngine; - - -namespace WBM -{ - public partial class WBM - { - private void handleKeyPresses() - { - this.moveUIOnKeyPress(); - this.resetUIOnKeyPress(); - this.toggleUIOnKeyPress(); - this.toggleShiftToCrouchOnKeyPress(); - this.toggleKillStreakSFXOnKeyPress(); - this.togglePlayerStatsOnKeyPress(); - this.toggleWeaponStatsOnKeyPress(); - this.toggleTeamStatsOnKeyPress(); - this.toggleLeaderboardEloOnKeyPress(); - this.toggleSquadServerOnKeyPress(); - this.toggleTestingServerOnKeyPress(); - this.clearChatOnKeyPress(); - this.clearDeathLogOnKeyPress(); - this.showConfigOnKeyPress(); - this.crouchOnKeyPress(); - } - private void moveUIOnKeyPress() - { - if (Input.GetKey(KeyCode.LeftControl)) - { - // move GUI - if (Input.GetKey(KeyCode.LeftShift)) - { - if (Input.GetKey(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; - if (Input.GetKey(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; - if (Input.GetKey(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; - if (Input.GetKey(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; - } - else - { - if (Input.GetKeyDown(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; - if (Input.GetKeyDown(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; - if (Input.GetKeyDown(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; - if (Input.GetKeyDown(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; - } - } - } - - private void resetUIOnKeyPress() - { - if (this.resetGUIShortcut.Value.IsDown()) - { - this.GUIOffsetX.Value = (int)this.GUIOffsetX.DefaultValue; - this.GUIOffsetY.Value = (int)this.GUIOffsetY.DefaultValue; - } - } - - private void toggleUIOnKeyPress() - { - if (this.showGUIShortcut.Value.IsDown()) this.showGUI.Value = !this.showGUI.Value; - } - - private void toggleShiftToCrouchOnKeyPress() - { - if (this.shiftToCrouchShortcut.Value.IsDown()) this.shiftToCrouch.Value = !this.shiftToCrouch.Value; - } - - private void toggleKillStreakSFXOnKeyPress() - { - if (this.killStreakSFXShortcut.Value.IsDown()) this.killStreakSFX.Value = !this.killStreakSFX.Value; - } - - private void togglePlayerStatsOnKeyPress() - { - if (this.showPlayerStatsShortcut.Value.IsDown()) this.showPlayerStats.Value = !this.showPlayerStats.Value; - } - - private void toggleWeaponStatsOnKeyPress() - { - if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; - } - - private void toggleTeamStatsOnKeyPress() - { - if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; - } - - private void toggleLeaderboardEloOnKeyPress() - { - if (this.showEloOnLeaderboardShortcut.Value.IsDown()) this.showEloOnLeaderboard.Value = !this.showEloOnLeaderboard.Value; - } - - private void toggleSquadServerOnKeyPress() - { - if (this.showSquadServerShortcut.Value.IsDown()) this.showSquadServer.Value = !this.showSquadServer.Value; - } - - private void toggleTestingServerOnKeyPress() - { - if (this.showTestingServerShortcut.Value.IsDown()) this.showTestingServer.Value = !this.showTestingServer.Value; - } - - private void clearChatOnKeyPress() - { - if (this.clearChatShortcut.Value.IsDown()) this.clearChat(); - } - - private void clearDeathLogOnKeyPress() - { - if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); - } - - private void showConfigOnKeyPress() - { - if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightShift)) this._showConfig = true; - if (!Input.GetKey(KeyCode.LeftControl) && !Input.GetKey(KeyCode.RightShift)) this._showConfig = false; - } - - private void crouchOnKeyPress() - { - // only if right buttton is not held - if (this.shiftToCrouch.Value && !Input.GetMouseButton(1)) - { - if (Input.GetKeyDown(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = true; - if (Input.GetKeyUp(KeyCode.LeftShift)) OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = false; - } - } - } -} diff --git a/WBM/PrefNames.cs b/WBM/PrefNames.cs deleted file mode 100644 index b4d8e40..0000000 --- a/WBM/PrefNames.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace WBM -{ - class PrefNames - { - public const string showSquadServer = "showSquadServer"; - public const string showTestingServer = "showTestingServer"; - public const string GUIOffsetX = "GUIOffsetX"; - public const string GUIOffsetY = "GUIOffsetY"; - public const string showGUI = "showGUI"; - public const string showPlayerStats = "showPlayerStats"; - public const string showWeaponStats = "showWeaponStats"; - public const string showTeammateStats = "showTeammateStats"; - public const string showElo = "showElo"; - public const string shiftToCrouch = "shiftToCrouch"; - } -} diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 2ba977a..8a9f831 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -1,79 +1,70 @@ using BepInEx; -using BepInEx.Configuration; - -using HarmonyLib; - -using UnityEngine; - -using System; -using System.IO; namespace WBM { + ///

+ /// Class WBM is a regular unity script component (GameObject). + /// The functions Awake, Start, Update, OnGUI, and onDestroy + /// are event functions that gets called on specific stages of the component's lifecycle. + /// More information can be found in the unity's documentation page. + /// [BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.7.1.0")] public partial class WBM : BaseUnityPlugin { + /// This function is called as soon as the component becomes active. + /// It is the first event function that's called during the component's lifecycle. private void Awake() - { - this.harmony = new Harmony("com.developomp.wbm"); - this.harmony.PatchAll(); - } - - private async void Start() { Logger.LogDebug("Initializing"); - this.webguy = FindObjectOfType(); + this.initCore(); + } - System.Type webguyType = typeof(webguy); + /// This function is called only once before the first frame update. + /// The component is more or less initialized at this point, + /// and it is this function that completes the initialization process. + private async void Start() + { + await this.setupCore(); - this.fetchReferences(webguyType); - this.setupConfiguration(); - - // - // Audio - // - - this.killStreakAudioSource = this.gameObject.AddComponent(); - - if (!Directory.Exists(this.audioPath)) - { - Logger.LogError($"Directory {this.audioPath} does not exist. Aborting!"); - GameObject.Destroy(this); - } - - foreach (string fileName in Directory.GetFiles(this.audioPath)) - { - Logger.LogDebug("Loading AudioClip " + Path.GetFileNameWithoutExtension(fileName)); - - this.AudioDict.Add( - Path.GetFileNameWithoutExtension(fileName), - await Util.fetchAudioClip(Path.Combine(this.audioPath, fileName)) - ); - } - - this.oldGunSound = this.oldGunSoundRaw; - this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; - this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; - - // - // Websocket - // - - server = new WebSocketSharp.Server.WebSocketServer($"ws://127.0.0.1:{this.serverPort}"); - server.AddWebSocketService("/json"); - server.Start(); + this.setupOldGunSound(); + this.setupWSSever(); + this.setupClearChatOnKeyPress(); + this.setupShiftToCrouch(); + this.setupShowEloOnLeaderBoard(); + this.setupShowSquadServer(); + this.setupShowTestingServer(); + this.setupKillStreakSFX(); StartCoroutine(UpdateValuesFunction()); Logger.LogDebug("Ready!"); } + /// This function is called on each frame. private void Update() { - this.handleKeyPresses(); + this.moveUIOnKeyPress(); + this.resetUIOnKeyPress(); + this.toggleUIOnKeyPress(); + this.toggleKillStreakSFXOnKeyPress(); + this.togglePlayerStatsOnKeyPress(); + this.toggleWeaponStatsOnKeyPress(); + this.toggleTeamStatsOnKeyPress(); + this.toggleLeaderboardEloOnKeyPress(); + this.toggleShowSquadServerOnKeyPress(); + this.toggleTestingServerOnKeyPress(); + this.clearChatOnKeyPress(); + this.clearDeathLogOnKeyPress(); + this.showConfigOnKeyPress(); + + this.toggleShiftToCrouchOnKeyPress(); + this.crouchOnKeyPress(); } + /// Called multiple times per frame in response to GUI events. + /// The Layout and Repaint events are processed first, + /// followed by a Layout and keyboard/mouse event for each input event. private void OnGUI() { this.setupGUI(); @@ -92,84 +83,11 @@ namespace WBM this.drawTeamStats(); } + /// This function is called after the component has been disabled and is ready to be destroyed. + /// It is the last event function that's called during the component's lifecycle. private void onDestroy() { - // properly stop websocket server - this.server.Stop(); - } - - // - // setup functions - // - - private void fetchReferences(System.Type webguyType) - { - this.showEloOnLeaderboardRef = webguyType.GetField("KDOBENAOLLF", bindFlags); - this.showSquadServerRef = webguyType.GetField("PHPIBBCFKFI", bindFlags); - this.showTestingServerRef = webguyType.GetField("LHHEGFHLNJE", bindFlags); - this.playerStatsArrayRef = webguyType.GetField("NAFCGDLLFJC", bindFlags); - this.currentAreaRef = webguyType.GetField("FLJLJNLDFAM", bindFlags); - this.teamListRef = webguyType.GetField("MNEJLPDLMBH", bindFlags); - this.localPlayerIndexRef = webguyType.GetField("ALEJJPEPFOG", bindFlags); - this.personGunRef = webguyType.GetField("IEGLIMLBDPH", bindFlags); - this.nickListRef = webguyType.GetField("CLLDJOMEKIP", bindFlags); - this.gameStateRef = webguyType.GetField("MCGMEPGBCKK", bindFlags); - this.chatListRef = webguyType.GetField("MOOBJBOCANE", bindFlags); - - this.addMessageFuncRef = webguyType.GetMethod("NBPKLIOLLEI", bindFlags); - this.clearMessagesFuncRef = webguyType.GetMethod("IOCHBBACKFA", bindFlags); - this.drawChatMessageFuncRef = webguyType.GetMethod("EBDKFEJMEMB", bindFlags); - - this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags); - this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags); - this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags); - } - - private void setupConfiguration() - { - this.showGUI = Config.Bind("Config", "show GUI", true); - this.showGUIShortcut = Config.Bind("Hotkeys", "show GUI Shortcut", new KeyboardShortcut(KeyCode.A, KeyCode.RightShift)); - - this.GUIOffsetX = Config.Bind("Config", "GUI Horizontal position", 38, new ConfigDescription("WBM GUI Horizontal position", new AcceptableValueRange(0, Screen.width))); - this.GUIOffsetY = Config.Bind("Config", "GUI Vertical position", 325, new ConfigDescription("WBM GUI Vertical position", new AcceptableValueRange(0, Screen.height))); - this.resetGUIShortcut = Config.Bind("Hotkeys", "reset GUI position", new KeyboardShortcut(KeyCode.R, KeyCode.LeftControl)); - - this.shiftToCrouch = Config.Bind("Config", "shift to crouch", true); - this.shiftToCrouchShortcut = Config.Bind("Hotkeys", "shift to crouch", new KeyboardShortcut(KeyCode.C, KeyCode.RightShift)); - - this.killStreakSFX = Config.Bind("Config", "kill streak sound effect", true); - this.killStreakSFXShortcut = Config.Bind("Hotkeys", "kill streak sound effect", new KeyboardShortcut(KeyCode.F, KeyCode.RightShift)); - - this.showPlayerStats = Config.Bind("Config", "show player statistics", true); - this.showPlayerStatsShortcut = Config.Bind("Hotkeys", "show player statistics", new KeyboardShortcut(KeyCode.P, KeyCode.RightShift)); - - this.showWeaponStats = Config.Bind("Config", "show weapon statistics", true); - this.showWeaponStatsShortcut = Config.Bind("Hotkeys", "show weapon statistics", new KeyboardShortcut(KeyCode.W, KeyCode.RightShift)); - - this.showTeamStats = Config.Bind("Config", "show team statistics", true); - this.showTeamStatsShortcut = Config.Bind("Hotkeys", "show team statistics", new KeyboardShortcut(KeyCode.L, KeyCode.RightShift)); - - this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true); - this.showEloOnLeaderboard.SettingChanged += this.showEloOnLeaderboardChanged; - this.showEloOnLeaderboardShortcut = Config.Bind("Hotkeys", "show Elo on leaderboard", new KeyboardShortcut(KeyCode.E, KeyCode.RightShift)); - this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; - - this.showSquadServer = Config.Bind("Config", "show squad server", true); - this.showSquadServer.SettingChanged += this.showSquadServerChanged; - this.showSquadServerShortcut = Config.Bind("Hotkeys", "show squad server", new KeyboardShortcut(KeyCode.S, KeyCode.RightShift)); - this.showSquadServerRaw = this.showSquadServer.Value; - - this.showTestingServer = Config.Bind("Config", "show testing server", true); - this.showTestingServer.SettingChanged += this.showTestingServerChanged; - this.showTestingServerShortcut = Config.Bind("Hotkeys", "show testing server", new KeyboardShortcut(KeyCode.T, KeyCode.RightShift)); - this.showTestingServerRaw = this.showTestingServer.Value; - - this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift)); - this.clearDeathLogShortcut = Config.Bind("Hotkeys", "clear messages", new KeyboardShortcut(KeyCode.X, KeyCode.RightShift)); - - this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); - this.useOldGunSoundConf.SettingChanged += this.useOldGunSoundChanged; - this.useOldGunSoundChanged(new object(), new EventArgs()); + this.destroyWSSever(); } } } diff --git a/WBM/WSJSONService.cs b/WBM/WSJSONService.cs deleted file mode 100644 index ee2817a..0000000 --- a/WBM/WSJSONService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace WBM -{ - public class WSJSONService : WebSocketSharp.Server.WebSocketBehavior - { - } -} diff --git a/WBM/features/BRStats.cs b/WBM/features/BRStats.cs new file mode 100644 index 0000000..e69de29 diff --git a/WBM/features/WSServer.cs b/WBM/features/WSServer.cs new file mode 100644 index 0000000..ce592cb --- /dev/null +++ b/WBM/features/WSServer.cs @@ -0,0 +1,26 @@ +namespace WBM +{ + public partial class WBM + { + private WebSocketSharp.Server.WebSocketServer server; + private ushort serverPort = 24601; + private Data.SerializableData data = new Data.SerializableData(); + + private void setupWSSever() + { + server = new WebSocketSharp.Server.WebSocketServer($"ws://127.0.0.1:{this.serverPort}"); + server.AddWebSocketService("/json"); + server.Start(); + } + + private void destroyWSSever() + { + // properly stop websocket server + this.server.Stop(); + } + } + + public class WSJSONService : WebSocketSharp.Server.WebSocketBehavior + { + } +} diff --git a/WBM/features/clearChat.cs b/WBM/features/clearChat.cs new file mode 100644 index 0000000..4410453 --- /dev/null +++ b/WBM/features/clearChat.cs @@ -0,0 +1,32 @@ +using BepInEx.Configuration; + +using UnityEngine; + +using System.Reflection; + +namespace WBM +{ + partial class WBM + { + private MethodInfo drawChatMessageFuncRef; + + private ConfigEntry clearChatShortcut; + + private void setupClearChatOnKeyPress() + { + this.drawChatMessageFuncRef = webguyType.GetMethod("EBDKFEJMEMB", bindFlags); + this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift)); + } + + private void clearChatOnKeyPress() + { + if (this.clearChatShortcut.Value.IsDown()) this.clearChat(); + } + + private void clearChat() + { + for (int i = 0; i < this.chatListRaw.Length; i++) this.chatListRaw[i] = string.Empty; + this.drawChatMessageFuncRef.Invoke(this.webguy, new object[] { "" }); + } + } +} diff --git a/WBM/features/clearMessage.cs b/WBM/features/clearMessage.cs new file mode 100644 index 0000000..da2e57e --- /dev/null +++ b/WBM/features/clearMessage.cs @@ -0,0 +1,14 @@ +using BepInEx.Configuration; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry clearDeathLogShortcut; + + private void clearDeathLogOnKeyPress() + { + if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); + } + } +} diff --git a/WBM/WBMVariable.cs b/WBM/features/core/core.cs similarity index 56% rename from WBM/WBMVariable.cs rename to WBM/features/core/core.cs index a9a66cc..efd8708 100644 --- a/WBM/WBMVariable.cs +++ b/WBM/features/core/core.cs @@ -12,157 +12,88 @@ using System.Collections.Generic; namespace WBM { - public partial class WBM + partial class WBM { - // - // important boy - // - private webguy webguy; + private System.Type webguyType; private Harmony harmony; private IEnumerator UpdateValues; - // - // websocket data stuff - // - - private WebSocketSharp.Server.WebSocketServer server; - private ushort serverPort = 24601; - private Data.SerializableData data = new Data.SerializableData(); - // // internal or temporary // private bool _showConfig; - // - // Configurations - // - - private ConfigEntry showGUI; - private ConfigEntry showGUIShortcut; - - private ConfigEntry GUIOffsetX; - private ConfigEntry GUIOffsetY; - private ConfigEntry resetGUIShortcut; - - private ConfigEntry shiftToCrouch; - private ConfigEntry shiftToCrouchShortcut; - - private ConfigEntry killStreakSFX; - private ConfigEntry killStreakSFXShortcut; - - private ConfigEntry showPlayerStats; - private ConfigEntry showPlayerStatsShortcut; - private ConfigEntry showWeaponStats; - private ConfigEntry showWeaponStatsShortcut; - private ConfigEntry showTeamStats; - private ConfigEntry showTeamStatsShortcut; - - private ConfigEntry showEloOnLeaderboard; - private void showEloOnLeaderboardChanged(object sender, EventArgs e) - { - this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; - } - private ConfigEntry showEloOnLeaderboardShortcut; - - private ConfigEntry showSquadServer; - private void showSquadServerChanged(object sender, EventArgs e) - { - this.showSquadServerRaw = this.showSquadServer.Value; - } - private ConfigEntry showSquadServerShortcut; - - private ConfigEntry showTestingServer; - private void showTestingServerChanged(object sender, EventArgs e) - { - this.showTestingServerRaw = this.showTestingServer.Value; - } - private ConfigEntry showTestingServerShortcut; - - private ConfigEntry clearChatShortcut; - private ConfigEntry clearDeathLogShortcut; - - private ConfigEntry useOldGunSoundConf; - private void useOldGunSoundChanged(object sender, EventArgs e) - { - if (this.useOldGunSoundConf.Value) - { - this.AKSoundRaw.ADCOCHNNCHM = this.oldGunSound; - this.SMGSoundRaw.ADCOCHNNCHM = this.oldGunSound; - } - else - { - this.AKSoundRaw.ADCOCHNNCHM = this.newAKSound; - this.SMGSoundRaw.ADCOCHNNCHM = this.newSMGSound; - } - } - - // - // Audio - // - - private AudioClip oldGunSound; - private AudioClip newAKSound; - private AudioClip newSMGSound; - - private Dictionary AudioDict = new Dictionary(); - private string audioPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "assets/audio"); - private AudioSource killStreakAudioSource; - private Dictionary killStreakSFXDictionary = new Dictionary() - { - {10, "rampage"}, - {20, "killing spree"}, - {30, "unstoppable"}, - {50, "godlike"}, - {69, "nice"}, - }; - // // memory stuff // private static BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; - private FieldInfo showEloOnLeaderboardRef; - private bool showEloOnLeaderboardRaw + // + // Methods + // + + private MethodInfo addMessageFuncRef; + + private IEnumerator UpdateValuesFunction() { - get + try { - return (bool)this.showEloOnLeaderboardRef.GetValue(this.webguy); + this.data.localPlayerIndex = this.localPlayerIndexRaw; + + if (this.data.localPlayerIndex >= 0) + { + this.data.playerStatsArray = this.playerStatsArrayRaw; + this.myPlayerStats = this.data.playerStatsArray[this.data.localPlayerIndex]; + this.teamList = this.teamListRaw; + this.myTeam = this.teamList[this.data.localPlayerIndex]; + this.personGun = this.personGunRaw; + this.data.nickList = this.nickListRaw; + this.data.gameState = this.gameStateRaw; + + // check if deaths has changed since the last value update + if (this.prevDeaths == this.myPlayerStats.deaths) + { + this.killStreak = this.myPlayerStats.kills - this.killCountBeforeDeath; + + if (this.prevKills != this.myPlayerStats.kills) + { + if (this.killStreakSFX.Value && this.killStreakSFXDictionary.ContainsKey(this.killStreak)) + { + this.killStreakAudioSource.clip = this.AudioDict[this.killStreakSFXDictionary[this.killStreak]]; + this.killStreakAudioSource.Play(); + + this.addMessageFuncRef.Invoke(this.webguy, new object[] { $"You are on a {this.killStreak} kill streak", -1 }); + } + } + } + else + { + // reset kill streak when death count changes + + this.killCountBeforeDeath = this.myPlayerStats.kills; + this.prevDeaths = this.myPlayerStats.deaths; + this.killStreak = 0; + } + this.prevKills = this.myPlayerStats.kills; + } + + this.server.WebSocketServices["/json"].Sessions.Broadcast(Util.data2JSON(data)); } - set + catch (Exception e) { - this.showEloOnLeaderboardRef.SetValue(this.webguy, value); + Logger.LogError(e); } + + yield return new WaitForSeconds(0.1f); + + this.UpdateValues = UpdateValuesFunction(); + StartCoroutine(this.UpdateValues); } - private FieldInfo showSquadServerRef; - private bool showSquadServerRaw - { - get - { - return (bool)this.showSquadServerRef.GetValue(this.webguy); - } - set - { - this.showSquadServerRef.SetValue(this.webguy, value); - } - } - - private FieldInfo showTestingServerRef; - private bool showTestingServerRaw - { - get - { - return (bool)this.showTestingServerRef.GetValue(this.webguy); - } - set - { - this.showTestingServerRef.SetValue(this.webguy, value); - } - } + private MethodInfo clearMessagesFuncRef; private FieldInfo playerStatsArrayRef; private Data.PlayerStatsStruct[] playerStatsArrayRaw @@ -200,7 +131,6 @@ namespace WBM private int prevDeaths = 0; private int prevKills = 0; private int killCountBeforeDeath = 0; - private int killStreak = 0; private FieldInfo currentAreaRef; private int currentAreaRaw @@ -272,110 +202,83 @@ namespace WBM } } - private FieldInfo oldGunSoundRef; - private AudioClip oldGunSoundRaw - { - get - { - return ((LPJKBALIFCC)this.oldGunSoundRef.GetValue(this.webguy)).ADCOCHNNCHM; - } - } - - private FieldInfo AKSoundRef; - private LPJKBALIFCC AKSoundRaw - { - get - { - return (LPJKBALIFCC)this.AKSoundRef.GetValue(this.webguy); - } - set - { - this.AKSoundRef.SetValue(this.webguy, value); - } - } - - private FieldInfo SMGSoundRef; - private LPJKBALIFCC SMGSoundRaw - { - get - { - return (LPJKBALIFCC)this.SMGSoundRef.GetValue(this.webguy); - } - set - { - this.SMGSoundRef.SetValue(this.webguy, value); - } - } - // - // Methods + // Audio // - private MethodInfo addMessageFuncRef; - private MethodInfo clearMessagesFuncRef; - private MethodInfo drawChatMessageFuncRef; + private Dictionary AudioDict = new Dictionary(); + private string audioPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "assets/audio"); - private IEnumerator UpdateValuesFunction() + private void initCore() { - try - { - this.data.localPlayerIndex = this.localPlayerIndexRaw; - - if (this.data.localPlayerIndex >= 0) - { - this.data.playerStatsArray = this.playerStatsArrayRaw; - this.myPlayerStats = this.data.playerStatsArray[this.data.localPlayerIndex]; - this.teamList = this.teamListRaw; - this.myTeam = this.teamList[this.data.localPlayerIndex]; - this.personGun = this.personGunRaw; - this.data.nickList = this.nickListRaw; - this.data.gameState = this.gameStateRaw; - - // check if deaths has changed since the last value update - if (this.prevDeaths == this.myPlayerStats.deaths) - { - this.killStreak = this.myPlayerStats.kills - this.killCountBeforeDeath; - - if (this.prevKills != this.myPlayerStats.kills) - { - if (this.killStreakSFX.Value && this.killStreakSFXDictionary.ContainsKey(this.killStreak)) - { - this.killStreakAudioSource.clip = this.AudioDict[this.killStreakSFXDictionary[this.killStreak]]; - this.killStreakAudioSource.Play(); - - this.addMessageFuncRef.Invoke(this.webguy, new object[] { $"You are on a {this.killStreak} kill streak", -1 }); - } - } - } - else - { - // reset kill streak when death count changes - - this.killCountBeforeDeath = this.myPlayerStats.kills; - this.prevDeaths = this.myPlayerStats.deaths; - this.killStreak = 0; - } - this.prevKills = this.myPlayerStats.kills; - } - - this.server.WebSocketServices["/json"].Sessions.Broadcast(Util.data2JSON(data)); - } - catch (Exception e) - { - Logger.LogError(e); - } - - yield return new WaitForSeconds(0.1f); - - this.UpdateValues = UpdateValuesFunction(); - StartCoroutine(this.UpdateValues); + this.harmony = new Harmony("com.developomp.wbm"); + this.harmony.PatchAll(); } - private void clearChat() + private async System.Threading.Tasks.Task setupCore() { - Logger.LogDebug($"clear1 {chatListRaw.Length}"); - for (int i = 0; i < this.chatListRaw.Length; i++) this.chatListRaw[i] = string.Empty; - this.drawChatMessageFuncRef.Invoke(this.webguy, new object[] { "" }); + this.webguy = FindObjectOfType(); + this.webguyType = typeof(webguy); + + // + // References + // + + this.playerStatsArrayRef = webguyType.GetField("NAFCGDLLFJC", bindFlags); + this.currentAreaRef = webguyType.GetField("FLJLJNLDFAM", bindFlags); + this.teamListRef = webguyType.GetField("MNEJLPDLMBH", bindFlags); + this.localPlayerIndexRef = webguyType.GetField("ALEJJPEPFOG", bindFlags); + this.personGunRef = webguyType.GetField("IEGLIMLBDPH", bindFlags); + this.nickListRef = webguyType.GetField("CLLDJOMEKIP", bindFlags); + this.gameStateRef = webguyType.GetField("MCGMEPGBCKK", bindFlags); + this.chatListRef = webguyType.GetField("MOOBJBOCANE", bindFlags); + + this.addMessageFuncRef = webguyType.GetMethod("NBPKLIOLLEI", bindFlags); + this.clearMessagesFuncRef = webguyType.GetMethod("IOCHBBACKFA", bindFlags); + + // + // Configurations + // + + this.showGUI = Config.Bind("Config", "show GUI", true); + this.showGUIShortcut = Config.Bind("Hotkeys", "show GUI Shortcut", new KeyboardShortcut(KeyCode.A, KeyCode.RightShift)); + + this.GUIOffsetX = Config.Bind("Config", "GUI Horizontal position", 38, new ConfigDescription("WBM GUI Horizontal position", new AcceptableValueRange(0, Screen.width))); + this.GUIOffsetY = Config.Bind("Config", "GUI Vertical position", 325, new ConfigDescription("WBM GUI Vertical position", new AcceptableValueRange(0, Screen.height))); + this.resetGUIShortcut = Config.Bind("Hotkeys", "reset GUI position", new KeyboardShortcut(KeyCode.R, KeyCode.LeftControl)); + + this.showPlayerStats = Config.Bind("Config", "show player statistics", true); + this.showPlayerStatsShortcut = Config.Bind("Hotkeys", "show player statistics", new KeyboardShortcut(KeyCode.P, KeyCode.RightShift)); + + this.showWeaponStats = Config.Bind("Config", "show weapon statistics", true); + this.showWeaponStatsShortcut = Config.Bind("Hotkeys", "show weapon statistics", new KeyboardShortcut(KeyCode.W, KeyCode.RightShift)); + + this.showTeamStats = Config.Bind("Config", "show team statistics", true); + this.showTeamStatsShortcut = Config.Bind("Hotkeys", "show team statistics", new KeyboardShortcut(KeyCode.L, KeyCode.RightShift)); + + this.clearDeathLogShortcut = Config.Bind("Hotkeys", "clear messages", new KeyboardShortcut(KeyCode.X, KeyCode.RightShift)); + + // + // Audio + // + + this.killStreakAudioSource = this.gameObject.AddComponent(); + + if (!Directory.Exists(this.audioPath)) + { + Logger.LogError($"Directory {this.audioPath} does not exist. Aborting!"); + GameObject.Destroy(this); + } + + foreach (string fileName in Directory.GetFiles(this.audioPath)) + { + Logger.LogDebug("Loading AudioClip " + Path.GetFileNameWithoutExtension(fileName)); + + this.AudioDict.Add( + Path.GetFileNameWithoutExtension(fileName), + await Util.fetchAudioClip(Path.Combine(this.audioPath, fileName)) + ); + } } } } diff --git a/WBM/WBMGUI.cs b/WBM/features/core/ui.cs similarity index 74% rename from WBM/WBMGUI.cs rename to WBM/features/core/ui.cs index b520ec1..34f9f7c 100644 --- a/WBM/WBMGUI.cs +++ b/WBM/features/core/ui.cs @@ -1,12 +1,20 @@ +using BepInEx.Configuration; + using UnityEngine; using System; - namespace WBM { - public partial class WBM + partial class WBM { + private ConfigEntry showGUI; + private ConfigEntry showGUIShortcut; + + private ConfigEntry GUIOffsetX; + private ConfigEntry GUIOffsetY; + private ConfigEntry resetGUIShortcut; + private void setupGUI() { GUI.skin.box.fontSize = 15; @@ -154,5 +162,47 @@ total kills: {teamTotalKills}" Logger.LogError(e); } } + + private void moveUIOnKeyPress() + { + if (Input.GetKey(KeyCode.LeftControl)) + { + // move GUI + if (Input.GetKey(KeyCode.LeftShift)) + { + if (Input.GetKey(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; + if (Input.GetKey(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; + if (Input.GetKey(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; + if (Input.GetKey(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; + } + else + { + if (Input.GetKeyDown(KeyCode.UpArrow)) this.GUIOffsetY.Value -= 1; + if (Input.GetKeyDown(KeyCode.DownArrow)) this.GUIOffsetY.Value += 1; + if (Input.GetKeyDown(KeyCode.LeftArrow)) this.GUIOffsetX.Value -= 1; + if (Input.GetKeyDown(KeyCode.RightArrow)) this.GUIOffsetX.Value += 1; + } + } + } + + private void resetUIOnKeyPress() + { + if (this.resetGUIShortcut.Value.IsDown()) + { + this.GUIOffsetX.Value = (int)this.GUIOffsetX.DefaultValue; + this.GUIOffsetY.Value = (int)this.GUIOffsetY.DefaultValue; + } + } + + private void toggleUIOnKeyPress() + { + if (this.showGUIShortcut.Value.IsDown()) this.showGUI.Value = !this.showGUI.Value; + } + + private void showConfigOnKeyPress() + { + if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightShift)) this._showConfig = true; + if (!Input.GetKey(KeyCode.LeftControl) && !Input.GetKey(KeyCode.RightShift)) this._showConfig = false; + } } } diff --git a/WBM/Patches.cs b/WBM/features/fpsUnlock.cs similarity index 100% rename from WBM/Patches.cs rename to WBM/features/fpsUnlock.cs diff --git a/WBM/features/killStreakSFX.cs b/WBM/features/killStreakSFX.cs new file mode 100644 index 0000000..605cdb9 --- /dev/null +++ b/WBM/features/killStreakSFX.cs @@ -0,0 +1,37 @@ +using BepInEx.Configuration; + +using UnityEngine; + +using System.Collections.Generic; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry killStreakSFX; + private ConfigEntry killStreakSFXShortcut; + + private int killStreak = 0; + + private AudioSource killStreakAudioSource; + private Dictionary killStreakSFXDictionary = new Dictionary() + { + {10, "rampage"}, + {20, "killing spree"}, + {30, "unstoppable"}, + {50, "godlike"}, + {69, "nice"}, + }; + + private void setupKillStreakSFX() + { + this.killStreakSFX = Config.Bind("Config", "kill streak sound effect", true); + this.killStreakSFXShortcut = Config.Bind("Hotkeys", "kill streak sound effect", new KeyboardShortcut(KeyCode.F, KeyCode.RightShift)); + } + + private void toggleKillStreakSFXOnKeyPress() + { + if (this.killStreakSFXShortcut.Value.IsDown()) this.killStreakSFX.Value = !this.killStreakSFX.Value; + } + } +} diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs new file mode 100644 index 0000000..6c432f6 --- /dev/null +++ b/WBM/features/oldGunSound.cs @@ -0,0 +1,81 @@ +using BepInEx.Configuration; + +using UnityEngine; + +using System; +using System.Reflection; + +namespace WBM +{ + public partial class WBM + { + private ConfigEntry useOldGunSoundConf; + + private FieldInfo oldGunSoundRef; + private AudioClip oldGunSoundRaw + { + get + { + return ((LPJKBALIFCC)this.oldGunSoundRef.GetValue(this.webguy)).ADCOCHNNCHM; + } + } + private AudioClip oldGunSound; + + private FieldInfo AKSoundRef; + private LPJKBALIFCC AKSoundRaw + { + get + { + return (LPJKBALIFCC)this.AKSoundRef.GetValue(this.webguy); + } + set + { + this.AKSoundRef.SetValue(this.webguy, value); + } + } + private AudioClip newAKSound; + + private FieldInfo SMGSoundRef; + private LPJKBALIFCC SMGSoundRaw + { + get + { + return (LPJKBALIFCC)this.SMGSoundRef.GetValue(this.webguy); + } + set + { + this.SMGSoundRef.SetValue(this.webguy, value); + } + } + private AudioClip newSMGSound; + + private void useOldGunSoundChanged(object sender, EventArgs e) + { + if (this.useOldGunSoundConf.Value) + { + this.AKSoundRaw.ADCOCHNNCHM = this.oldGunSound; + this.SMGSoundRaw.ADCOCHNNCHM = this.oldGunSound; + } + else + { + this.AKSoundRaw.ADCOCHNNCHM = this.newAKSound; + this.SMGSoundRaw.ADCOCHNNCHM = this.newSMGSound; + } + } + + private void setupOldGunSound() + { + this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags); + this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags); + this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags); + + this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); + this.useOldGunSoundConf.SettingChanged += this.useOldGunSoundChanged; + this.useOldGunSoundChanged(new object(), new EventArgs()); + + this.oldGunSound = this.oldGunSoundRaw; + this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; + this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; + } + } +} diff --git a/WBM/features/playerStats.cs b/WBM/features/playerStats.cs new file mode 100644 index 0000000..d99444c --- /dev/null +++ b/WBM/features/playerStats.cs @@ -0,0 +1,15 @@ +using BepInEx.Configuration; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry showPlayerStats; + private ConfigEntry showPlayerStatsShortcut; + + private void togglePlayerStatsOnKeyPress() + { + if (this.showPlayerStatsShortcut.Value.IsDown()) this.showPlayerStats.Value = !this.showPlayerStats.Value; + } + } +} diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs new file mode 100644 index 0000000..7bb1541 --- /dev/null +++ b/WBM/features/shiftToCrouch.cs @@ -0,0 +1,40 @@ +using BepInEx.Configuration; + +using UnityEngine; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry shiftToCrouch; + private ConfigEntry shiftToCrouchShortcut; + + private void setupShiftToCrouch() + { + this.shiftToCrouch = Config.Bind("Config", "shift to crouch", true); + this.shiftToCrouchShortcut = Config.Bind("Hotkeys", "shift to crouch", new KeyboardShortcut(KeyCode.C, KeyCode.RightShift)); + } + + private void crouchOnKeyPress() + { + // Skip if this setting is not activated + if (!this.shiftToCrouch.Value) return; + + // Skip if right buttton is being pressed (if weapon is zoomed) + if (Input.GetMouseButton(1)) return; + + if (Input.GetKeyDown(KeyCode.LeftShift)) setCrouchState(true); + if (Input.GetKeyUp(KeyCode.LeftShift)) setCrouchState(false); + } + + private void toggleShiftToCrouchOnKeyPress() + { + if (this.shiftToCrouchShortcut.Value.IsDown()) this.shiftToCrouch.Value = !this.shiftToCrouch.Value; + } + + private void setCrouchState(bool crouchState) + { + OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = crouchState; + } + } +} diff --git a/WBM/features/showEloOnLeaderboard.cs b/WBM/features/showEloOnLeaderboard.cs new file mode 100644 index 0000000..6c5d5ba --- /dev/null +++ b/WBM/features/showEloOnLeaderboard.cs @@ -0,0 +1,48 @@ +using BepInEx.Configuration; + +using UnityEngine; + +using System; +using System.Reflection; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry showEloOnLeaderboard; + private ConfigEntry showEloOnLeaderboardShortcut; + + private FieldInfo showEloOnLeaderboardRef; + private bool showEloOnLeaderboardRaw + { + get + { + return (bool)this.showEloOnLeaderboardRef.GetValue(this.webguy); + } + set + { + this.showEloOnLeaderboardRef.SetValue(this.webguy, value); + } + } + + private void setupShowEloOnLeaderBoard() + { + this.showEloOnLeaderboardRef = webguyType.GetField("KDOBENAOLLF", bindFlags); + + this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true); + this.showEloOnLeaderboard.SettingChanged += this.onShowEloOnLeaderboardChanged; + this.showEloOnLeaderboardShortcut = Config.Bind("Hotkeys", "show Elo on leaderboard", new KeyboardShortcut(KeyCode.E, KeyCode.RightShift)); + this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; + } + + private void toggleLeaderboardEloOnKeyPress() + { + if (this.showEloOnLeaderboardShortcut.Value.IsDown()) this.showEloOnLeaderboard.Value = !this.showEloOnLeaderboard.Value; + } + + private void onShowEloOnLeaderboardChanged(object sender, EventArgs e) + { + this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; + } + } +} \ No newline at end of file diff --git a/WBM/features/showSquadServer.cs b/WBM/features/showSquadServer.cs new file mode 100644 index 0000000..28effe7 --- /dev/null +++ b/WBM/features/showSquadServer.cs @@ -0,0 +1,48 @@ +using BepInEx.Configuration; + +using UnityEngine; + +using System; +using System.Reflection; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry showSquadServer; + private ConfigEntry showSquadServerShortcut; + + private FieldInfo showSquadServerRef; + private bool showSquadServerRaw + { + get + { + return (bool)this.showSquadServerRef.GetValue(this.webguy); + } + set + { + this.showSquadServerRef.SetValue(this.webguy, value); + } + } + + private void setupShowSquadServer() + { + this.showSquadServerRef = webguyType.GetField("PHPIBBCFKFI", bindFlags); + + this.showSquadServer = Config.Bind("Config", "show squad server", true); + this.showSquadServer.SettingChanged += this.onShowSquadServerChanged; + this.showSquadServerShortcut = Config.Bind("Hotkeys", "show squad server", new KeyboardShortcut(KeyCode.S, KeyCode.RightShift)); + this.showSquadServerRaw = this.showSquadServer.Value; + } + + private void toggleShowSquadServerOnKeyPress() + { + if (this.showSquadServerShortcut.Value.IsDown()) this.showSquadServer.Value = !this.showSquadServer.Value; + } + + private void onShowSquadServerChanged(object sender, EventArgs e) + { + this.showSquadServerRaw = this.showSquadServer.Value; + } + } +} \ No newline at end of file diff --git a/WBM/features/showTestingServer.cs b/WBM/features/showTestingServer.cs new file mode 100644 index 0000000..16549b8 --- /dev/null +++ b/WBM/features/showTestingServer.cs @@ -0,0 +1,48 @@ +using BepInEx.Configuration; + +using UnityEngine; + +using System; +using System.Reflection; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry showTestingServer; + private ConfigEntry showTestingServerShortcut; + + private FieldInfo showTestingServerRef; + private bool showTestingServerRaw + { + get + { + return (bool)this.showTestingServerRef.GetValue(this.webguy); + } + set + { + this.showTestingServerRef.SetValue(this.webguy, value); + } + } + + private void setupShowTestingServer() + { + this.showTestingServerRef = webguyType.GetField("LHHEGFHLNJE", bindFlags); + + this.showTestingServer = Config.Bind("Config", "show testing server", true); + this.showTestingServer.SettingChanged += this.onShowTestingServerChanged; + this.showTestingServerShortcut = Config.Bind("Hotkeys", "show testing server", new KeyboardShortcut(KeyCode.T, KeyCode.RightShift)); + this.showTestingServerRaw = this.showTestingServer.Value; + } + + private void toggleTestingServerOnKeyPress() + { + if (this.showTestingServerShortcut.Value.IsDown()) this.showTestingServer.Value = !this.showTestingServer.Value; + } + + private void onShowTestingServerChanged(object sender, EventArgs e) + { + this.showTestingServerRaw = this.showTestingServer.Value; + } + } +} diff --git a/WBM/features/teamStats.cs b/WBM/features/teamStats.cs new file mode 100644 index 0000000..3fc7fa3 --- /dev/null +++ b/WBM/features/teamStats.cs @@ -0,0 +1,15 @@ +using BepInEx.Configuration; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry showTeamStats; + private ConfigEntry showTeamStatsShortcut; + + private void toggleTeamStatsOnKeyPress() + { + if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; + } + } +} diff --git a/WBM/features/weaponStats.cs b/WBM/features/weaponStats.cs new file mode 100644 index 0000000..ac8e12d --- /dev/null +++ b/WBM/features/weaponStats.cs @@ -0,0 +1,15 @@ +using BepInEx.Configuration; + +namespace WBM +{ + partial class WBM + { + private ConfigEntry showWeaponStats; + private ConfigEntry showWeaponStatsShortcut; + + private void toggleWeaponStatsOnKeyPress() + { + if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; + } + } +} From 1e5ce5fda2c63728cc47cf6432bbf145b2777abc Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 12 Mar 2022 10:42:37 +0900 Subject: [PATCH 16/34] readability improvement --- WBM/features/WSServer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WBM/features/WSServer.cs b/WBM/features/WSServer.cs index ce592cb..232254d 100644 --- a/WBM/features/WSServer.cs +++ b/WBM/features/WSServer.cs @@ -8,9 +8,9 @@ namespace WBM private void setupWSSever() { - server = new WebSocketSharp.Server.WebSocketServer($"ws://127.0.0.1:{this.serverPort}"); - server.AddWebSocketService("/json"); - server.Start(); + this.server = new WebSocketSharp.Server.WebSocketServer($"ws://127.0.0.1:{this.serverPort}"); + this.server.AddWebSocketService("/json"); + this.server.Start(); } private void destroyWSSever() @@ -20,7 +20,7 @@ namespace WBM } } - public class WSJSONService : WebSocketSharp.Server.WebSocketBehavior + public class WSService : WebSocketSharp.Server.WebSocketBehavior { } } From b37cca33c44b894e3a1da002bc20b19a85d29326 Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 12 Mar 2022 11:37:36 +0900 Subject: [PATCH 17/34] improved function naming --- CONTRIBUTING.md | 18 ++++++++++++++++ WBM/WBM.cs | 23 ++++++++++---------- WBM/features/clearChat.cs | 4 ++-- WBM/features/clearMessage.cs | 2 +- WBM/features/killStreakSFX.cs | 5 +++++ WBM/features/oldGunSound.cs | 32 ++++++++++++++-------------- WBM/features/playerStats.cs | 5 +++++ WBM/features/shiftToCrouch.cs | 6 ++++++ WBM/features/showEloOnLeaderboard.cs | 9 ++++++-- WBM/features/showSquadServer.cs | 9 ++++++-- WBM/features/showTestingServer.cs | 9 ++++++-- WBM/features/teamStats.cs | 5 +++++ WBM/features/weaponStats.cs | 5 +++++ 13 files changed, 95 insertions(+), 37 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f4bc0e5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contribution guide + +## feature structure + +- All features should be contained in the `WBM/features` folder. + +### Feature functions + +- All features can have at most one function to be called in each event functions. +- feature function should have the following format: `` + + | Event function | feature function prefix | + | -------------: | :---------------------- | + | `Awake` | `init` | + | `Start` | `setup` | + | `Update` | `do` | + | `OnGUI` | `draw` | + | `onDestroy` | `destroy` | diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 8a9f831..35912e0 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -29,7 +29,7 @@ namespace WBM this.setupOldGunSound(); this.setupWSSever(); - this.setupClearChatOnKeyPress(); + this.setupClearChat(); this.setupShiftToCrouch(); this.setupShowEloOnLeaderBoard(); this.setupShowSquadServer(); @@ -47,19 +47,18 @@ namespace WBM this.moveUIOnKeyPress(); this.resetUIOnKeyPress(); this.toggleUIOnKeyPress(); - this.toggleKillStreakSFXOnKeyPress(); - this.togglePlayerStatsOnKeyPress(); - this.toggleWeaponStatsOnKeyPress(); - this.toggleTeamStatsOnKeyPress(); - this.toggleLeaderboardEloOnKeyPress(); - this.toggleShowSquadServerOnKeyPress(); - this.toggleTestingServerOnKeyPress(); - this.clearChatOnKeyPress(); - this.clearDeathLogOnKeyPress(); + this.doKillStreakSFX(); + this.doPlayerStats(); + this.doWeaponStats(); + this.doTeamStats(); + this.doLeaderboardElo(); + this.doShowSquadServer(); + this.doTestingServer(); + this.doClearChat(); + this.doclearMessage(); this.showConfigOnKeyPress(); - this.toggleShiftToCrouchOnKeyPress(); - this.crouchOnKeyPress(); + this.doShiftToCrouch(); } /// Called multiple times per frame in response to GUI events. diff --git a/WBM/features/clearChat.cs b/WBM/features/clearChat.cs index 4410453..df045a2 100644 --- a/WBM/features/clearChat.cs +++ b/WBM/features/clearChat.cs @@ -12,13 +12,13 @@ namespace WBM private ConfigEntry clearChatShortcut; - private void setupClearChatOnKeyPress() + private void setupClearChat() { this.drawChatMessageFuncRef = webguyType.GetMethod("EBDKFEJMEMB", bindFlags); this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift)); } - private void clearChatOnKeyPress() + private void doClearChat() { if (this.clearChatShortcut.Value.IsDown()) this.clearChat(); } diff --git a/WBM/features/clearMessage.cs b/WBM/features/clearMessage.cs index da2e57e..d3295d7 100644 --- a/WBM/features/clearMessage.cs +++ b/WBM/features/clearMessage.cs @@ -6,7 +6,7 @@ namespace WBM { private ConfigEntry clearDeathLogShortcut; - private void clearDeathLogOnKeyPress() + private void doclearMessage() { if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); } diff --git a/WBM/features/killStreakSFX.cs b/WBM/features/killStreakSFX.cs index 605cdb9..e749c7e 100644 --- a/WBM/features/killStreakSFX.cs +++ b/WBM/features/killStreakSFX.cs @@ -29,6 +29,11 @@ namespace WBM this.killStreakSFXShortcut = Config.Bind("Hotkeys", "kill streak sound effect", new KeyboardShortcut(KeyCode.F, KeyCode.RightShift)); } + private void doKillStreakSFX() + { + this.toggleKillStreakSFXOnKeyPress(); + } + private void toggleKillStreakSFXOnKeyPress() { if (this.killStreakSFXShortcut.Value.IsDown()) this.killStreakSFX.Value = !this.killStreakSFX.Value; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 6c432f6..516ea02 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -49,7 +49,22 @@ namespace WBM } private AudioClip newSMGSound; - private void useOldGunSoundChanged(object sender, EventArgs e) + private void setupOldGunSound() + { + this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags); + this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags); + this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags); + + this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); + this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange; + this.onOldGunSoundChange(new object(), new EventArgs()); + + this.oldGunSound = this.oldGunSoundRaw; + this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; + this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; + } + + private void onOldGunSoundChange(object sender, EventArgs e) { if (this.useOldGunSoundConf.Value) { @@ -62,20 +77,5 @@ namespace WBM this.SMGSoundRaw.ADCOCHNNCHM = this.newSMGSound; } } - - private void setupOldGunSound() - { - this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags); - this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags); - this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags); - - this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); - this.useOldGunSoundConf.SettingChanged += this.useOldGunSoundChanged; - this.useOldGunSoundChanged(new object(), new EventArgs()); - - this.oldGunSound = this.oldGunSoundRaw; - this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; - this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; - } } } diff --git a/WBM/features/playerStats.cs b/WBM/features/playerStats.cs index d99444c..438cf73 100644 --- a/WBM/features/playerStats.cs +++ b/WBM/features/playerStats.cs @@ -11,5 +11,10 @@ namespace WBM { if (this.showPlayerStatsShortcut.Value.IsDown()) this.showPlayerStats.Value = !this.showPlayerStats.Value; } + + private void doPlayerStats() + { + this.togglePlayerStatsOnKeyPress(); + } } } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index 7bb1541..12a84fe 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -15,6 +15,12 @@ namespace WBM this.shiftToCrouchShortcut = Config.Bind("Hotkeys", "shift to crouch", new KeyboardShortcut(KeyCode.C, KeyCode.RightShift)); } + private void doShiftToCrouch() + { + this.crouchOnKeyPress(); + this.toggleShiftToCrouchOnKeyPress(); + } + private void crouchOnKeyPress() { // Skip if this setting is not activated diff --git a/WBM/features/showEloOnLeaderboard.cs b/WBM/features/showEloOnLeaderboard.cs index 6c5d5ba..529d3cd 100644 --- a/WBM/features/showEloOnLeaderboard.cs +++ b/WBM/features/showEloOnLeaderboard.cs @@ -30,17 +30,22 @@ namespace WBM this.showEloOnLeaderboardRef = webguyType.GetField("KDOBENAOLLF", bindFlags); this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true); - this.showEloOnLeaderboard.SettingChanged += this.onShowEloOnLeaderboardChanged; + this.showEloOnLeaderboard.SettingChanged += this.onShowEloOnLeaderboardChange; this.showEloOnLeaderboardShortcut = Config.Bind("Hotkeys", "show Elo on leaderboard", new KeyboardShortcut(KeyCode.E, KeyCode.RightShift)); this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; } + private void doLeaderboardElo() + { + this.toggleLeaderboardEloOnKeyPress(); + } + private void toggleLeaderboardEloOnKeyPress() { if (this.showEloOnLeaderboardShortcut.Value.IsDown()) this.showEloOnLeaderboard.Value = !this.showEloOnLeaderboard.Value; } - private void onShowEloOnLeaderboardChanged(object sender, EventArgs e) + private void onShowEloOnLeaderboardChange(object sender, EventArgs e) { this.showEloOnLeaderboardRaw = this.showEloOnLeaderboard.Value; } diff --git a/WBM/features/showSquadServer.cs b/WBM/features/showSquadServer.cs index 28effe7..e734b08 100644 --- a/WBM/features/showSquadServer.cs +++ b/WBM/features/showSquadServer.cs @@ -30,17 +30,22 @@ namespace WBM this.showSquadServerRef = webguyType.GetField("PHPIBBCFKFI", bindFlags); this.showSquadServer = Config.Bind("Config", "show squad server", true); - this.showSquadServer.SettingChanged += this.onShowSquadServerChanged; + this.showSquadServer.SettingChanged += this.onShowSquadServerChange; this.showSquadServerShortcut = Config.Bind("Hotkeys", "show squad server", new KeyboardShortcut(KeyCode.S, KeyCode.RightShift)); this.showSquadServerRaw = this.showSquadServer.Value; } + private void doShowSquadServer() + { + this.toggleShowSquadServerOnKeyPress(); + } + private void toggleShowSquadServerOnKeyPress() { if (this.showSquadServerShortcut.Value.IsDown()) this.showSquadServer.Value = !this.showSquadServer.Value; } - private void onShowSquadServerChanged(object sender, EventArgs e) + private void onShowSquadServerChange(object sender, EventArgs e) { this.showSquadServerRaw = this.showSquadServer.Value; } diff --git a/WBM/features/showTestingServer.cs b/WBM/features/showTestingServer.cs index 16549b8..00f4b21 100644 --- a/WBM/features/showTestingServer.cs +++ b/WBM/features/showTestingServer.cs @@ -30,17 +30,22 @@ namespace WBM this.showTestingServerRef = webguyType.GetField("LHHEGFHLNJE", bindFlags); this.showTestingServer = Config.Bind("Config", "show testing server", true); - this.showTestingServer.SettingChanged += this.onShowTestingServerChanged; + this.showTestingServer.SettingChanged += this.onShowTestingServerChange; this.showTestingServerShortcut = Config.Bind("Hotkeys", "show testing server", new KeyboardShortcut(KeyCode.T, KeyCode.RightShift)); this.showTestingServerRaw = this.showTestingServer.Value; } + private void doTestingServer() + { + this.toggleTestingServerOnKeyPress(); + } + private void toggleTestingServerOnKeyPress() { if (this.showTestingServerShortcut.Value.IsDown()) this.showTestingServer.Value = !this.showTestingServer.Value; } - private void onShowTestingServerChanged(object sender, EventArgs e) + private void onShowTestingServerChange(object sender, EventArgs e) { this.showTestingServerRaw = this.showTestingServer.Value; } diff --git a/WBM/features/teamStats.cs b/WBM/features/teamStats.cs index 3fc7fa3..9625324 100644 --- a/WBM/features/teamStats.cs +++ b/WBM/features/teamStats.cs @@ -7,6 +7,11 @@ namespace WBM private ConfigEntry showTeamStats; private ConfigEntry showTeamStatsShortcut; + private void doTeamStats() + { + this.toggleTeamStatsOnKeyPress(); + } + private void toggleTeamStatsOnKeyPress() { if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; diff --git a/WBM/features/weaponStats.cs b/WBM/features/weaponStats.cs index ac8e12d..5bf73e4 100644 --- a/WBM/features/weaponStats.cs +++ b/WBM/features/weaponStats.cs @@ -7,6 +7,11 @@ namespace WBM private ConfigEntry showWeaponStats; private ConfigEntry showWeaponStatsShortcut; + private void doWeaponStats() + { + this.toggleWeaponStatsOnKeyPress(); + } + private void toggleWeaponStatsOnKeyPress() { if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; From fa37d4390b25d86b89306d5b44dd7f1cceff8659 Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 12 Mar 2022 20:28:48 +0900 Subject: [PATCH 18/34] improved project structure --- WBM/WBM.cs | 15 +---- WBM/features/core/core.cs | 8 +++ WBM/features/core/ui.cs | 118 +++--------------------------------- WBM/features/playerStats.cs | 33 ++++++++++ WBM/features/teamStats.cs | 57 +++++++++++++++++ WBM/features/weaponStats.cs | 28 +++++++++ 6 files changed, 138 insertions(+), 121 deletions(-) diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 35912e0..4fe9839 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -44,9 +44,8 @@ namespace WBM /// This function is called on each frame. private void Update() { - this.moveUIOnKeyPress(); - this.resetUIOnKeyPress(); - this.toggleUIOnKeyPress(); + this.doCore(); + this.doKillStreakSFX(); this.doPlayerStats(); this.doWeaponStats(); @@ -56,8 +55,6 @@ namespace WBM this.doTestingServer(); this.doClearChat(); this.doclearMessage(); - this.showConfigOnKeyPress(); - this.doShiftToCrouch(); } @@ -66,13 +63,7 @@ namespace WBM /// followed by a Layout and keyboard/mouse event for each input event. private void OnGUI() { - this.setupGUI(); - - if (this._showConfig) this.drawConfig(); - - if (!this.showGUI.Value) return; - - this.drawWBMVersion(); + this.drawCoreUI(); // don't draw if player is not in a games if (this.data.localPlayerIndex < 0) return; diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index efd8708..ba9c74d 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -280,5 +280,13 @@ namespace WBM ); } } + + private void doCore() + { + this.moveUIOnKeyPress(); + this.resetUIOnKeyPress(); + this.toggleUIOnKeyPress(); + this.showConfigOnKeyPress(); + } } } diff --git a/WBM/features/core/ui.cs b/WBM/features/core/ui.cs index 34f9f7c..8bc56f0 100644 --- a/WBM/features/core/ui.cs +++ b/WBM/features/core/ui.cs @@ -15,14 +15,20 @@ namespace WBM private ConfigEntry GUIOffsetY; private ConfigEntry resetGUIShortcut; - private void setupGUI() + private void drawCoreUI() { GUI.skin.box.fontSize = 15; GUI.skin.label.fontSize = 15; GUI.skin.label.wordWrap = false; + + if (this._showConfig) this.showConfig(); + + if (!this.showGUI.Value) return; + + this.showWBMVersion(); } - private void drawConfig() + private void showConfig() { GUI.Box( new Rect(Screen.width - 370, 60, 360, 370), $@"Configuration @@ -47,7 +53,7 @@ kill streak SFX: {this.killStreakSFX.Value} ({this.killStreakSFXShortcut.Value}) ); } - private void drawWBMVersion() + private void showWBMVersion() { GUI.Box( new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60), @@ -57,112 +63,6 @@ v1.7.1.0" ); } - private void drawPlayerStats() - { - if (!this.showPlayerStats.Value) return; - - try - { - string killsEloDeltaSign = this.myPlayerStats.killsEloDelta >= 0 ? "+" : ""; - string gamesEloDeltaSign = this.myPlayerStats.gamesEloDelta >= 0 ? "+" : ""; - - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 65, 220, 180), - $@"Player stats - -KDR: {Util.formatKDR(this.myPlayerStats.kills, this.myPlayerStats.deaths)} -kills Elo: {this.myPlayerStats.killsElo} {killsEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.killsEloDelta / 10)} -games Elo: {this.myPlayerStats.gamesElo} {gamesEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.gamesEloDelta / 10)} -Damage dealt: {this.myPlayerStats.damage} -Longest Kill: {this.myPlayerStats.longestKill}m -Points: {this.myPlayerStats.points} -Headshots: {this.myPlayerStats.headShots} -Kill streak: {this.killStreak}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } - - private void drawWeaponStats() - { - - if (!this.showWeaponStats.Value) return; - - try - { - GUI.Box( - new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 250, 230, 130), - $@"Weapon stats - -fire Timer: {String.Format("{0:0.00}", Util.getGunFireTimer(this.personGun))}s (max: {String.Format("{0:0.00}", Util.getGunFireRate(this.personGun))}s) -reload Timer: {Util.getGunReloadTimer(this.personGun)} -cooldown Timer: {Util.getGunCooldownTimer(this.personGun)} -speed: {Util.getGunFireVelocity(this.personGun)} -zoom: {Util.getGunZoom(this.personGun)}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } - - private void drawTeamStats() - { - if (!this.showTeamStats.Value) return; - - try - { - string teamNames = "Nickname\n\n"; - string teamKDR = "KDR\n\n"; - string teamPoints = "pts\n\n"; - string teamDamage = "Damage\n\n"; - - int teamTotalKills = 0; - int teamTotalDeaths = 0; - int teamTotalDamage = 0; - - for (int i = 0; i < this.data.playerStatsArray.Length; i++) - { - Data.PlayerStatsStruct stat = this.data.playerStatsArray[i]; - - // if player is not a bot and if player is in my team - if ((stat.killsElo != 0) && (this.teamList[i] == this.myTeam)) - { - teamNames += $"{this.data.nickList[i]}\n"; - teamKDR += $"{Util.formatKDR(stat.kills, stat.deaths)}\n"; - teamPoints += $"{stat.points}\n"; - teamDamage += $"{stat.damage}\n"; - - teamTotalKills += stat.kills; - teamTotalDeaths += stat.deaths; - teamTotalDamage += stat.damage; - } - } - - int teamStatOffset = (this.data.gameState == Data.GameStateEnum.Results) ? 280 : 0; - GUI.Box(new Rect(Screen.width - 320, 445 + teamStatOffset, 300, 270), "Team Stats"); - GUI.Label(new Rect(Screen.width - 315, 470 + teamStatOffset, 105, 190), teamNames); - GUI.Label(new Rect(Screen.width - 200, 470 + teamStatOffset, 40, 190), teamKDR); - GUI.Label(new Rect(Screen.width - 150, 470 + teamStatOffset, 40, 190), teamPoints); - GUI.Label(new Rect(Screen.width - 100, 470 + teamStatOffset, 70, 190), teamDamage); - - GUI.Label( - new Rect(Screen.width - 315, 655 + teamStatOffset, 300, 55), - $@"total damage: {teamTotalDamage} -total deaths: {teamTotalDeaths} -total kills: {teamTotalKills}" - ); - } - catch (Exception e) - { - Logger.LogError(e); - } - } - private void moveUIOnKeyPress() { if (Input.GetKey(KeyCode.LeftControl)) diff --git a/WBM/features/playerStats.cs b/WBM/features/playerStats.cs index 438cf73..e9aa40b 100644 --- a/WBM/features/playerStats.cs +++ b/WBM/features/playerStats.cs @@ -1,5 +1,9 @@ using BepInEx.Configuration; +using UnityEngine; + +using System; + namespace WBM { partial class WBM @@ -16,5 +20,34 @@ namespace WBM { this.togglePlayerStatsOnKeyPress(); } + + private void drawPlayerStats() + { + if (!this.showPlayerStats.Value) return; + + try + { + string killsEloDeltaSign = this.myPlayerStats.killsEloDelta >= 0 ? "+" : ""; + string gamesEloDeltaSign = this.myPlayerStats.gamesEloDelta >= 0 ? "+" : ""; + + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 65, 220, 180), + $@"Player stats + +KDR: {Util.formatKDR(this.myPlayerStats.kills, this.myPlayerStats.deaths)} +kills Elo: {this.myPlayerStats.killsElo} {killsEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.killsEloDelta / 10)} +games Elo: {this.myPlayerStats.gamesElo} {gamesEloDeltaSign}{Util.formatDecimal((float)this.myPlayerStats.gamesEloDelta / 10)} +Damage dealt: {this.myPlayerStats.damage} +Longest Kill: {this.myPlayerStats.longestKill}m +Points: {this.myPlayerStats.points} +Headshots: {this.myPlayerStats.headShots} +Kill streak: {this.killStreak}" + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } } } diff --git a/WBM/features/teamStats.cs b/WBM/features/teamStats.cs index 9625324..153c1c5 100644 --- a/WBM/features/teamStats.cs +++ b/WBM/features/teamStats.cs @@ -1,5 +1,9 @@ using BepInEx.Configuration; +using UnityEngine; + +using System; + namespace WBM { partial class WBM @@ -12,6 +16,59 @@ namespace WBM this.toggleTeamStatsOnKeyPress(); } + private void drawTeamStats() + { + if (!this.showTeamStats.Value) return; + + try + { + string teamNames = "Nickname\n\n"; + string teamKDR = "KDR\n\n"; + string teamPoints = "pts\n\n"; + string teamDamage = "Damage\n\n"; + + int teamTotalKills = 0; + int teamTotalDeaths = 0; + int teamTotalDamage = 0; + + for (int i = 0; i < this.data.playerStatsArray.Length; i++) + { + Data.PlayerStatsStruct stat = this.data.playerStatsArray[i]; + + // if player is not a bot and if player is in my team + if ((stat.killsElo != 0) && (this.teamList[i] == this.myTeam)) + { + teamNames += $"{this.data.nickList[i]}\n"; + teamKDR += $"{Util.formatKDR(stat.kills, stat.deaths)}\n"; + teamPoints += $"{stat.points}\n"; + teamDamage += $"{stat.damage}\n"; + + teamTotalKills += stat.kills; + teamTotalDeaths += stat.deaths; + teamTotalDamage += stat.damage; + } + } + + int teamStatOffset = (this.data.gameState == Data.GameStateEnum.Results) ? 280 : 0; + GUI.Box(new Rect(Screen.width - 320, 445 + teamStatOffset, 300, 270), "Team Stats"); + GUI.Label(new Rect(Screen.width - 315, 470 + teamStatOffset, 105, 190), teamNames); + GUI.Label(new Rect(Screen.width - 200, 470 + teamStatOffset, 40, 190), teamKDR); + GUI.Label(new Rect(Screen.width - 150, 470 + teamStatOffset, 40, 190), teamPoints); + GUI.Label(new Rect(Screen.width - 100, 470 + teamStatOffset, 70, 190), teamDamage); + + GUI.Label( + new Rect(Screen.width - 315, 655 + teamStatOffset, 300, 55), + $@"total damage: {teamTotalDamage} +total deaths: {teamTotalDeaths} +total kills: {teamTotalKills}" + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } + private void toggleTeamStatsOnKeyPress() { if (this.showTeamStatsShortcut.Value.IsDown()) this.showTeamStats.Value = !this.showTeamStats.Value; diff --git a/WBM/features/weaponStats.cs b/WBM/features/weaponStats.cs index 5bf73e4..0d7f9d5 100644 --- a/WBM/features/weaponStats.cs +++ b/WBM/features/weaponStats.cs @@ -1,5 +1,9 @@ using BepInEx.Configuration; +using UnityEngine; + +using System; + namespace WBM { partial class WBM @@ -12,6 +16,30 @@ namespace WBM this.toggleWeaponStatsOnKeyPress(); } + private void drawWeaponStats() + { + + if (!this.showWeaponStats.Value) return; + + try + { + GUI.Box( + new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value + 250, 230, 130), + $@"Weapon stats + +fire Timer: {String.Format("{0:0.00}", Util.getGunFireTimer(this.personGun))}s (max: {String.Format("{0:0.00}", Util.getGunFireRate(this.personGun))}s) +reload Timer: {Util.getGunReloadTimer(this.personGun)} +cooldown Timer: {Util.getGunCooldownTimer(this.personGun)} +speed: {Util.getGunFireVelocity(this.personGun)} +zoom: {Util.getGunZoom(this.personGun)}" + ); + } + catch (Exception e) + { + Logger.LogError(e); + } + } + private void toggleWeaponStatsOnKeyPress() { if (this.showWeaponStatsShortcut.Value.IsDown()) this.showWeaponStats.Value = !this.showWeaponStats.Value; From 1fb7e162df884cdfb5215a847dce2d34499b73b0 Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 16 Mar 2022 11:23:11 +0900 Subject: [PATCH 19/34] README tags update - removed license tag - added "what's this?" tag --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 967ff03..c31fa44 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # [War Brokers Mods (WBM)](https://github.com/War-Brokers-Mods/WBM) -![License: MIT](https://img.shields.io/github/license/War-Brokers-Mods/WBM?style=for-the-badge&color=blue) +[![what's this?](https://img.shields.io/badge/what's_this%3F-grey?style=for-the-badge)](https://developomp.com/portfolio/wbm) [![discord invite](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/aQqamSCUcS)

@@ -267,6 +267,10 @@ If you have a cool idea that will make WBM better, or if WBM misbehaves in any w ## Special thanks - [l3lackShark](https://github.com/l3lackShark) for [inspiration](https://github.com/l3lackShark/gosumemory) +- REKT (discord: `REKT#7777`, 710249221609226320) for: + - fps improvement by modifying `boot.config` + - shader rework + - video tutorial ## License From f8418e36e364f407f9ee1ef89c638dd27236035e Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 18 Mar 2022 13:05:36 +0900 Subject: [PATCH 20/34] v1.8.0.0 update - fixed mod to work in v460 --- WBM/Data.cs | 33 --------------- WBM/Util.cs | 25 +++++------ WBM/WBM.cs | 2 +- WBM/features/clearChat.cs | 2 +- WBM/features/core/core.cs | 62 ++++++++++++---------------- WBM/features/core/ui.cs | 4 +- WBM/features/fpsUnlock.cs | 15 +++---- WBM/features/oldGunSound.cs | 28 ++++++------- WBM/features/shiftToCrouch.cs | 3 +- WBM/features/showEloOnLeaderboard.cs | 2 +- WBM/features/showSquadServer.cs | 2 +- WBM/features/showTestingServer.cs | 2 +- WBM/features/weaponStats.cs | 1 - 13 files changed, 66 insertions(+), 115 deletions(-) diff --git a/WBM/Data.cs b/WBM/Data.cs index 7fe2e2e..64b138a 100644 --- a/WBM/Data.cs +++ b/WBM/Data.cs @@ -11,19 +11,6 @@ namespace WBM Blue } - private enum QuestTypeEnum - { - Kill, - Damage, - Package, - Missile, - Capture, - Play, - Travel, - Assist, - Finish - } - public struct PlayerStatsStruct { public int kills; @@ -40,26 +27,6 @@ namespace WBM public int killsEloDelta; } - public enum GameModeEnum - { - DeathMatch, - DemolitionDerby, - ProtectLeader, - ResourceCapture, - Race, - TankBattle, - TankKing, - CapturePoint, - VehicleEscort, - PackageDrop, - ScudLaunch, - BattleRoyale, - Competitive, - LobbyCompetitive, - LobbyBR, - Count - } - public enum GameStateEnum { WaitingOnPlayers, diff --git a/WBM/Util.cs b/WBM/Util.cs index f1f4809..4a57f83 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -45,34 +45,29 @@ namespace WBM return String.Format("{0:0.0}", number); } - public static float getGunZoom(NGNJNHEFLHB gun) + public static float getGunZoom(CGMPHDEJMIG gun) { - return gun.ADLGCCMDNED; + return gun.EGDGNFIOIPO; } - public static float getGunFireTimer(NGNJNHEFLHB gun) + public static float getGunFireTimer(CGMPHDEJMIG gun) { - return gun.MAKBOBOAAHG; + return gun.ALHAPEJFBMM; } - public static float getGunFireVelocity(NGNJNHEFLHB gun) + public static float getGunFireVelocity(CGMPHDEJMIG gun) { - return gun.HOIKHOJJBOG; + return gun.CPKKPKBEDGG; } - public static float getGunFireRate(NGNJNHEFLHB gun) + public static float getGunFireRate(CGMPHDEJMIG gun) { - return gun.IHEEIAIOABG; + return gun.DPACFNHLIKA; } - public static float getGunReloadTimer(NGNJNHEFLHB gun) + public static float getGunReloadTimer(CGMPHDEJMIG gun) { - return gun.NBLDKJAKFIB; - } - - public static float getGunCooldownTimer(NGNJNHEFLHB gun) - { - return gun.LBOBALHJBDM; + return gun.PMLOOHEKAGB; } } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 4fe9839..97cfe9e 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -8,7 +8,7 @@ namespace WBM /// are event functions that gets called on specific stages of the component's lifecycle. /// More information can be found in the unity's documentation page. /// - [BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.7.1.0")] + [BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.8.0.0")] public partial class WBM : BaseUnityPlugin { /// This function is called as soon as the component becomes active. diff --git a/WBM/features/clearChat.cs b/WBM/features/clearChat.cs index df045a2..61dea4b 100644 --- a/WBM/features/clearChat.cs +++ b/WBM/features/clearChat.cs @@ -14,7 +14,7 @@ namespace WBM private void setupClearChat() { - this.drawChatMessageFuncRef = webguyType.GetMethod("EBDKFEJMEMB", bindFlags); + this.drawChatMessageFuncRef = webguyType.GetMethod("MEDCOGOAHEN", bindFlags); this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift)); } diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index ba9c74d..b5247ee 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -100,27 +100,27 @@ namespace WBM { get { - PDEMAFHPNBD[] rawPlayerStatsArray = (PDEMAFHPNBD[])this.playerStatsArrayRef.GetValue(this.webguy); + IACNKEGEEAG[] rawPlayerStatsArray = (IACNKEGEEAG[])this.playerStatsArrayRef.GetValue(this.webguy); Data.PlayerStatsStruct[] result = new Data.PlayerStatsStruct[rawPlayerStatsArray.Length]; for (int i = 0; i < rawPlayerStatsArray.Length; i++) { - PDEMAFHPNBD currentlyParsing = rawPlayerStatsArray[i]; + IACNKEGEEAG currentlyParsing = rawPlayerStatsArray[i]; result[i] = new Data.PlayerStatsStruct { - kills = currentlyParsing.CFMGCOGACPA, - deaths = currentlyParsing.GABHLIIJHBJ, - damage = currentlyParsing.CECNBFABADA, - longestKill = currentlyParsing.GDFIBEEKMJA, - points = currentlyParsing.HNHFAABONHO, - headShots = currentlyParsing.GJLLOFLEHHD, - vote = currentlyParsing.JCBAKMONPGC, - mapVote = currentlyParsing.BOFANBBCNOH, - gamesElo = currentlyParsing.IBHFIBAOKCB, - gamesEloDelta = currentlyParsing.JMGOHGIGLPI, - killsElo = currentlyParsing.GBIABKEEFOC, - killsEloDelta = currentlyParsing.JAAKOCPIGJL, + kills = currentlyParsing.IOOFDGPKMFK, + deaths = currentlyParsing.FOKKPNMGKDP, + damage = currentlyParsing.HABIHPNAEHO, + longestKill = currentlyParsing.CEKBGCGKILN, + points = currentlyParsing.FOBEJABPFJJ, + headShots = currentlyParsing.NPMFKNDMOHB, + vote = currentlyParsing.DGKDCINHCEA, + mapVote = currentlyParsing.OCEJJALAMJI, + gamesElo = currentlyParsing.EFMOAKCIAJP, + gamesEloDelta = currentlyParsing.AAGINDPBBJJ, + killsElo = currentlyParsing.FIEJIAFBDJP, + killsEloDelta = currentlyParsing.MBJFMGKHFPM, }; } @@ -132,15 +132,6 @@ namespace WBM private int prevKills = 0; private int killCountBeforeDeath = 0; - private FieldInfo currentAreaRef; - private int currentAreaRaw - { - get - { - return (int)this.currentAreaRef.GetValue(this.webguy); - } - } - private FieldInfo teamListRef; private Data.TeamEnum[] teamListRaw { @@ -162,14 +153,14 @@ namespace WBM } private FieldInfo personGunRef; - private NGNJNHEFLHB personGunRaw + private CGMPHDEJMIG personGunRaw { get { - return (NGNJNHEFLHB)this.personGunRef.GetValue(this.webguy); + return (CGMPHDEJMIG)this.personGunRef.GetValue(this.webguy); } } - private NGNJNHEFLHB personGun; + private CGMPHDEJMIG personGun; private FieldInfo nickListRef; private string[] nickListRaw @@ -224,17 +215,16 @@ namespace WBM // References // - this.playerStatsArrayRef = webguyType.GetField("NAFCGDLLFJC", bindFlags); - this.currentAreaRef = webguyType.GetField("FLJLJNLDFAM", bindFlags); - this.teamListRef = webguyType.GetField("MNEJLPDLMBH", bindFlags); - this.localPlayerIndexRef = webguyType.GetField("ALEJJPEPFOG", bindFlags); - this.personGunRef = webguyType.GetField("IEGLIMLBDPH", bindFlags); - this.nickListRef = webguyType.GetField("CLLDJOMEKIP", bindFlags); - this.gameStateRef = webguyType.GetField("MCGMEPGBCKK", bindFlags); - this.chatListRef = webguyType.GetField("MOOBJBOCANE", bindFlags); + this.playerStatsArrayRef = webguyType.GetField("FLDPBAEABJG", bindFlags); + this.teamListRef = webguyType.GetField("BFMPAFOBMKP", bindFlags); + this.localPlayerIndexRef = webguyType.GetField("AEILDFPIIGG", bindFlags); + this.personGunRef = webguyType.GetField("IDKKPOAJPMC", bindFlags); + this.nickListRef = webguyType.GetField("MOOLDAMLJLO", bindFlags); + this.gameStateRef = webguyType.GetField("NKADGEOAKKB", bindFlags); + this.chatListRef = webguyType.GetField("PODNOOGFEFE", bindFlags); - this.addMessageFuncRef = webguyType.GetMethod("NBPKLIOLLEI", bindFlags); - this.clearMessagesFuncRef = webguyType.GetMethod("IOCHBBACKFA", bindFlags); + this.addMessageFuncRef = webguyType.GetMethod("NNLPKKPEBOF", bindFlags); + this.clearMessagesFuncRef = webguyType.GetMethod("EIHHBPDPNDF", bindFlags); // // Configurations diff --git a/WBM/features/core/ui.cs b/WBM/features/core/ui.cs index 8bc56f0..c89aba8 100644 --- a/WBM/features/core/ui.cs +++ b/WBM/features/core/ui.cs @@ -2,8 +2,6 @@ using BepInEx.Configuration; using UnityEngine; -using System; - namespace WBM { partial class WBM @@ -59,7 +57,7 @@ kill streak SFX: {this.killStreakSFX.Value} ({this.killStreakSFXShortcut.Value}) new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60), @"War Brokers Mods Made by [LP] POMP -v1.7.1.0" +v1.8.0.0" ); } diff --git a/WBM/features/fpsUnlock.cs b/WBM/features/fpsUnlock.cs index 4bdfd8b..66df397 100644 --- a/WBM/features/fpsUnlock.cs +++ b/WBM/features/fpsUnlock.cs @@ -5,8 +5,9 @@ using UnityEngine.UI; namespace WBM { + /// patch for onFPSChanged function [HarmonyPatch(typeof(webguy))] - [HarmonyPatch("FHBMKCDMGII")] + [HarmonyPatch("LIJHKNOLECJ")] class FPSSliderPatch { private static int defaultTargetFrameRate = -1; @@ -14,21 +15,21 @@ namespace WBM private static GameObject fpsSliderTextObj = GameObject.Find("fpsSlideFuckText"); private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); - private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess("CLLNACDIPHE"); + private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess("KLAKEIFEFMH"); - static bool Prefix(webguy __instance, float JKNNNLEEIAO) + static bool Prefix(webguy __instance, float EJPANIOHKEC) { - fpsValueRef(__instance) = JKNNNLEEIAO; - int targetFrameRate = (int)(JKNNNLEEIAO * maxTargetFrameRate); + fpsValueRef(__instance) = EJPANIOHKEC; + int targetFrameRate = (int)(EJPANIOHKEC * maxTargetFrameRate); if (targetFrameRate == 0) { - ((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, __instance.HNDAMJPNGAE("Disabled")); + ((InfernalBehaviour)__instance).NKANMPOLMOA(fpsSliderTextObj, __instance.HOLCODAHDKF("Disabled")); targetFrameRate = defaultTargetFrameRate; } else { - ((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, targetFrameRate.ToString()); + ((InfernalBehaviour)__instance).NKANMPOLMOA(fpsSliderTextObj, targetFrameRate.ToString()); } if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 516ea02..a5010f7 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -16,17 +16,17 @@ namespace WBM { get { - return ((LPJKBALIFCC)this.oldGunSoundRef.GetValue(this.webguy)).ADCOCHNNCHM; + return ((HKPCKNFOBNA)this.oldGunSoundRef.GetValue(this.webguy)).DDKAHAAKKME; } } private AudioClip oldGunSound; private FieldInfo AKSoundRef; - private LPJKBALIFCC AKSoundRaw + private HKPCKNFOBNA AKSoundRaw { get { - return (LPJKBALIFCC)this.AKSoundRef.GetValue(this.webguy); + return (HKPCKNFOBNA)this.AKSoundRef.GetValue(this.webguy); } set { @@ -36,11 +36,11 @@ namespace WBM private AudioClip newAKSound; private FieldInfo SMGSoundRef; - private LPJKBALIFCC SMGSoundRaw + private HKPCKNFOBNA SMGSoundRaw { get { - return (LPJKBALIFCC)this.SMGSoundRef.GetValue(this.webguy); + return (HKPCKNFOBNA)this.SMGSoundRef.GetValue(this.webguy); } set { @@ -51,30 +51,30 @@ namespace WBM private void setupOldGunSound() { - this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags); - this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags); - this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags); + this.oldGunSoundRef = webguyType.GetField("ICMCDLNEIAI", bindFlags); + this.AKSoundRef = webguyType.GetField("DGEJAAPKEAD", bindFlags); + this.SMGSoundRef = webguyType.GetField("OFAALIJFKEI", bindFlags); this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange; this.onOldGunSoundChange(new object(), new EventArgs()); this.oldGunSound = this.oldGunSoundRaw; - this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM; - this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM; + this.newAKSound = this.AKSoundRaw.DDKAHAAKKME; + this.newSMGSound = this.SMGSoundRaw.DDKAHAAKKME; } private void onOldGunSoundChange(object sender, EventArgs e) { if (this.useOldGunSoundConf.Value) { - this.AKSoundRaw.ADCOCHNNCHM = this.oldGunSound; - this.SMGSoundRaw.ADCOCHNNCHM = this.oldGunSound; + this.AKSoundRaw.DDKAHAAKKME = this.oldGunSound; + this.SMGSoundRaw.DDKAHAAKKME = this.oldGunSound; } else { - this.AKSoundRaw.ADCOCHNNCHM = this.newAKSound; - this.SMGSoundRaw.ADCOCHNNCHM = this.newSMGSound; + this.AKSoundRaw.DDKAHAAKKME = this.newAKSound; + this.SMGSoundRaw.DDKAHAAKKME = this.newSMGSound; } } } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index 12a84fe..36a5f4a 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -40,7 +40,8 @@ namespace WBM private void setCrouchState(bool crouchState) { - OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = crouchState; + // CFPSGuy.inSt.isCrouching + GENPAICHGGE.DMBBKHNIMOK.FHJOPAFOHLA = crouchState; } } } diff --git a/WBM/features/showEloOnLeaderboard.cs b/WBM/features/showEloOnLeaderboard.cs index 529d3cd..6dfefb1 100644 --- a/WBM/features/showEloOnLeaderboard.cs +++ b/WBM/features/showEloOnLeaderboard.cs @@ -27,7 +27,7 @@ namespace WBM private void setupShowEloOnLeaderBoard() { - this.showEloOnLeaderboardRef = webguyType.GetField("KDOBENAOLLF", bindFlags); + this.showEloOnLeaderboardRef = webguyType.GetField("BCFHKALFBLB", bindFlags); this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true); this.showEloOnLeaderboard.SettingChanged += this.onShowEloOnLeaderboardChange; diff --git a/WBM/features/showSquadServer.cs b/WBM/features/showSquadServer.cs index e734b08..2b97622 100644 --- a/WBM/features/showSquadServer.cs +++ b/WBM/features/showSquadServer.cs @@ -27,7 +27,7 @@ namespace WBM private void setupShowSquadServer() { - this.showSquadServerRef = webguyType.GetField("PHPIBBCFKFI", bindFlags); + this.showSquadServerRef = webguyType.GetField("IKOJAEHBIJI", bindFlags); this.showSquadServer = Config.Bind("Config", "show squad server", true); this.showSquadServer.SettingChanged += this.onShowSquadServerChange; diff --git a/WBM/features/showTestingServer.cs b/WBM/features/showTestingServer.cs index 00f4b21..f1c5410 100644 --- a/WBM/features/showTestingServer.cs +++ b/WBM/features/showTestingServer.cs @@ -27,7 +27,7 @@ namespace WBM private void setupShowTestingServer() { - this.showTestingServerRef = webguyType.GetField("LHHEGFHLNJE", bindFlags); + this.showTestingServerRef = webguyType.GetField("CCECDEDJELJ", bindFlags); this.showTestingServer = Config.Bind("Config", "show testing server", true); this.showTestingServer.SettingChanged += this.onShowTestingServerChange; diff --git a/WBM/features/weaponStats.cs b/WBM/features/weaponStats.cs index 0d7f9d5..e9a34e5 100644 --- a/WBM/features/weaponStats.cs +++ b/WBM/features/weaponStats.cs @@ -29,7 +29,6 @@ namespace WBM fire Timer: {String.Format("{0:0.00}", Util.getGunFireTimer(this.personGun))}s (max: {String.Format("{0:0.00}", Util.getGunFireRate(this.personGun))}s) reload Timer: {Util.getGunReloadTimer(this.personGun)} -cooldown Timer: {Util.getGunCooldownTimer(this.personGun)} speed: {Util.getGunFireVelocity(this.personGun)} zoom: {Util.getGunZoom(this.personGun)}" ); From 854cf56bce6b65decfb7073e417054741d90d85e Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 18 Mar 2022 13:32:57 +0900 Subject: [PATCH 21/34] added video tutorial link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c31fa44..a43442d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![what's this?](https://img.shields.io/badge/what's_this%3F-grey?style=for-the-badge)](https://developomp.com/portfolio/wbm) [![discord invite](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/aQqamSCUcS) +[![video tutorial](https://img.shields.io/badge/video_tutorial-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/watch?v=ZBE3nVvHwF8&t=64s)

IF YOU USE THIS TO DEVELOP HACKS YOUR MOM IS GAY. From 5df7dca06faf2817e18c028525e82c53f52d3894 Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 18 Mar 2022 20:52:43 +0900 Subject: [PATCH 22/34] improved code readability - added mangled name dictionary - added class alias --- WBM/features/oldGunSound.cs | 18 ++++++++++-------- WBM/mangledNames.cs | 12 ++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 WBM/mangledNames.cs diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index a5010f7..0be8a25 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -5,6 +5,8 @@ using UnityEngine; using System; using System.Reflection; +using CAudioClip = HKPCKNFOBNA; + namespace WBM { public partial class WBM @@ -16,17 +18,17 @@ namespace WBM { get { - return ((HKPCKNFOBNA)this.oldGunSoundRef.GetValue(this.webguy)).DDKAHAAKKME; + return ((CAudioClip)this.oldGunSoundRef.GetValue(this.webguy)).DDKAHAAKKME; } } private AudioClip oldGunSound; private FieldInfo AKSoundRef; - private HKPCKNFOBNA AKSoundRaw + private CAudioClip AKSoundRaw { get { - return (HKPCKNFOBNA)this.AKSoundRef.GetValue(this.webguy); + return (CAudioClip)this.AKSoundRef.GetValue(this.webguy); } set { @@ -36,11 +38,11 @@ namespace WBM private AudioClip newAKSound; private FieldInfo SMGSoundRef; - private HKPCKNFOBNA SMGSoundRaw + private CAudioClip SMGSoundRaw { get { - return (HKPCKNFOBNA)this.SMGSoundRef.GetValue(this.webguy); + return (CAudioClip)this.SMGSoundRef.GetValue(this.webguy); } set { @@ -51,9 +53,9 @@ namespace WBM private void setupOldGunSound() { - this.oldGunSoundRef = webguyType.GetField("ICMCDLNEIAI", bindFlags); - this.AKSoundRef = webguyType.GetField("DGEJAAPKEAD", bindFlags); - this.SMGSoundRef = webguyType.GetField("OFAALIJFKEI", bindFlags); + this.oldGunSoundRef = webguyType.GetField(MangledNames.gunShotClip, bindFlags); + this.AKSoundRef = webguyType.GetField(MangledNames.AKRifleShotClip, bindFlags); + this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags); this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange; diff --git a/WBM/mangledNames.cs b/WBM/mangledNames.cs new file mode 100644 index 0000000..814d741 --- /dev/null +++ b/WBM/mangledNames.cs @@ -0,0 +1,12 @@ +/// This file contains all information related to matching +/// mangles names to something more readable + +namespace WBM +{ + public static class MangledNames + { + public static readonly string gunShotClip = "ICMCDLNEIAI"; + public static readonly string AKRifleShotClip = "DGEJAAPKEAD"; + public static readonly string SMGShotClip = "OFAALIJFKEI"; + } +} From d823e55e920675a627e87340febfd697f071ddfd Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 19 Mar 2022 11:11:19 +0900 Subject: [PATCH 23/34] v1.9.0.0 update - made it work in v461 - improved project structure --- WBM/Util.cs | 26 ++++++++----- WBM/WBM.cs | 6 ++- WBM/features/clearChat.cs | 2 +- WBM/features/clearMessage.cs | 9 +++++ WBM/features/core/core.cs | 57 ++++++++++++++-------------- WBM/features/core/ui.cs | 4 +- WBM/features/fpsUnlock.cs | 14 +++---- WBM/features/oldGunSound.cs | 26 ++++++------- WBM/features/shiftToCrouch.cs | 3 +- WBM/features/showEloOnLeaderboard.cs | 2 +- WBM/features/showSquadServer.cs | 2 +- WBM/features/showTestingServer.cs | 2 +- WBM/mangledNames.cs | 30 +++++++++++++-- 13 files changed, 112 insertions(+), 71 deletions(-) diff --git a/WBM/Util.cs b/WBM/Util.cs index 4a57f83..415b081 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -6,6 +6,7 @@ using System.Text; using System.IO; using System.Threading.Tasks; using System.Runtime.Serialization.Json; +using CPersonGun = LELHDOPKMBE; namespace WBM { @@ -45,29 +46,34 @@ namespace WBM return String.Format("{0:0.0}", number); } - public static float getGunZoom(CGMPHDEJMIG gun) + public static float getGunZoom(CPersonGun gun) { - return gun.EGDGNFIOIPO; + // CPersonGun.cameraZoom + return gun.CAAABKHHGLM; } - public static float getGunFireTimer(CGMPHDEJMIG gun) + public static float getGunFireTimer(CPersonGun gun) { - return gun.ALHAPEJFBMM; + // CPersonGun.fireTimer + return gun.HDDNCAICDOJ; } - public static float getGunFireVelocity(CGMPHDEJMIG gun) + public static float getGunFireVelocity(CPersonGun gun) { - return gun.CPKKPKBEDGG; + // CPersonGun.fireVel + return gun.IMNMEFPBAAM; } - public static float getGunFireRate(CGMPHDEJMIG gun) + public static float getGunFireRate(CPersonGun gun) { - return gun.DPACFNHLIKA; + // CPersonGun.fireRate + return gun.LCDDGLKGKCO; } - public static float getGunReloadTimer(CGMPHDEJMIG gun) + public static float getGunReloadTimer(CPersonGun gun) { - return gun.PMLOOHEKAGB; + // CPersonGun.reloadTimer + return gun.ILBBFNBJJKI; } } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 97cfe9e..0aaff02 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -8,9 +8,13 @@ namespace WBM /// are event functions that gets called on specific stages of the component's lifecycle. /// More information can be found in the unity's documentation page. /// - [BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.8.0.0")] + [BepInPlugin(WBM.programID, WBM.programName, WBM.programVersion)] public partial class WBM : BaseUnityPlugin { + public const string programID = "com.developomp.wbm"; + public const string programName = "War Brokers Mods"; + public const string programVersion = "1.9.0.0"; + /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. private void Awake() diff --git a/WBM/features/clearChat.cs b/WBM/features/clearChat.cs index 61dea4b..13d317d 100644 --- a/WBM/features/clearChat.cs +++ b/WBM/features/clearChat.cs @@ -14,7 +14,7 @@ namespace WBM private void setupClearChat() { - this.drawChatMessageFuncRef = webguyType.GetMethod("MEDCOGOAHEN", bindFlags); + this.drawChatMessageFuncRef = webguyType.GetMethod(MangledNames.drawChatMessage, bindFlags); this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift)); } diff --git a/WBM/features/clearMessage.cs b/WBM/features/clearMessage.cs index d3295d7..1021970 100644 --- a/WBM/features/clearMessage.cs +++ b/WBM/features/clearMessage.cs @@ -1,11 +1,20 @@ using BepInEx.Configuration; +using System.Reflection; + namespace WBM { partial class WBM { private ConfigEntry clearDeathLogShortcut; + private MethodInfo clearMessagesFuncRef; + + private void setupClearMessage() + { + this.clearMessagesFuncRef = webguyType.GetMethod(MangledNames.clearMessages, bindFlags); + } + private void doclearMessage() { if (this.clearDeathLogShortcut.Value.IsDown()) this.clearMessagesFuncRef.Invoke(this.webguy, new object[] { }); diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index b5247ee..47a0cb8 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -9,6 +9,8 @@ using System.IO; using System.Reflection; using System.Collections; using System.Collections.Generic; +using CPersonGun = LELHDOPKMBE; +using SPlayerStats = BBOACLMHKLF; namespace WBM { @@ -93,34 +95,32 @@ namespace WBM StartCoroutine(this.UpdateValues); } - private MethodInfo clearMessagesFuncRef; - private FieldInfo playerStatsArrayRef; private Data.PlayerStatsStruct[] playerStatsArrayRaw { get { - IACNKEGEEAG[] rawPlayerStatsArray = (IACNKEGEEAG[])this.playerStatsArrayRef.GetValue(this.webguy); + SPlayerStats[] rawPlayerStatsArray = (SPlayerStats[])this.playerStatsArrayRef.GetValue(this.webguy); Data.PlayerStatsStruct[] result = new Data.PlayerStatsStruct[rawPlayerStatsArray.Length]; for (int i = 0; i < rawPlayerStatsArray.Length; i++) { - IACNKEGEEAG currentlyParsing = rawPlayerStatsArray[i]; + SPlayerStats currentlyParsing = rawPlayerStatsArray[i]; result[i] = new Data.PlayerStatsStruct { - kills = currentlyParsing.IOOFDGPKMFK, - deaths = currentlyParsing.FOKKPNMGKDP, - damage = currentlyParsing.HABIHPNAEHO, - longestKill = currentlyParsing.CEKBGCGKILN, - points = currentlyParsing.FOBEJABPFJJ, - headShots = currentlyParsing.NPMFKNDMOHB, - vote = currentlyParsing.DGKDCINHCEA, - mapVote = currentlyParsing.OCEJJALAMJI, - gamesElo = currentlyParsing.EFMOAKCIAJP, - gamesEloDelta = currentlyParsing.AAGINDPBBJJ, - killsElo = currentlyParsing.FIEJIAFBDJP, - killsEloDelta = currentlyParsing.MBJFMGKHFPM, + kills = currentlyParsing.GPLIPBNIDNC, + deaths = currentlyParsing.DKJCHCPBADP, + damage = currentlyParsing.EOPJFDCLCCL, + longestKill = currentlyParsing.MPJBKDPMLBD, + points = currentlyParsing.IEJEOANMHKI, + headShots = currentlyParsing.PEJJONGBLLH, + vote = currentlyParsing.BIPKEJFKPGD, + mapVote = currentlyParsing.FLOHPDGHOOG, + gamesElo = currentlyParsing.EAFMCHFNJAL, + gamesEloDelta = currentlyParsing.GPLEHHJJCIN, + killsElo = currentlyParsing.GOJIAOADAJJ, + killsEloDelta = currentlyParsing.IPICEMAAMBM, }; } @@ -153,14 +153,14 @@ namespace WBM } private FieldInfo personGunRef; - private CGMPHDEJMIG personGunRaw + private CPersonGun personGunRaw { get { - return (CGMPHDEJMIG)this.personGunRef.GetValue(this.webguy); + return (CPersonGun)this.personGunRef.GetValue(this.webguy); } } - private CGMPHDEJMIG personGun; + private CPersonGun personGun; private FieldInfo nickListRef; private string[] nickListRaw @@ -202,7 +202,7 @@ namespace WBM private void initCore() { - this.harmony = new Harmony("com.developomp.wbm"); + this.harmony = new Harmony(WBM.programID); this.harmony.PatchAll(); } @@ -215,16 +215,15 @@ namespace WBM // References // - this.playerStatsArrayRef = webguyType.GetField("FLDPBAEABJG", bindFlags); - this.teamListRef = webguyType.GetField("BFMPAFOBMKP", bindFlags); - this.localPlayerIndexRef = webguyType.GetField("AEILDFPIIGG", bindFlags); - this.personGunRef = webguyType.GetField("IDKKPOAJPMC", bindFlags); - this.nickListRef = webguyType.GetField("MOOLDAMLJLO", bindFlags); - this.gameStateRef = webguyType.GetField("NKADGEOAKKB", bindFlags); - this.chatListRef = webguyType.GetField("PODNOOGFEFE", bindFlags); + this.playerStatsArrayRef = webguyType.GetField(MangledNames.statsList, bindFlags); + this.teamListRef = webguyType.GetField(MangledNames.teamList, bindFlags); + this.localPlayerIndexRef = webguyType.GetField(MangledNames.localPlayerIndex, bindFlags); + this.personGunRef = webguyType.GetField(MangledNames.personGun, bindFlags); + this.nickListRef = webguyType.GetField(MangledNames.nickList, bindFlags); + this.gameStateRef = webguyType.GetField(MangledNames.gameState, bindFlags); + this.chatListRef = webguyType.GetField(MangledNames.chatList, bindFlags); - this.addMessageFuncRef = webguyType.GetMethod("NNLPKKPEBOF", bindFlags); - this.clearMessagesFuncRef = webguyType.GetMethod("EIHHBPDPNDF", bindFlags); + this.addMessageFuncRef = webguyType.GetMethod(MangledNames.addMessage, bindFlags); // // Configurations diff --git a/WBM/features/core/ui.cs b/WBM/features/core/ui.cs index c89aba8..b561655 100644 --- a/WBM/features/core/ui.cs +++ b/WBM/features/core/ui.cs @@ -55,9 +55,9 @@ kill streak SFX: {this.killStreakSFX.Value} ({this.killStreakSFXShortcut.Value}) { GUI.Box( new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60), - @"War Brokers Mods + $@"{WBM.programName} Made by [LP] POMP -v1.8.0.0" +v{WBM.programVersion}" ); } diff --git a/WBM/features/fpsUnlock.cs b/WBM/features/fpsUnlock.cs index 66df397..a58fe29 100644 --- a/WBM/features/fpsUnlock.cs +++ b/WBM/features/fpsUnlock.cs @@ -7,7 +7,7 @@ namespace WBM { /// patch for onFPSChanged function [HarmonyPatch(typeof(webguy))] - [HarmonyPatch("LIJHKNOLECJ")] + [HarmonyPatch(MangledNames.onFPSChanged)] class FPSSliderPatch { private static int defaultTargetFrameRate = -1; @@ -15,21 +15,21 @@ namespace WBM private static GameObject fpsSliderTextObj = GameObject.Find("fpsSlideFuckText"); private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); - private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess("KLAKEIFEFMH"); + private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess(MangledNames.fpsValue); - static bool Prefix(webguy __instance, float EJPANIOHKEC) + static bool Prefix(webguy __instance, float KFBLINBNKHI) { - fpsValueRef(__instance) = EJPANIOHKEC; - int targetFrameRate = (int)(EJPANIOHKEC * maxTargetFrameRate); + fpsValueRef(__instance) = KFBLINBNKHI; + int targetFrameRate = (int)(KFBLINBNKHI * maxTargetFrameRate); if (targetFrameRate == 0) { - ((InfernalBehaviour)__instance).NKANMPOLMOA(fpsSliderTextObj, __instance.HOLCODAHDKF("Disabled")); + ((InfernalBehaviour)__instance).GHLANFKABIH(fpsSliderTextObj, __instance.LMOKBIHLKFK("Disabled")); targetFrameRate = defaultTargetFrameRate; } else { - ((InfernalBehaviour)__instance).NKANMPOLMOA(fpsSliderTextObj, targetFrameRate.ToString()); + ((InfernalBehaviour)__instance).GHLANFKABIH(fpsSliderTextObj, targetFrameRate.ToString()); } if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 0be8a25..4196795 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -1,11 +1,9 @@ using BepInEx.Configuration; -using UnityEngine; - using System; using System.Reflection; -using CAudioClip = HKPCKNFOBNA; +using CAudioClip = DMJGLPCLOPG; namespace WBM { @@ -14,14 +12,14 @@ namespace WBM private ConfigEntry useOldGunSoundConf; private FieldInfo oldGunSoundRef; - private AudioClip oldGunSoundRaw + private CAudioClip oldGunSoundRaw { get { - return ((CAudioClip)this.oldGunSoundRef.GetValue(this.webguy)).DDKAHAAKKME; + return (CAudioClip)this.oldGunSoundRef.GetValue(this.webguy); } } - private AudioClip oldGunSound; + private CAudioClip oldGunSound; private FieldInfo AKSoundRef; private CAudioClip AKSoundRaw @@ -35,7 +33,7 @@ namespace WBM this.AKSoundRef.SetValue(this.webguy, value); } } - private AudioClip newAKSound; + private CAudioClip newAKSound; private FieldInfo SMGSoundRef; private CAudioClip SMGSoundRaw @@ -49,7 +47,7 @@ namespace WBM this.SMGSoundRef.SetValue(this.webguy, value); } } - private AudioClip newSMGSound; + private CAudioClip newSMGSound; private void setupOldGunSound() { @@ -62,21 +60,21 @@ namespace WBM this.onOldGunSoundChange(new object(), new EventArgs()); this.oldGunSound = this.oldGunSoundRaw; - this.newAKSound = this.AKSoundRaw.DDKAHAAKKME; - this.newSMGSound = this.SMGSoundRaw.DDKAHAAKKME; + this.newAKSound = this.AKSoundRaw; + this.newSMGSound = this.SMGSoundRaw; } private void onOldGunSoundChange(object sender, EventArgs e) { if (this.useOldGunSoundConf.Value) { - this.AKSoundRaw.DDKAHAAKKME = this.oldGunSound; - this.SMGSoundRaw.DDKAHAAKKME = this.oldGunSound; + this.AKSoundRaw = this.oldGunSound; + this.SMGSoundRaw = this.oldGunSound; } else { - this.AKSoundRaw.DDKAHAAKKME = this.newAKSound; - this.SMGSoundRaw.DDKAHAAKKME = this.newSMGSound; + this.AKSoundRaw = this.newAKSound; + this.SMGSoundRaw = this.newSMGSound; } } } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index 36a5f4a..e28033a 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -1,6 +1,7 @@ using BepInEx.Configuration; using UnityEngine; +using CFPSGuy = BLALJCIJGGH; namespace WBM { @@ -41,7 +42,7 @@ namespace WBM private void setCrouchState(bool crouchState) { // CFPSGuy.inSt.isCrouching - GENPAICHGGE.DMBBKHNIMOK.FHJOPAFOHLA = crouchState; + CFPSGuy.GODHOHFPIFB.BLACKAOLGNP = crouchState; } } } diff --git a/WBM/features/showEloOnLeaderboard.cs b/WBM/features/showEloOnLeaderboard.cs index 6dfefb1..530ab96 100644 --- a/WBM/features/showEloOnLeaderboard.cs +++ b/WBM/features/showEloOnLeaderboard.cs @@ -27,7 +27,7 @@ namespace WBM private void setupShowEloOnLeaderBoard() { - this.showEloOnLeaderboardRef = webguyType.GetField("BCFHKALFBLB", bindFlags); + this.showEloOnLeaderboardRef = webguyType.GetField(MangledNames.showElo, bindFlags); this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true); this.showEloOnLeaderboard.SettingChanged += this.onShowEloOnLeaderboardChange; diff --git a/WBM/features/showSquadServer.cs b/WBM/features/showSquadServer.cs index 2b97622..4028367 100644 --- a/WBM/features/showSquadServer.cs +++ b/WBM/features/showSquadServer.cs @@ -27,7 +27,7 @@ namespace WBM private void setupShowSquadServer() { - this.showSquadServerRef = webguyType.GetField("IKOJAEHBIJI", bindFlags); + this.showSquadServerRef = webguyType.GetField(MangledNames.isClan, bindFlags); this.showSquadServer = Config.Bind("Config", "show squad server", true); this.showSquadServer.SettingChanged += this.onShowSquadServerChange; diff --git a/WBM/features/showTestingServer.cs b/WBM/features/showTestingServer.cs index f1c5410..193e68a 100644 --- a/WBM/features/showTestingServer.cs +++ b/WBM/features/showTestingServer.cs @@ -27,7 +27,7 @@ namespace WBM private void setupShowTestingServer() { - this.showTestingServerRef = webguyType.GetField("CCECDEDJELJ", bindFlags); + this.showTestingServerRef = webguyType.GetField(MangledNames.isTesting, bindFlags); this.showTestingServer = Config.Bind("Config", "show testing server", true); this.showTestingServer.SettingChanged += this.onShowTestingServerChange; diff --git a/WBM/mangledNames.cs b/WBM/mangledNames.cs index 814d741..bdd6a0a 100644 --- a/WBM/mangledNames.cs +++ b/WBM/mangledNames.cs @@ -5,8 +5,32 @@ namespace WBM { public static class MangledNames { - public static readonly string gunShotClip = "ICMCDLNEIAI"; - public static readonly string AKRifleShotClip = "DGEJAAPKEAD"; - public static readonly string SMGShotClip = "OFAALIJFKEI"; + // CAudio + public const string gunShotClip = "BJAJGLKBGIK"; + public const string AKRifleShotClip = "AMLFKFMFNHJ"; + public const string SMGShotClip = "JBPCEBHIPOA"; + // fps limit value + public const string fpsValue = "DDMMENCGNNJ"; + public const string showElo = "GOLMFEFNGEO"; + // show squad servers + public const string isClan = "DMKFINANCKN"; + // show testing servers + public const string isTesting = "IMIBKMIHNEF"; + public const string chatList = "NPGFEBBFCKM"; + public const string gameState = "HJKIAMIDEMB"; + public const string nickList = "PAGBLNDBFFM"; + public const string personGun = "DOKPBFNBIMP"; + public const string localPlayerIndex = "HHMPKKFMJCN"; + public const string teamList = "MGHADKEDFHK"; + public const string statsList = "CHNEHJPEKGM"; + + // + // functions + // + + public const string drawChatMessage = "CIHAFDBGGDP"; + public const string clearMessages = "FOLIGEPKOMI"; + public const string onFPSChanged = "NGENLDFJGLK"; + public const string addMessage = "HAFDILLPPMB"; } } From 1a7f50476baf153c58b30a1f366718ef5f9c8eea Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 19 Mar 2022 17:35:47 +0900 Subject: [PATCH 24/34] fixed gun sound replacement logic --- WBM/WBM.cs | 2 +- WBM/features/oldGunSound.cs | 28 ++++++++-------------------- WBM/mangledNames.cs | 2 -- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 0aaff02..9ba65cf 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -13,7 +13,7 @@ namespace WBM { public const string programID = "com.developomp.wbm"; public const string programName = "War Brokers Mods"; - public const string programVersion = "1.9.0.0"; + public const string programVersion = "1.9.1.0"; /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 4196795..68b3405 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -11,23 +11,11 @@ namespace WBM { private ConfigEntry useOldGunSoundConf; - private FieldInfo oldGunSoundRef; - private CAudioClip oldGunSoundRaw - { - get - { - return (CAudioClip)this.oldGunSoundRef.GetValue(this.webguy); - } - } private CAudioClip oldGunSound; private FieldInfo AKSoundRef; private CAudioClip AKSoundRaw { - get - { - return (CAudioClip)this.AKSoundRef.GetValue(this.webguy); - } set { this.AKSoundRef.SetValue(this.webguy, value); @@ -38,10 +26,6 @@ namespace WBM private FieldInfo SMGSoundRef; private CAudioClip SMGSoundRaw { - get - { - return (CAudioClip)this.SMGSoundRef.GetValue(this.webguy); - } set { this.SMGSoundRef.SetValue(this.webguy, value); @@ -51,7 +35,6 @@ namespace WBM private void setupOldGunSound() { - this.oldGunSoundRef = webguyType.GetField(MangledNames.gunShotClip, bindFlags); this.AKSoundRef = webguyType.GetField(MangledNames.AKRifleShotClip, bindFlags); this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags); @@ -59,9 +42,14 @@ namespace WBM this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange; this.onOldGunSoundChange(new object(), new EventArgs()); - this.oldGunSound = this.oldGunSoundRaw; - this.newAKSound = this.AKSoundRaw; - this.newSMGSound = this.SMGSoundRaw; + this.oldGunSound = new DMJGLPCLOPG("Sound/gun_shot", 1f, 0f); + this.oldGunSound.GPBDJPDFDMJ(50f, 1_000f); + + this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f); + this.newAKSound.GPBDJPDFDMJ(50f, 1_000f); + + this.newSMGSound = new DMJGLPCLOPG("Sound/smg_gun_shot", 1f, 0f); + this.newSMGSound.GPBDJPDFDMJ(50f, 1_000f); } private void onOldGunSoundChange(object sender, EventArgs e) diff --git a/WBM/mangledNames.cs b/WBM/mangledNames.cs index bdd6a0a..b70c38b 100644 --- a/WBM/mangledNames.cs +++ b/WBM/mangledNames.cs @@ -5,8 +5,6 @@ namespace WBM { public static class MangledNames { - // CAudio - public const string gunShotClip = "BJAJGLKBGIK"; public const string AKRifleShotClip = "AMLFKFMFNHJ"; public const string SMGShotClip = "JBPCEBHIPOA"; // fps limit value From 33571dc3ef67e731bb550698f18d6529780763c7 Mon Sep 17 00:00:00 2001 From: developomp Date: Sun, 20 Mar 2022 17:54:08 +0900 Subject: [PATCH 25/34] fixed old gun sound --- WBM/features/oldGunSound.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 68b3405..18d25e9 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -35,21 +35,22 @@ namespace WBM private void setupOldGunSound() { + this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); + this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange; + this.AKSoundRef = webguyType.GetField(MangledNames.AKRifleShotClip, bindFlags); this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags); - this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true); - this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange; - this.onOldGunSoundChange(new object(), new EventArgs()); - - this.oldGunSound = new DMJGLPCLOPG("Sound/gun_shot", 1f, 0f); + this.oldGunSound = new CAudioClip("Sound/gun_shot", 1f, 0f); this.oldGunSound.GPBDJPDFDMJ(50f, 1_000f); this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f); this.newAKSound.GPBDJPDFDMJ(50f, 1_000f); - this.newSMGSound = new DMJGLPCLOPG("Sound/smg_gun_shot", 1f, 0f); + this.newSMGSound = new CAudioClip("Sound/smg_gun_shot", 1f, 0f); this.newSMGSound.GPBDJPDFDMJ(50f, 1_000f); + + this.onOldGunSoundChange(new object(), new EventArgs()); } private void onOldGunSoundChange(object sender, EventArgs e) From aeba107b31b8c624c3a3cdae9896e325e68d6147 Mon Sep 17 00:00:00 2001 From: developomp Date: Sun, 20 Mar 2022 17:54:33 +0900 Subject: [PATCH 26/34] bumped version from v1.9.1.0 to v1.9.2.0 --- WBM/WBM.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 9ba65cf..1210f13 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -13,7 +13,7 @@ namespace WBM { public const string programID = "com.developomp.wbm"; public const string programName = "War Brokers Mods"; - public const string programVersion = "1.9.1.0"; + public const string programVersion = "1.9.2.0"; /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. From bbd8d882e6b41aef6e8e78e7fd0f3df8c17cad2d Mon Sep 17 00:00:00 2001 From: developomp Date: Mon, 21 Mar 2022 13:20:54 +0900 Subject: [PATCH 27/34] filename capitalization --- WBM/{mangledNames.cs => MangledNames.cs} | 4 ++++ 1 file changed, 4 insertions(+) rename WBM/{mangledNames.cs => MangledNames.cs} (96%) diff --git a/WBM/mangledNames.cs b/WBM/MangledNames.cs similarity index 96% rename from WBM/mangledNames.cs rename to WBM/MangledNames.cs index b70c38b..7c7c076 100644 --- a/WBM/mangledNames.cs +++ b/WBM/MangledNames.cs @@ -5,6 +5,10 @@ namespace WBM { public static class MangledNames { + // + // Variables + // + public const string AKRifleShotClip = "AMLFKFMFNHJ"; public const string SMGShotClip = "JBPCEBHIPOA"; // fps limit value From f9fb8d7a4ef6a451863031838d2cb700fd2bd1fa Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 26 Mar 2022 13:40:13 +0900 Subject: [PATCH 28/34] v1.10.0.0 update - made WBM work in WB v462 --- WBM/MangledNames.cs | 34 +++++++++++++++++----------------- WBM/Util.cs | 12 ++++++------ WBM/WBM.cs | 2 +- WBM/features/core/core.cs | 28 ++++++++++++++-------------- WBM/features/fpsUnlock.cs | 10 +++++----- WBM/features/oldGunSound.cs | 8 ++++---- WBM/features/shiftToCrouch.cs | 4 ++-- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/WBM/MangledNames.cs b/WBM/MangledNames.cs index 7c7c076..41bd699 100644 --- a/WBM/MangledNames.cs +++ b/WBM/MangledNames.cs @@ -9,30 +9,30 @@ namespace WBM // Variables // - public const string AKRifleShotClip = "AMLFKFMFNHJ"; - public const string SMGShotClip = "JBPCEBHIPOA"; + public const string AKRifleShotClip = "KOPNJGAFJPJ"; + public const string SMGShotClip = "NIBJHJKGFGM"; // fps limit value - public const string fpsValue = "DDMMENCGNNJ"; - public const string showElo = "GOLMFEFNGEO"; + public const string fpsValue = "DJINOOHCNED"; + public const string showElo = "IGGKIHFPINI"; // show squad servers - public const string isClan = "DMKFINANCKN"; + public const string isClan = "FOAHJKKGADA"; // show testing servers - public const string isTesting = "IMIBKMIHNEF"; - public const string chatList = "NPGFEBBFCKM"; - public const string gameState = "HJKIAMIDEMB"; - public const string nickList = "PAGBLNDBFFM"; - public const string personGun = "DOKPBFNBIMP"; - public const string localPlayerIndex = "HHMPKKFMJCN"; - public const string teamList = "MGHADKEDFHK"; - public const string statsList = "CHNEHJPEKGM"; + public const string isTesting = "LHEKKMODFPJ"; + public const string chatList = "PCBPHCPLMJJ"; + public const string gameState = "EMPEJBNDMDJ"; + public const string nickList = "KLPKEAEKILP"; + public const string personGun = "AAOANFBKCAP"; + public const string localPlayerIndex = "EBIHMNMOAOI"; + public const string teamList = "MNPJBKGAIBD"; + public const string statsList = "AKABPCKCMKO"; // // functions // - public const string drawChatMessage = "CIHAFDBGGDP"; - public const string clearMessages = "FOLIGEPKOMI"; - public const string onFPSChanged = "NGENLDFJGLK"; - public const string addMessage = "HAFDILLPPMB"; + public const string drawChatMessage = "OODIFGBIKLH"; + public const string clearMessages = "IBIHDJMOONL"; + public const string onFPSChanged = "LNMOKJEAAIL"; + public const string addMessage = "EGKICEMGIAN"; } } diff --git a/WBM/Util.cs b/WBM/Util.cs index 415b081..0e441b9 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -6,7 +6,7 @@ using System.Text; using System.IO; using System.Threading.Tasks; using System.Runtime.Serialization.Json; -using CPersonGun = LELHDOPKMBE; +using CPersonGun = LIKCPPJOPCD; namespace WBM { @@ -49,31 +49,31 @@ namespace WBM public static float getGunZoom(CPersonGun gun) { // CPersonGun.cameraZoom - return gun.CAAABKHHGLM; + return gun.MCGMBFEFIEJ; } public static float getGunFireTimer(CPersonGun gun) { // CPersonGun.fireTimer - return gun.HDDNCAICDOJ; + return gun.ACHDOADNLGG; } public static float getGunFireVelocity(CPersonGun gun) { // CPersonGun.fireVel - return gun.IMNMEFPBAAM; + return gun.IALIPLHBOPP; } public static float getGunFireRate(CPersonGun gun) { // CPersonGun.fireRate - return gun.LCDDGLKGKCO; + return gun.GBNPIHJPNEA; } public static float getGunReloadTimer(CPersonGun gun) { // CPersonGun.reloadTimer - return gun.ILBBFNBJJKI; + return gun.NNHNKPHCADL; } } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 1210f13..e279ee1 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -13,7 +13,7 @@ namespace WBM { public const string programID = "com.developomp.wbm"; public const string programName = "War Brokers Mods"; - public const string programVersion = "1.9.2.0"; + public const string programVersion = "1.10.0.0"; /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index 47a0cb8..0498d74 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -9,8 +9,8 @@ using System.IO; using System.Reflection; using System.Collections; using System.Collections.Generic; -using CPersonGun = LELHDOPKMBE; -using SPlayerStats = BBOACLMHKLF; +using CPersonGun = LIKCPPJOPCD; +using SPlayerStats = HCBAGAMOGBP; namespace WBM { @@ -109,18 +109,18 @@ namespace WBM result[i] = new Data.PlayerStatsStruct { - kills = currentlyParsing.GPLIPBNIDNC, - deaths = currentlyParsing.DKJCHCPBADP, - damage = currentlyParsing.EOPJFDCLCCL, - longestKill = currentlyParsing.MPJBKDPMLBD, - points = currentlyParsing.IEJEOANMHKI, - headShots = currentlyParsing.PEJJONGBLLH, - vote = currentlyParsing.BIPKEJFKPGD, - mapVote = currentlyParsing.FLOHPDGHOOG, - gamesElo = currentlyParsing.EAFMCHFNJAL, - gamesEloDelta = currentlyParsing.GPLEHHJJCIN, - killsElo = currentlyParsing.GOJIAOADAJJ, - killsEloDelta = currentlyParsing.IPICEMAAMBM, + kills = currentlyParsing.PCMKHOLBIOA, + deaths = currentlyParsing.GIPNKMBEJBC, + damage = currentlyParsing.PGANOPIJICP, + longestKill = currentlyParsing.AJGPPDGOCLB, + points = currentlyParsing.CMLHIAPNBKF, + headShots = currentlyParsing.FCKHPEPKJKO, + vote = currentlyParsing.LAMDMJMNOAI, + mapVote = currentlyParsing.FKBOEOGLBOJ, + gamesElo = currentlyParsing.DGCDKMFAIBO, + gamesEloDelta = currentlyParsing.HEGLGPOHIOC, + killsElo = currentlyParsing.KIHFGLMLLIC, + killsEloDelta = currentlyParsing.AOLLNAKLLAE, }; } diff --git a/WBM/features/fpsUnlock.cs b/WBM/features/fpsUnlock.cs index a58fe29..646938e 100644 --- a/WBM/features/fpsUnlock.cs +++ b/WBM/features/fpsUnlock.cs @@ -17,19 +17,19 @@ namespace WBM private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess(MangledNames.fpsValue); - static bool Prefix(webguy __instance, float KFBLINBNKHI) + static bool Prefix(webguy __instance, float HJPKONHFKEC) { - fpsValueRef(__instance) = KFBLINBNKHI; - int targetFrameRate = (int)(KFBLINBNKHI * maxTargetFrameRate); + fpsValueRef(__instance) = HJPKONHFKEC; + int targetFrameRate = (int)(HJPKONHFKEC * maxTargetFrameRate); if (targetFrameRate == 0) { - ((InfernalBehaviour)__instance).GHLANFKABIH(fpsSliderTextObj, __instance.LMOKBIHLKFK("Disabled")); + ((InfernalBehaviour)__instance).CBBJNPBJGEO(fpsSliderTextObj, __instance.JFNBHCLAPNI("Disabled")); targetFrameRate = defaultTargetFrameRate; } else { - ((InfernalBehaviour)__instance).GHLANFKABIH(fpsSliderTextObj, targetFrameRate.ToString()); + ((InfernalBehaviour)__instance).CBBJNPBJGEO(fpsSliderTextObj, targetFrameRate.ToString()); } if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 18d25e9..64dd73b 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -3,7 +3,7 @@ using BepInEx.Configuration; using System; using System.Reflection; -using CAudioClip = DMJGLPCLOPG; +using CAudioClip = IMCFFHCAJHO; namespace WBM { @@ -42,13 +42,13 @@ namespace WBM this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags); this.oldGunSound = new CAudioClip("Sound/gun_shot", 1f, 0f); - this.oldGunSound.GPBDJPDFDMJ(50f, 1_000f); + this.oldGunSound.NBELPEEPNEG(50f, 1_000f); this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f); - this.newAKSound.GPBDJPDFDMJ(50f, 1_000f); + this.newAKSound.NBELPEEPNEG(50f, 1_000f); this.newSMGSound = new CAudioClip("Sound/smg_gun_shot", 1f, 0f); - this.newSMGSound.GPBDJPDFDMJ(50f, 1_000f); + this.newSMGSound.NBELPEEPNEG(50f, 1_000f); this.onOldGunSoundChange(new object(), new EventArgs()); } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index e28033a..e473ff9 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -1,7 +1,7 @@ using BepInEx.Configuration; using UnityEngine; -using CFPSGuy = BLALJCIJGGH; +using CFPSGuy = NNAPHAANNBH; namespace WBM { @@ -42,7 +42,7 @@ namespace WBM private void setCrouchState(bool crouchState) { // CFPSGuy.inSt.isCrouching - CFPSGuy.GODHOHFPIFB.BLACKAOLGNP = crouchState; + CFPSGuy.IEEOONGMDCO.ELHNALDDABE = crouchState; } } } From 106dc517f51b23b96bd2547bbf1c70afeeb6d88b Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 1 Apr 2022 14:52:55 +0900 Subject: [PATCH 29/34] made WBM work in v463 --- WBM/MangledNames.cs | 34 +++++++++++++++++----------------- WBM/Util.cs | 12 ++++++------ WBM/WBM.cs | 2 +- WBM/features/core/core.cs | 28 ++++++++++++++-------------- WBM/features/fpsUnlock.cs | 10 +++++----- WBM/features/oldGunSound.cs | 8 ++++---- WBM/features/shiftToCrouch.cs | 4 ++-- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/WBM/MangledNames.cs b/WBM/MangledNames.cs index 41bd699..33bd02e 100644 --- a/WBM/MangledNames.cs +++ b/WBM/MangledNames.cs @@ -9,30 +9,30 @@ namespace WBM // Variables // - public const string AKRifleShotClip = "KOPNJGAFJPJ"; - public const string SMGShotClip = "NIBJHJKGFGM"; + public const string AKRifleShotClip = "KHDFGDJGLNA"; + public const string SMGShotClip = "BOFDGEOJHLE"; // fps limit value - public const string fpsValue = "DJINOOHCNED"; - public const string showElo = "IGGKIHFPINI"; + public const string fpsValue = "OKIPAODOHML"; + public const string showElo = "LAKMDFOLAIO"; // show squad servers - public const string isClan = "FOAHJKKGADA"; + public const string isClan = "MHFIDMDKODL"; // show testing servers - public const string isTesting = "LHEKKMODFPJ"; - public const string chatList = "PCBPHCPLMJJ"; - public const string gameState = "EMPEJBNDMDJ"; - public const string nickList = "KLPKEAEKILP"; - public const string personGun = "AAOANFBKCAP"; - public const string localPlayerIndex = "EBIHMNMOAOI"; - public const string teamList = "MNPJBKGAIBD"; - public const string statsList = "AKABPCKCMKO"; + public const string isTesting = "PJGMHLCCEON"; + public const string chatList = "NPAMNJJIBCL"; + public const string gameState = "MCGHMDECCDD"; + public const string nickList = "HGBOHDPBNFC"; + public const string personGun = "OBOOOBDIENB"; + public const string localPlayerIndex = "MEIGJGLEAGF"; + public const string teamList = "OKNOMBELNBF"; + public const string statsList = "OHIPIPNCEHO"; // // functions // - public const string drawChatMessage = "OODIFGBIKLH"; - public const string clearMessages = "IBIHDJMOONL"; - public const string onFPSChanged = "LNMOKJEAAIL"; - public const string addMessage = "EGKICEMGIAN"; + public const string drawChatMessage = "NCNJGLCFKDI"; + public const string clearMessages = "KCGJLJDFOHA"; + public const string onFPSChanged = "GOFODKNMPIE"; + public const string addMessage = "PCEEAAMELIP"; } } diff --git a/WBM/Util.cs b/WBM/Util.cs index 0e441b9..b2b9653 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -6,7 +6,7 @@ using System.Text; using System.IO; using System.Threading.Tasks; using System.Runtime.Serialization.Json; -using CPersonGun = LIKCPPJOPCD; +using CPersonGun = LOFEEEEKLNK; namespace WBM { @@ -49,31 +49,31 @@ namespace WBM public static float getGunZoom(CPersonGun gun) { // CPersonGun.cameraZoom - return gun.MCGMBFEFIEJ; + return gun.LEEHHOKMFAF; } public static float getGunFireTimer(CPersonGun gun) { // CPersonGun.fireTimer - return gun.ACHDOADNLGG; + return gun.CDNKHDNPMJG; } public static float getGunFireVelocity(CPersonGun gun) { // CPersonGun.fireVel - return gun.IALIPLHBOPP; + return gun.LGIHHCNGICI; } public static float getGunFireRate(CPersonGun gun) { // CPersonGun.fireRate - return gun.GBNPIHJPNEA; + return gun.IMDBDCCAELP; } public static float getGunReloadTimer(CPersonGun gun) { // CPersonGun.reloadTimer - return gun.NNHNKPHCADL; + return gun.HCPELMPGLNK; } } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index e279ee1..34356b2 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -13,7 +13,7 @@ namespace WBM { public const string programID = "com.developomp.wbm"; public const string programName = "War Brokers Mods"; - public const string programVersion = "1.10.0.0"; + public const string programVersion = "1.11.0.0"; /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index 0498d74..42d3406 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -9,8 +9,8 @@ using System.IO; using System.Reflection; using System.Collections; using System.Collections.Generic; -using CPersonGun = LIKCPPJOPCD; -using SPlayerStats = HCBAGAMOGBP; +using CPersonGun = LOFEEEEKLNK; +using SPlayerStats = CGGGFGDBICC; namespace WBM { @@ -109,18 +109,18 @@ namespace WBM result[i] = new Data.PlayerStatsStruct { - kills = currentlyParsing.PCMKHOLBIOA, - deaths = currentlyParsing.GIPNKMBEJBC, - damage = currentlyParsing.PGANOPIJICP, - longestKill = currentlyParsing.AJGPPDGOCLB, - points = currentlyParsing.CMLHIAPNBKF, - headShots = currentlyParsing.FCKHPEPKJKO, - vote = currentlyParsing.LAMDMJMNOAI, - mapVote = currentlyParsing.FKBOEOGLBOJ, - gamesElo = currentlyParsing.DGCDKMFAIBO, - gamesEloDelta = currentlyParsing.HEGLGPOHIOC, - killsElo = currentlyParsing.KIHFGLMLLIC, - killsEloDelta = currentlyParsing.AOLLNAKLLAE, + kills = currentlyParsing.MMJJANKJGNN, + deaths = currentlyParsing.BEPKMLPKKLN, + damage = currentlyParsing.NEBBOEAFJCH, + longestKill = currentlyParsing.GPJCJAOICMD, + points = currentlyParsing.IFLMEICPABL, + headShots = currentlyParsing.AKHGGOMGELJ, + vote = currentlyParsing.APDCPBDBOFM, + mapVote = currentlyParsing.LHPMMCNLELO, + gamesElo = currentlyParsing.IIKAGCMAHNB, + gamesEloDelta = currentlyParsing.AAOMAGGJLDN, + killsElo = currentlyParsing.EFALDDFKNNE, + killsEloDelta = currentlyParsing.DKMEKAGNELA, }; } diff --git a/WBM/features/fpsUnlock.cs b/WBM/features/fpsUnlock.cs index 646938e..e1aae65 100644 --- a/WBM/features/fpsUnlock.cs +++ b/WBM/features/fpsUnlock.cs @@ -17,19 +17,19 @@ namespace WBM private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess(MangledNames.fpsValue); - static bool Prefix(webguy __instance, float HJPKONHFKEC) + static bool Prefix(webguy __instance, float AHCNKEEBHGH) { - fpsValueRef(__instance) = HJPKONHFKEC; - int targetFrameRate = (int)(HJPKONHFKEC * maxTargetFrameRate); + fpsValueRef(__instance) = AHCNKEEBHGH; + int targetFrameRate = (int)(AHCNKEEBHGH * maxTargetFrameRate); if (targetFrameRate == 0) { - ((InfernalBehaviour)__instance).CBBJNPBJGEO(fpsSliderTextObj, __instance.JFNBHCLAPNI("Disabled")); + ((InfernalBehaviour)__instance).CNLEOCADDNL(fpsSliderTextObj, __instance.CMPKGMGJIKF("Disabled")); targetFrameRate = defaultTargetFrameRate; } else { - ((InfernalBehaviour)__instance).CBBJNPBJGEO(fpsSliderTextObj, targetFrameRate.ToString()); + ((InfernalBehaviour)__instance).CNLEOCADDNL(fpsSliderTextObj, targetFrameRate.ToString()); } if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 64dd73b..b3d3312 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -3,7 +3,7 @@ using BepInEx.Configuration; using System; using System.Reflection; -using CAudioClip = IMCFFHCAJHO; +using CAudioClip = PAOOAGCPNAC; namespace WBM { @@ -42,13 +42,13 @@ namespace WBM this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags); this.oldGunSound = new CAudioClip("Sound/gun_shot", 1f, 0f); - this.oldGunSound.NBELPEEPNEG(50f, 1_000f); + this.oldGunSound.ENBBLJKNKIG(50f, 1_000f); this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f); - this.newAKSound.NBELPEEPNEG(50f, 1_000f); + this.newAKSound.ENBBLJKNKIG(50f, 1_000f); this.newSMGSound = new CAudioClip("Sound/smg_gun_shot", 1f, 0f); - this.newSMGSound.NBELPEEPNEG(50f, 1_000f); + this.newSMGSound.ENBBLJKNKIG(50f, 1_000f); this.onOldGunSoundChange(new object(), new EventArgs()); } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index e473ff9..f0f0719 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -1,7 +1,7 @@ using BepInEx.Configuration; using UnityEngine; -using CFPSGuy = NNAPHAANNBH; +using CFPSGuy = MPFNCCPKLMG; namespace WBM { @@ -42,7 +42,7 @@ namespace WBM private void setCrouchState(bool crouchState) { // CFPSGuy.inSt.isCrouching - CFPSGuy.IEEOONGMDCO.ELHNALDDABE = crouchState; + MPFNCCPKLMG.MPPOBOJEEKB.BEJAPOIAHJA = crouchState; } } } From ffebff3229b19cd6da33641a25bd1fd7451e9469 Mon Sep 17 00:00:00 2001 From: developomp Date: Tue, 12 Apr 2022 13:20:16 +0900 Subject: [PATCH 30/34] v1.12.0.0 update - made it work in v464 --- WBM/MangledNames.cs | 34 +++++++++++++++++----------------- WBM/Util.cs | 12 ++++++------ WBM/WBM.cs | 2 +- WBM/features/core/core.cs | 28 ++++++++++++++-------------- WBM/features/fpsUnlock.cs | 10 +++++----- WBM/features/oldGunSound.cs | 8 ++++---- WBM/features/shiftToCrouch.cs | 3 +-- 7 files changed, 48 insertions(+), 49 deletions(-) diff --git a/WBM/MangledNames.cs b/WBM/MangledNames.cs index 33bd02e..6f81469 100644 --- a/WBM/MangledNames.cs +++ b/WBM/MangledNames.cs @@ -9,30 +9,30 @@ namespace WBM // Variables // - public const string AKRifleShotClip = "KHDFGDJGLNA"; - public const string SMGShotClip = "BOFDGEOJHLE"; + public const string AKRifleShotClip = "PIANBDGFMPJ"; + public const string SMGShotClip = "GAIEAFBFNAB"; // fps limit value - public const string fpsValue = "OKIPAODOHML"; - public const string showElo = "LAKMDFOLAIO"; + public const string fpsValue = "OEAAKDGKBJG"; + public const string showElo = "NGPMJKPPFMP"; // show squad servers - public const string isClan = "MHFIDMDKODL"; + public const string isClan = "KHIGIKJIMJE"; // show testing servers - public const string isTesting = "PJGMHLCCEON"; - public const string chatList = "NPAMNJJIBCL"; - public const string gameState = "MCGHMDECCDD"; - public const string nickList = "HGBOHDPBNFC"; - public const string personGun = "OBOOOBDIENB"; - public const string localPlayerIndex = "MEIGJGLEAGF"; - public const string teamList = "OKNOMBELNBF"; - public const string statsList = "OHIPIPNCEHO"; + public const string isTesting = "PEGCAFFOBKF"; + public const string chatList = "BJAFAAOKHEH"; + public const string gameState = "IDGHJMCFNKE"; + public const string nickList = "IOOOOHMIOHH"; + public const string personGun = "EJDNEICNEPI"; + public const string localPlayerIndex = "GKFCPFOOPOA"; + public const string teamList = "CKBJDMPJHBO"; + public const string statsList = "MLOEONIFNIN"; // // functions // - public const string drawChatMessage = "NCNJGLCFKDI"; - public const string clearMessages = "KCGJLJDFOHA"; - public const string onFPSChanged = "GOFODKNMPIE"; - public const string addMessage = "PCEEAAMELIP"; + public const string drawChatMessage = "DFPHCJEPDED"; + public const string clearMessages = "IAIBHDNOAND"; + public const string onFPSChanged = "NJIPHOHHEHD"; + public const string addMessage = "CAJHEPNJNPG"; } } diff --git a/WBM/Util.cs b/WBM/Util.cs index b2b9653..9925236 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -6,7 +6,7 @@ using System.Text; using System.IO; using System.Threading.Tasks; using System.Runtime.Serialization.Json; -using CPersonGun = LOFEEEEKLNK; +using CPersonGun = PBMBHMPCKCN; namespace WBM { @@ -49,31 +49,31 @@ namespace WBM public static float getGunZoom(CPersonGun gun) { // CPersonGun.cameraZoom - return gun.LEEHHOKMFAF; + return gun.GDFNMDDLJBC; } public static float getGunFireTimer(CPersonGun gun) { // CPersonGun.fireTimer - return gun.CDNKHDNPMJG; + return gun.MJOHAFCEOHC; } public static float getGunFireVelocity(CPersonGun gun) { // CPersonGun.fireVel - return gun.LGIHHCNGICI; + return gun.LIILKCBLDCK; } public static float getGunFireRate(CPersonGun gun) { // CPersonGun.fireRate - return gun.IMDBDCCAELP; + return gun.JNAJOIFEDCF; } public static float getGunReloadTimer(CPersonGun gun) { // CPersonGun.reloadTimer - return gun.HCPELMPGLNK; + return gun.DEBADKJLNHC; } } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 34356b2..09876a5 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -13,7 +13,7 @@ namespace WBM { public const string programID = "com.developomp.wbm"; public const string programName = "War Brokers Mods"; - public const string programVersion = "1.11.0.0"; + public const string programVersion = "1.12.0.0"; /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index 42d3406..9bcd6e7 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -9,8 +9,8 @@ using System.IO; using System.Reflection; using System.Collections; using System.Collections.Generic; -using CPersonGun = LOFEEEEKLNK; -using SPlayerStats = CGGGFGDBICC; +using CPersonGun = PBMBHMPCKCN; +using SPlayerStats = MJMIHJNPLMG; namespace WBM { @@ -109,18 +109,18 @@ namespace WBM result[i] = new Data.PlayerStatsStruct { - kills = currentlyParsing.MMJJANKJGNN, - deaths = currentlyParsing.BEPKMLPKKLN, - damage = currentlyParsing.NEBBOEAFJCH, - longestKill = currentlyParsing.GPJCJAOICMD, - points = currentlyParsing.IFLMEICPABL, - headShots = currentlyParsing.AKHGGOMGELJ, - vote = currentlyParsing.APDCPBDBOFM, - mapVote = currentlyParsing.LHPMMCNLELO, - gamesElo = currentlyParsing.IIKAGCMAHNB, - gamesEloDelta = currentlyParsing.AAOMAGGJLDN, - killsElo = currentlyParsing.EFALDDFKNNE, - killsEloDelta = currentlyParsing.DKMEKAGNELA, + kills = currentlyParsing.JOIIFMIBBAI, + deaths = currentlyParsing.FEOCHBMIJBI, + damage = currentlyParsing.EAPNFNFDGCL, + longestKill = currentlyParsing.BPGPCOCJLAC, + points = currentlyParsing.LDHFEPHBGBK, + headShots = currentlyParsing.GKDMEMOJEGK, + vote = currentlyParsing.KGHLJCNMHIB, + mapVote = currentlyParsing.JBOKOJHKECD, + gamesElo = currentlyParsing.GBCLFNNLHEP, + gamesEloDelta = currentlyParsing.PKPCAEJKOCG, + killsElo = currentlyParsing.DCFPFIFBGPL, + killsEloDelta = currentlyParsing.EHMJLJMBLGO, }; } diff --git a/WBM/features/fpsUnlock.cs b/WBM/features/fpsUnlock.cs index e1aae65..fca5391 100644 --- a/WBM/features/fpsUnlock.cs +++ b/WBM/features/fpsUnlock.cs @@ -17,19 +17,19 @@ namespace WBM private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess(MangledNames.fpsValue); - static bool Prefix(webguy __instance, float AHCNKEEBHGH) + static bool Prefix(webguy __instance, float FFALKGOIMAL) { - fpsValueRef(__instance) = AHCNKEEBHGH; - int targetFrameRate = (int)(AHCNKEEBHGH * maxTargetFrameRate); + fpsValueRef(__instance) = FFALKGOIMAL; + int targetFrameRate = (int)(FFALKGOIMAL * maxTargetFrameRate); if (targetFrameRate == 0) { - ((InfernalBehaviour)__instance).CNLEOCADDNL(fpsSliderTextObj, __instance.CMPKGMGJIKF("Disabled")); + ((InfernalBehaviour)__instance).DBGHLKJOLEN(fpsSliderTextObj, __instance.GFPPHLOPCBA("Disabled")); targetFrameRate = defaultTargetFrameRate; } else { - ((InfernalBehaviour)__instance).CNLEOCADDNL(fpsSliderTextObj, targetFrameRate.ToString()); + ((InfernalBehaviour)__instance).DBGHLKJOLEN(fpsSliderTextObj, targetFrameRate.ToString()); } if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index b3d3312..c67aaae 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -3,7 +3,7 @@ using BepInEx.Configuration; using System; using System.Reflection; -using CAudioClip = PAOOAGCPNAC; +using CAudioClip = JOHBIOLPABD; namespace WBM { @@ -42,13 +42,13 @@ namespace WBM this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags); this.oldGunSound = new CAudioClip("Sound/gun_shot", 1f, 0f); - this.oldGunSound.ENBBLJKNKIG(50f, 1_000f); + this.oldGunSound.FNHBCEACCHK(50f, 1_000f); this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f); - this.newAKSound.ENBBLJKNKIG(50f, 1_000f); + this.newAKSound.FNHBCEACCHK(50f, 1_000f); this.newSMGSound = new CAudioClip("Sound/smg_gun_shot", 1f, 0f); - this.newSMGSound.ENBBLJKNKIG(50f, 1_000f); + this.newSMGSound.FNHBCEACCHK(50f, 1_000f); this.onOldGunSoundChange(new object(), new EventArgs()); } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index f0f0719..9904279 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -1,7 +1,6 @@ using BepInEx.Configuration; using UnityEngine; -using CFPSGuy = MPFNCCPKLMG; namespace WBM { @@ -42,7 +41,7 @@ namespace WBM private void setCrouchState(bool crouchState) { // CFPSGuy.inSt.isCrouching - MPFNCCPKLMG.MPPOBOJEEKB.BEJAPOIAHJA = crouchState; + GJHNNGPDABK.DFMBPNJKOFB.CIANALPDBAI = crouchState; } } } From a6359cca7b765e745677190fceeed610ef3e1dcf Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 30 Apr 2022 12:24:12 +0900 Subject: [PATCH 31/34] v1.13.0.0 update: made it work in v465 --- WBM/MangledNames.cs | 34 +++++++++++++++++----------------- WBM/Util.cs | 12 ++++++------ WBM/WBM.cs | 2 +- WBM/features/core/core.cs | 28 ++++++++++++++-------------- WBM/features/fpsUnlock.cs | 10 +++++----- WBM/features/oldGunSound.cs | 9 +++++---- WBM/features/shiftToCrouch.cs | 2 +- 7 files changed, 49 insertions(+), 48 deletions(-) diff --git a/WBM/MangledNames.cs b/WBM/MangledNames.cs index 6f81469..fb94826 100644 --- a/WBM/MangledNames.cs +++ b/WBM/MangledNames.cs @@ -9,30 +9,30 @@ namespace WBM // Variables // - public const string AKRifleShotClip = "PIANBDGFMPJ"; - public const string SMGShotClip = "GAIEAFBFNAB"; + public const string AKRifleShotClip = "JMKOGEAHEEO"; + public const string SMGShotClip = "DFFGGCFCLLA"; // fps limit value - public const string fpsValue = "OEAAKDGKBJG"; - public const string showElo = "NGPMJKPPFMP"; + public const string fpsValue = "NMEFNDLAMJO"; + public const string showElo = "NGKFFEHNABD"; // show squad servers - public const string isClan = "KHIGIKJIMJE"; + public const string isClan = "LBFNALHNIPM"; // show testing servers - public const string isTesting = "PEGCAFFOBKF"; - public const string chatList = "BJAFAAOKHEH"; - public const string gameState = "IDGHJMCFNKE"; - public const string nickList = "IOOOOHMIOHH"; - public const string personGun = "EJDNEICNEPI"; - public const string localPlayerIndex = "GKFCPFOOPOA"; - public const string teamList = "CKBJDMPJHBO"; - public const string statsList = "MLOEONIFNIN"; + public const string isTesting = "BGPDGOKNOMA"; + public const string chatList = "OHFEDOINKKJ"; + public const string gameState = "LAKHBPCBDHD"; + public const string nickList = "HKCNPKMCEEI"; + public const string personGun = "MKDGGFLFIFB"; + public const string localPlayerIndex = "DNEGCKGOMNI"; + public const string teamList = "NNLNLLFJPCK"; + public const string statsList = "BENNIHEPNHP"; // // functions // - public const string drawChatMessage = "DFPHCJEPDED"; - public const string clearMessages = "IAIBHDNOAND"; - public const string onFPSChanged = "NJIPHOHHEHD"; - public const string addMessage = "CAJHEPNJNPG"; + public const string drawChatMessage = "JEAEIDKGGKL"; + public const string clearMessages = "DAALHBBPELA"; + public const string onFPSChanged = "INDPBMMBCBG"; + public const string addMessage = "FIKLAPEFMDK"; } } diff --git a/WBM/Util.cs b/WBM/Util.cs index 9925236..b169e42 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -6,7 +6,7 @@ using System.Text; using System.IO; using System.Threading.Tasks; using System.Runtime.Serialization.Json; -using CPersonGun = PBMBHMPCKCN; +using CPersonGun = BOKJJMJCNGM; namespace WBM { @@ -49,31 +49,31 @@ namespace WBM public static float getGunZoom(CPersonGun gun) { // CPersonGun.cameraZoom - return gun.GDFNMDDLJBC; + return gun.KJOHIDPMFGJ; } public static float getGunFireTimer(CPersonGun gun) { // CPersonGun.fireTimer - return gun.MJOHAFCEOHC; + return gun.LKMIHJFMGMP; } public static float getGunFireVelocity(CPersonGun gun) { // CPersonGun.fireVel - return gun.LIILKCBLDCK; + return gun.KNBPIMGMICO; } public static float getGunFireRate(CPersonGun gun) { // CPersonGun.fireRate - return gun.JNAJOIFEDCF; + return gun.AMBMNGKBKHL; } public static float getGunReloadTimer(CPersonGun gun) { // CPersonGun.reloadTimer - return gun.DEBADKJLNHC; + return gun.MEEIEBOPDGF; } } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 09876a5..97e51e3 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -13,7 +13,7 @@ namespace WBM { public const string programID = "com.developomp.wbm"; public const string programName = "War Brokers Mods"; - public const string programVersion = "1.12.0.0"; + public const string programVersion = "1.13.0.0"; /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index 9bcd6e7..13199f9 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -9,8 +9,8 @@ using System.IO; using System.Reflection; using System.Collections; using System.Collections.Generic; -using CPersonGun = PBMBHMPCKCN; -using SPlayerStats = MJMIHJNPLMG; +using CPersonGun = BOKJJMJCNGM; +using SPlayerStats = AOCINPBCGCH; namespace WBM { @@ -109,18 +109,18 @@ namespace WBM result[i] = new Data.PlayerStatsStruct { - kills = currentlyParsing.JOIIFMIBBAI, - deaths = currentlyParsing.FEOCHBMIJBI, - damage = currentlyParsing.EAPNFNFDGCL, - longestKill = currentlyParsing.BPGPCOCJLAC, - points = currentlyParsing.LDHFEPHBGBK, - headShots = currentlyParsing.GKDMEMOJEGK, - vote = currentlyParsing.KGHLJCNMHIB, - mapVote = currentlyParsing.JBOKOJHKECD, - gamesElo = currentlyParsing.GBCLFNNLHEP, - gamesEloDelta = currentlyParsing.PKPCAEJKOCG, - killsElo = currentlyParsing.DCFPFIFBGPL, - killsEloDelta = currentlyParsing.EHMJLJMBLGO, + kills = currentlyParsing.GDAAGFMFLNI, + deaths = currentlyParsing.CCJMDIHCBDP, + damage = currentlyParsing.OCGEPPGBDNH, + longestKill = currentlyParsing.CBALDOLFIHK, + points = currentlyParsing.AIEMHCIHIFN, + headShots = currentlyParsing.JGFCAIPDMIF, + vote = currentlyParsing.KHEHPPEJLFP, + mapVote = currentlyParsing.DDIINLJFLFD, + gamesElo = currentlyParsing.MHLFOIJHBAC, + gamesEloDelta = currentlyParsing.HFHOJIAHLIH, + killsElo = currentlyParsing.MKKAAMMOBJB, + killsEloDelta = currentlyParsing.CJLEKFIHJBM, }; } diff --git a/WBM/features/fpsUnlock.cs b/WBM/features/fpsUnlock.cs index fca5391..9a6aa63 100644 --- a/WBM/features/fpsUnlock.cs +++ b/WBM/features/fpsUnlock.cs @@ -17,19 +17,19 @@ namespace WBM private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess(MangledNames.fpsValue); - static bool Prefix(webguy __instance, float FFALKGOIMAL) + static bool Prefix(webguy __instance, float LFJDCBMHKHF) { - fpsValueRef(__instance) = FFALKGOIMAL; - int targetFrameRate = (int)(FFALKGOIMAL * maxTargetFrameRate); + fpsValueRef(__instance) = LFJDCBMHKHF; + int targetFrameRate = (int)(LFJDCBMHKHF * maxTargetFrameRate); if (targetFrameRate == 0) { - ((InfernalBehaviour)__instance).DBGHLKJOLEN(fpsSliderTextObj, __instance.GFPPHLOPCBA("Disabled")); + ((InfernalBehaviour)__instance).PNINPKEBNNF(fpsSliderTextObj, __instance.PECHBMNCFBF("Disabled")); targetFrameRate = defaultTargetFrameRate; } else { - ((InfernalBehaviour)__instance).DBGHLKJOLEN(fpsSliderTextObj, targetFrameRate.ToString()); + ((InfernalBehaviour)__instance).PNINPKEBNNF(fpsSliderTextObj, targetFrameRate.ToString()); } if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index c67aaae..565559b 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -3,7 +3,7 @@ using BepInEx.Configuration; using System; using System.Reflection; -using CAudioClip = JOHBIOLPABD; +using CAudioClip = EGMGOCHNIAA; namespace WBM { @@ -41,14 +41,15 @@ namespace WBM this.AKSoundRef = webguyType.GetField(MangledNames.AKRifleShotClip, bindFlags); this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags); + this.oldGunSound = new CAudioClip("Sound/gun_shot", 1f, 0f); - this.oldGunSound.FNHBCEACCHK(50f, 1_000f); + this.oldGunSound.GFHPMKOJOEA(50f, 1_000f); this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f); - this.newAKSound.FNHBCEACCHK(50f, 1_000f); + this.newAKSound.GFHPMKOJOEA(50f, 1_000f); this.newSMGSound = new CAudioClip("Sound/smg_gun_shot", 1f, 0f); - this.newSMGSound.FNHBCEACCHK(50f, 1_000f); + this.newSMGSound.GFHPMKOJOEA(50f, 1_000f); this.onOldGunSoundChange(new object(), new EventArgs()); } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index 9904279..025477b 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -41,7 +41,7 @@ namespace WBM private void setCrouchState(bool crouchState) { // CFPSGuy.inSt.isCrouching - GJHNNGPDABK.DFMBPNJKOFB.CIANALPDBAI = crouchState; + ELELEGKEADF.AMCHCJJPCJJ.OHALNEDGBNG = crouchState; } } } From c210ae8e81c75a1493610faed0284bde5d6b1633 Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 6 May 2022 23:15:38 +0900 Subject: [PATCH 32/34] v1.14 update: made it work in v466 --- WBM/MangledNames.cs | 34 +++++++++++++++++----------------- WBM/Util.cs | 12 ++++++------ WBM/WBM.cs | 2 +- WBM/features/core/core.cs | 28 ++++++++++++++-------------- WBM/features/fpsUnlock.cs | 10 +++++----- WBM/features/oldGunSound.cs | 8 ++++---- WBM/features/shiftToCrouch.cs | 2 +- 7 files changed, 48 insertions(+), 48 deletions(-) diff --git a/WBM/MangledNames.cs b/WBM/MangledNames.cs index fb94826..cfbf3de 100644 --- a/WBM/MangledNames.cs +++ b/WBM/MangledNames.cs @@ -9,30 +9,30 @@ namespace WBM // Variables // - public const string AKRifleShotClip = "JMKOGEAHEEO"; - public const string SMGShotClip = "DFFGGCFCLLA"; + public const string AKRifleShotClip = "AJLCLOJGKLF"; + public const string SMGShotClip = "GDKKJENDFOF"; // fps limit value - public const string fpsValue = "NMEFNDLAMJO"; - public const string showElo = "NGKFFEHNABD"; + public const string fpsValue = "PFOMGOFNIOE"; + public const string showElo = "JEFPGBDBGFF"; // show squad servers - public const string isClan = "LBFNALHNIPM"; + public const string isClan = "GHAAFBAPMMH"; // show testing servers - public const string isTesting = "BGPDGOKNOMA"; - public const string chatList = "OHFEDOINKKJ"; - public const string gameState = "LAKHBPCBDHD"; - public const string nickList = "HKCNPKMCEEI"; - public const string personGun = "MKDGGFLFIFB"; - public const string localPlayerIndex = "DNEGCKGOMNI"; - public const string teamList = "NNLNLLFJPCK"; - public const string statsList = "BENNIHEPNHP"; + public const string isTesting = "CIAFOJDAKFA"; + public const string chatList = "CBKINJHGBOM"; + public const string gameState = "HHBJFNILCBJ"; + public const string nickList = "MBFCFOPONAI"; + public const string personGun = "FDHBIGANHOH"; + public const string localPlayerIndex = "INGKMFAPBJC"; + public const string teamList = "GKDEFMOHMGH"; + public const string statsList = "GNKKKHEDFAN"; // // functions // - public const string drawChatMessage = "JEAEIDKGGKL"; - public const string clearMessages = "DAALHBBPELA"; - public const string onFPSChanged = "INDPBMMBCBG"; - public const string addMessage = "FIKLAPEFMDK"; + public const string drawChatMessage = "IACLHANNPED"; + public const string clearMessages = "NFNFPNGMKFD"; + public const string onFPSChanged = "EFDAECNGBEP"; + public const string addMessage = "GPIKJGHDPEA"; } } diff --git a/WBM/Util.cs b/WBM/Util.cs index b169e42..50fc610 100644 --- a/WBM/Util.cs +++ b/WBM/Util.cs @@ -6,7 +6,7 @@ using System.Text; using System.IO; using System.Threading.Tasks; using System.Runtime.Serialization.Json; -using CPersonGun = BOKJJMJCNGM; +using CPersonGun = JABKDMKNMKE; namespace WBM { @@ -49,31 +49,31 @@ namespace WBM public static float getGunZoom(CPersonGun gun) { // CPersonGun.cameraZoom - return gun.KJOHIDPMFGJ; + return gun.IDOOGDDHKOG; } public static float getGunFireTimer(CPersonGun gun) { // CPersonGun.fireTimer - return gun.LKMIHJFMGMP; + return gun.ABENIMBBCFL; } public static float getGunFireVelocity(CPersonGun gun) { // CPersonGun.fireVel - return gun.KNBPIMGMICO; + return gun.EMDMIEBFHDL; } public static float getGunFireRate(CPersonGun gun) { // CPersonGun.fireRate - return gun.AMBMNGKBKHL; + return gun.EDHPPDGFLEB; } public static float getGunReloadTimer(CPersonGun gun) { // CPersonGun.reloadTimer - return gun.MEEIEBOPDGF; + return gun.ALNGHNHLNGP; } } } diff --git a/WBM/WBM.cs b/WBM/WBM.cs index 97e51e3..d7774d1 100644 --- a/WBM/WBM.cs +++ b/WBM/WBM.cs @@ -13,7 +13,7 @@ namespace WBM { public const string programID = "com.developomp.wbm"; public const string programName = "War Brokers Mods"; - public const string programVersion = "1.13.0.0"; + public const string programVersion = "1.14.0.0"; /// This function is called as soon as the component becomes active. /// It is the first event function that's called during the component's lifecycle. diff --git a/WBM/features/core/core.cs b/WBM/features/core/core.cs index 13199f9..0bd4541 100644 --- a/WBM/features/core/core.cs +++ b/WBM/features/core/core.cs @@ -9,8 +9,8 @@ using System.IO; using System.Reflection; using System.Collections; using System.Collections.Generic; -using CPersonGun = BOKJJMJCNGM; -using SPlayerStats = AOCINPBCGCH; +using CPersonGun = JABKDMKNMKE; +using SPlayerStats = INPDBACNIGK; namespace WBM { @@ -109,18 +109,18 @@ namespace WBM result[i] = new Data.PlayerStatsStruct { - kills = currentlyParsing.GDAAGFMFLNI, - deaths = currentlyParsing.CCJMDIHCBDP, - damage = currentlyParsing.OCGEPPGBDNH, - longestKill = currentlyParsing.CBALDOLFIHK, - points = currentlyParsing.AIEMHCIHIFN, - headShots = currentlyParsing.JGFCAIPDMIF, - vote = currentlyParsing.KHEHPPEJLFP, - mapVote = currentlyParsing.DDIINLJFLFD, - gamesElo = currentlyParsing.MHLFOIJHBAC, - gamesEloDelta = currentlyParsing.HFHOJIAHLIH, - killsElo = currentlyParsing.MKKAAMMOBJB, - killsEloDelta = currentlyParsing.CJLEKFIHJBM, + kills = currentlyParsing.JJEIOHLJMHO, + deaths = currentlyParsing.CADBJPEGEAL, + damage = currentlyParsing.MBNBFDFDBAN, + longestKill = currentlyParsing.FNOCIFHHINH, + points = currentlyParsing.AIDBBHHNCAK, + headShots = currentlyParsing.FJPBIMILEPN, + vote = currentlyParsing.ILNFHPIOPCI, + mapVote = currentlyParsing.DPMNDAMAHML, + gamesElo = currentlyParsing.OPMKKKJPDON, + gamesEloDelta = currentlyParsing.BIFCAPOBMIO, + killsElo = currentlyParsing.ICIBGMLJNHJ, + killsEloDelta = currentlyParsing.ONICDMLDBFL, }; } diff --git a/WBM/features/fpsUnlock.cs b/WBM/features/fpsUnlock.cs index 9a6aa63..5e2a920 100644 --- a/WBM/features/fpsUnlock.cs +++ b/WBM/features/fpsUnlock.cs @@ -17,19 +17,19 @@ namespace WBM private static Slider slider = GameObject.Find("fpsSlider").GetComponent(); private static AccessTools.FieldRef fpsValueRef = AccessTools.FieldRefAccess(MangledNames.fpsValue); - static bool Prefix(webguy __instance, float LFJDCBMHKHF) + static bool Prefix(webguy __instance, float CNFIJGNCMNE) { - fpsValueRef(__instance) = LFJDCBMHKHF; - int targetFrameRate = (int)(LFJDCBMHKHF * maxTargetFrameRate); + fpsValueRef(__instance) = CNFIJGNCMNE; + int targetFrameRate = (int)(CNFIJGNCMNE * maxTargetFrameRate); if (targetFrameRate == 0) { - ((InfernalBehaviour)__instance).PNINPKEBNNF(fpsSliderTextObj, __instance.PECHBMNCFBF("Disabled")); + ((InfernalBehaviour)__instance).CEHBKMNGHPG(fpsSliderTextObj, __instance.ILCOAONDEKP("Disabled")); targetFrameRate = defaultTargetFrameRate; } else { - ((InfernalBehaviour)__instance).PNINPKEBNNF(fpsSliderTextObj, targetFrameRate.ToString()); + ((InfernalBehaviour)__instance).CEHBKMNGHPG(fpsSliderTextObj, targetFrameRate.ToString()); } if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5; diff --git a/WBM/features/oldGunSound.cs b/WBM/features/oldGunSound.cs index 565559b..475fa81 100644 --- a/WBM/features/oldGunSound.cs +++ b/WBM/features/oldGunSound.cs @@ -3,7 +3,7 @@ using BepInEx.Configuration; using System; using System.Reflection; -using CAudioClip = EGMGOCHNIAA; +using CAudioClip = KGEACBNNOIM; namespace WBM { @@ -43,13 +43,13 @@ namespace WBM this.oldGunSound = new CAudioClip("Sound/gun_shot", 1f, 0f); - this.oldGunSound.GFHPMKOJOEA(50f, 1_000f); + this.oldGunSound.DMMKODLJJGP(50f, 1_000f); this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f); - this.newAKSound.GFHPMKOJOEA(50f, 1_000f); + this.newAKSound.DMMKODLJJGP(50f, 1_000f); this.newSMGSound = new CAudioClip("Sound/smg_gun_shot", 1f, 0f); - this.newSMGSound.GFHPMKOJOEA(50f, 1_000f); + this.newSMGSound.DMMKODLJJGP(50f, 1_000f); this.onOldGunSoundChange(new object(), new EventArgs()); } diff --git a/WBM/features/shiftToCrouch.cs b/WBM/features/shiftToCrouch.cs index 025477b..61a4edc 100644 --- a/WBM/features/shiftToCrouch.cs +++ b/WBM/features/shiftToCrouch.cs @@ -41,7 +41,7 @@ namespace WBM private void setCrouchState(bool crouchState) { // CFPSGuy.inSt.isCrouching - ELELEGKEADF.AMCHCJJPCJJ.OHALNEDGBNG = crouchState; + HGIJNAOOGIC.AIPINJPLLIN.GDKHEALABDI = crouchState; } } } From 3c7d101d721be921506ebb9213f2bfe4f357e588 Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 6 May 2022 23:15:50 +0900 Subject: [PATCH 33/34] improved building instruction --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a43442d..2545ddc 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,8 @@ and can create hacks on their own anyway. WB_PLUGINS_DIR="" ``` -5. Now you can run the scripts. +5. Install the `zip` cli. Most likely you already have it. +6. Now you can run the scripts. - `scripts/debug.sh`: Builds WBM in debug mode and copy the files to the plugins directory. - `scripts/release.sh`: Creates a zip file that can be uploaded to the gh release section. From 1ab9848ee7fb8ba3356683da92296f44dc4dae02 Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 29 Jun 2022 23:53:27 +0900 Subject: [PATCH 34/34] archive project --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 2545ddc..74ab963 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # [War Brokers Mods (WBM)](https://github.com/War-Brokers-Mods/WBM) +WBM has been officially included into the game + +

+Potentially outdated information (click to unfold) + [![what's this?](https://img.shields.io/badge/what's_this%3F-grey?style=for-the-badge)](https://developomp.com/portfolio/wbm) [![discord invite](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/aQqamSCUcS) [![video tutorial](https://img.shields.io/badge/video_tutorial-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/watch?v=ZBE3nVvHwF8&t=64s) @@ -281,3 +286,5 @@ The source code for this project is available under the [MIT License](https://op Fonts: - https://fonts.google.com/specimen/Architects+Daughter : OFL (used in WBM logo) + +