fixed WBM not working on newest update
This commit is contained in:
parent
fc41218d57
commit
8e0dc4465b
6 changed files with 31 additions and 20 deletions
|
@ -192,9 +192,10 @@ If you are a casual user, this is completely unnecessary. **This is only recomme
|
|||
|
||||
1. Install .NET sdk.
|
||||
2. Clone this repository.
|
||||
3. Copy all DLL files from `<WB install path>/war_brokers_Data/Managed/` 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`.
|
||||
3. Copy all DLL files from `<WB install path>/war_brokers_Data/Managed/` to `WBM/dll/`. Create directory if it does not exist.
|
||||
4. Copy `BepInEx.dll` from `<WB install path>/BepInEx/core` to `WBM/dll/`. Create directory if it does not exist.
|
||||
5. 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.
|
||||
6. Create `scripts/config.sh`.
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
@ -202,7 +203,7 @@ If you are a casual user, this is completely unnecessary. **This is only recomme
|
|||
WB_PLUGINS_DIR="<PATH_TO_PLUGINS_DIRECTORY_HERE>"
|
||||
```
|
||||
|
||||
6. Now you can run the scripts.
|
||||
7. 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.
|
||||
|
|
20
WBM/WBM.cs
20
WBM/WBM.cs
|
@ -6,15 +6,29 @@ using UnityEngine.Networking;
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WBM
|
||||
{
|
||||
[BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.5.0.0")]
|
||||
[BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.5.1.0")]
|
||||
public partial class WBM : BaseUnityPlugin
|
||||
{
|
||||
private async void Start()
|
||||
{
|
||||
Logger.LogDebug("Initializing");
|
||||
|
||||
// Initialization moved to Start() because of BepInEx error
|
||||
this.data = new Data.SerializableData();
|
||||
this.killStreakAudioDict = new Dictionary<string, AudioClip>();
|
||||
this.killStreakSFXDictionary = new Dictionary<int, string>()
|
||||
{
|
||||
{10, "rampage"},
|
||||
{20, "killing spree"},
|
||||
{30, "unstoppable"},
|
||||
{50, "godlike"},
|
||||
{69, "nice"},
|
||||
};
|
||||
|
||||
this.webguy = FindObjectOfType<webguy>();
|
||||
|
||||
System.Type webguyType = typeof(webguy);
|
||||
|
@ -217,7 +231,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.5.0.0"
|
||||
v1.5.1.0"
|
||||
);
|
||||
|
||||
if (this.data.localPlayerIndex >= 0)
|
||||
|
@ -309,7 +323,7 @@ zoom: {Util.getGunZoom(this.personGun)}"
|
|||
GUI.Label(new Rect(Screen.width - 100, 440 + teamStatOffset, 70, 190), teamDamage);
|
||||
|
||||
GUI.Label(
|
||||
new Rect(Screen.width - 315, 595 + teamStatOffset, 300, 55),
|
||||
new Rect(Screen.width - 315, 620 + teamStatOffset, 300, 55),
|
||||
$@"total damage: {teamTotalDamage}
|
||||
total deaths: {teamTotalDeaths}
|
||||
total kills: {teamTotalKills}"
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
<Reference Include="BepInEx">
|
||||
<HintPath>dll\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebSocketSharp">
|
||||
<HintPath>dll\websocket-sharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>dll\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -56,4 +53,8 @@
|
|||
<HintPath>dll\UnityEngine.UnityWebRequestModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WebSocketSharp" Version="1.0.3-rc11" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace WBM
|
|||
// websocket data stuff
|
||||
private WebSocketSharp.Server.WebSocketServer server;
|
||||
private ushort serverPort = 24601;
|
||||
private Data.SerializableData data = new Data.SerializableData();
|
||||
private Data.SerializableData data;
|
||||
|
||||
// internal or temporary
|
||||
private bool _showConfig;
|
||||
|
@ -69,17 +69,10 @@ namespace WBM
|
|||
private ConfigEntry<KeyboardShortcut> clearDeathLogShortcut;
|
||||
|
||||
// Audio
|
||||
private Dictionary<string, AudioClip> killStreakAudioDict = new Dictionary<string, AudioClip>();
|
||||
private Dictionary<string, AudioClip> killStreakAudioDict;
|
||||
private string audioPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "assets/audio");
|
||||
private AudioSource killStreakAudioSource;
|
||||
private Dictionary<int, string> killStreakSFXDictionary = new Dictionary<int, string>()
|
||||
{
|
||||
{10, "rampage"},
|
||||
{20, "killing spree"},
|
||||
{30, "unstoppable"},
|
||||
{50, "godlike"},
|
||||
{69, "nice"},
|
||||
};
|
||||
private Dictionary<int, string> killStreakSFXDictionary;
|
||||
|
||||
// memory stuff
|
||||
private static BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static;
|
||||
|
|
|
@ -13,5 +13,6 @@ dotnet build
|
|||
rm "$WB_PLUGINS_DIR/WBM/WBM.dll"
|
||||
mkdir -p "$WB_PLUGINS_DIR/WBM"
|
||||
cp ./WBM/bin/Debug/net48/WBM.dll "$WB_PLUGINS_DIR/WBM/WBM.dll"
|
||||
cp ./WBM/bin/Debug/net48/websocket-sharp.dll "$WB_PLUGINS_DIR/WBM/websocket-sharp.dll"
|
||||
cp ./WBM/dll/ConfigurationManager.dll "$WB_PLUGINS_DIR/WBM/ConfigurationManager.dll"
|
||||
cp -R ./assets "$WB_PLUGINS_DIR/WBM"
|
||||
|
|
|
@ -13,6 +13,7 @@ dotnet build --configuration Release
|
|||
[ -e ./dist ] && rm -rf ./dist
|
||||
mkdir ./dist
|
||||
cp ./WBM/bin/Release/net48/WBM.dll ./dist/WBM.dll
|
||||
cp ./WBM/bin/Release/net48/websocket-sharp.dll ./dist/websocket-sharp.dll
|
||||
cp ./WBM/dll/ConfigurationManager.dll ./dist/ConfigurationManager.dll
|
||||
cp -R ./assets ./dist/assets
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue