i hope ts works

This commit is contained in:
2026-06-20 10:48:55 -06:00
parent 6ff9194e29
commit ce7d747ab5
477 changed files with 26547 additions and 5 deletions
Submodule SelfTrackerWithGifs deleted from b15f3358e8
@@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/.idea.SelfTracker.iml
/projectSettingsUpdater.xml
/contentModel.xml
/modules.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
<option name="applicationTheme" value="default" />
<option name="iconsTheme" value="default" />
<option name="button1Title" value="" />
<option name="button1Url" value="" />
<option name="button2Title" value="" />
<option name="button2Url" value="" />
<option name="customApplicationId" value="" />
</component>
</project>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 HanSolo1000Falcon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+9
View File
@@ -0,0 +1,9 @@
This is a fork of HanSolo1000Falcon's mod "Self Tracker", but I added gifs corresponding to what webhook activity you send.
This mod pulls the gifs from my website [https://images.elliemese.win/](https://images.elliemese.win/), if you'd like to use your own gifs, feel free to make a fork, and redirect all the gifs to your own repo/your own website/however you hold your gifs/images. I am planning to add a config so you can change the gifs, but thats for a way later time when I actually know how to code lol.
If you want to contact me for any reason, message me on discord. My @ is "@ModdedAxo".
![Image showing what the gif in the webhook looks like](https://raw.githubusercontent.com/axojeff/SelfTrackerWithGifs/refs/heads/master/SelfTracker/WebhookImage.png)
> This product is not affiliated with Another Axiom Inc. or its videogames Gorilla Tag and Orion Drift and is not endorsed or otherwise sponsored by Another Axiom. Portions of the materials contained herein are property of Another Axiom. ©2021 Another Axiom Inc.
+16
View File
@@ -0,0 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SelfTracker", "SelfTracker\SelfTracker.csproj", "{FDE80AD6-4712-490A-A821-75C5347A631D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FDE80AD6-4712-490A-A821-75C5347A631D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDE80AD6-4712-490A-A821-75C5347A631D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDE80AD6-4712-490A-A821-75C5347A631D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDE80AD6-4712-490A-A821-75C5347A631D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
+390
View File
@@ -0,0 +1,390 @@
*-v.zip
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Nuget personal access tokens and Credentials
nuget.config
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
.idea/
*.sln.iml
@@ -0,0 +1,8 @@
namespace SelfTracker;
public class Constants
{
public const string PluginGuid = "hansolo1000falcon.selftracker";
public const string PluginName = "SelfTrackerWithGifs";
public const string PluginVersion = "1.0.0";
}
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<PropertyGroup>
<GamePath>C:\Program Files (x86)\Steam\steamapps\common\Gorilla Tag</GamePath>
<GameAssemblyPath>$(GamePath)\Gorilla Tag_Data\Managed</GameAssemblyPath>
<BepInExAssemblyPath>$(GamePath)\BepInEx\core</BepInExAssemblyPath>
<PluginsPath>$(GamePath)\BepInEx\plugins</PluginsPath>
</PropertyGroup>
<PropertyGroup Condition="'$(CI)'=='TRUE'">
<GameAssemblyPath>.\Libs</GameAssemblyPath>
<BepInExAssemblyPath>.\Libs</BepInExAssemblyPath>
<PluginsPath>.\Libs</PluginsPath>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
</Project>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<Target Name="CopyToPlugins" AfterTargets="Build" Condition="'$(CI)' != 'TRUE'">
<ItemGroup>
<FilesToCopy Include="$(TargetPath)" />
<FilesToCopy Include="$(TargetDir)$(TargetName).pdb" Condition="Exists('$(TargetDir)$(TargetName).pdb')" />
</ItemGroup>
<Copy SourceFiles="@(FilesToCopy)" DestinationFiles="@(FilesToCopy->'$(PluginsPath)\$(ProjectName)\%(Filename)%(Extension)')" />
<Message Text="Copied $(TargetFileName) and $(TargetName).pdb to Plugins" Importance="high"/>
</Target>
</Project>
@@ -0,0 +1,9 @@
# Needs to be at least that version, or mmm can't read the archive
#Requires -Modules @{ ModuleName="Microsoft.PowerShell.Archive"; ModuleVersion="1.2.3" }
$MyInvocation.MyCommand.Path | Split-Path | Push-Location # Run from this script's directory
$Name = (ls *.csproj).BaseName
dotnet build -c Release
mkdir BepInEx\plugins\$Name
cp bin\Release\netstandard2.0\$Name.dll BepInEx\plugins\$Name\
Compress-Archive .\BepInEx\ $Name-v
rmdir .\BepInEx\ -Recurse
@@ -0,0 +1,35 @@
using GorillaNetworking;
using HarmonyLib;
using Photon.Pun;
namespace SelfTracker;
[HarmonyPatch(typeof(VRRig), nameof(VRRig.SetNameTagText))]
public static class NameChangePatch
{
private static void Postfix(VRRig __instance, string name)
{
if (!Plugin.Instance.IsInRoom || !__instance.isLocal)
return;
string map = PhotonNetworkController.Instance.currentJoinTrigger == null
? "forest"
: PhotonNetworkController.Instance.currentJoinTrigger.networkZone;
map = map.ToUpper();
string json = $@"
{{
""embeds"": [
{{
""title"": ""{Plugin.Instance.PlayerName.Value} has joined code `{Plugin.Instance.CurrentRoomName}`"",
""description"": ""In game name: `{name}`\nPlayers in room: `{NetworkSystem.Instance.RoomPlayerCount}`\nMap: `{map}`\nPublic room: `{PhotonNetwork.CurrentRoom.IsVisible}`\nIs Modded: `{NetworkSystem.Instance.GameModeString.Contains("MODDED")}`\nGamemode: `{Plugin.Instance.GetGamemodeKey(NetworkSystem.Instance.GameModeString)}`\nQueue: `{Plugin.Instance.GetQueueKey(NetworkSystem.Instance.GameModeString)}`"",
""color"": 7415295,
""""image"""": {{{{ """"url"""": """"https://raw.githubusercontent.com/axojeff/AxosGorillaInfo/refs/heads/main/JoinLobby.gif"""" }}}},
""footer"": {{ ""text"": ""Self Tracker by HanSolo1000Falcon, and Forked by ModdedAxo"" }}
}}
]
}}";
Plugin.Instance.SendWebhook(json, true);
}
}
+274
View File
@@ -0,0 +1,274 @@
using System;
using System.Collections;
using System.IO;
using System.Net.Http;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using GorillaNetworking;
using HarmonyLib;
using Photon.Pun;
using UnityEngine;
using UnityEngine.Networking;
using Application = UnityEngine.Device.Application;
namespace SelfTracker;
[BepInPlugin(Constants.PluginGuid, Constants.PluginName, Constants.PluginVersion)]
public class Plugin : BaseUnityPlugin
{
public static Plugin Instance { get; private set; }
public bool IsInRoom;
public string CurrentRoomName;
public ConfigEntry<string> PlayerName;
private ConfigEntry<string> webhookUrl;
private string messageId;
private HttpClient client = new();
private void Awake()
{
Instance = this;
ConfigFile configFile = new ConfigFile(Path.Combine(Paths.ConfigPath, "SelfTracker.cfg"), true);
webhookUrl = configFile.Bind("General", "Webhook URL", "https://discord.com/api/webhooks/", "Webhook URL to send the data to");
PlayerName = configFile.Bind("General", "Player Name", "PlayerName", "Your player name, so you can identify who started the game");
Application.quitting += OnQuit;
DontDestroyOnLoad(gameObject);
}
private void Start()
{
GorillaTagger.OnPlayerSpawned(OnGameInitialized);
Harmony harmony = new(Constants.PluginGuid);
harmony.PatchAll();
}
private void OnGameInitialized()
{
string json = $@"
{{
""embeds"": [
{{
""title"": ""{PlayerName.Value} has started Gorilla Tag"",
""color"": 7415295,
""image"": {{ ""url"": ""https://images.elliemese.win/OpenGame.gif"" }},
""footer"": {{ ""text"": ""Self Tracker by HanSolo1000Falcon, and Forked by ModdedAxo"" }}
}}
]
}}";
SendWebhook(json);
NetworkSystem.Instance.OnJoinedRoomEvent += (Action)OnJoinedRoom;
NetworkSystem.Instance.OnReturnedToSinglePlayer += (Action)OnLeftRoom;
NetworkSystem.Instance.OnPlayerJoined += (Action<NetPlayer>)OnPlayerJoined;
NetworkSystem.Instance.OnPlayerLeft += (Action<NetPlayer>)OnPlayerLeft;
}
private void OnPlayerJoined(NetPlayer fuckingWeirdo)
{
if (fuckingWeirdo.IsLocal)
return;
string map = PhotonNetworkController.Instance.currentJoinTrigger == null
? "forest"
: PhotonNetworkController.Instance.currentJoinTrigger.networkZone;
map = map.ToUpper();
string json = $@"
{{
""embeds"": [
{{
""title"": ""{PlayerName.Value} has joined code `{CurrentRoomName}`"",
""description"": ""In game name: `{PhotonNetwork.LocalPlayer.NickName}`\nPlayers in room: `{NetworkSystem.Instance.RoomPlayerCount}`\nMap: `{map}`\nPublic room: `{PhotonNetwork.CurrentRoom.IsVisible}`\nIs Modded: `{NetworkSystem.Instance.GameModeString.Contains("MODDED")}`\nGamemode: `{GetGamemodeKey(NetworkSystem.Instance.GameModeString)}`\nQueue: `{GetQueueKey(NetworkSystem.Instance.GameModeString)}`"",
""color"": 7415295,
""image"": {{ ""url"": ""https://images.elliemese.win/JoinLobby.gif"" }},
""footer"": {{ ""text"": ""Self Tracker by HanSolo1000Falcon, and Forked by ModdedAxo"" }}
}}
]
}}";
SendWebhook(json, true);
}
private void OnPlayerLeft(NetPlayer fuckingWeirdo)
{
if (fuckingWeirdo.IsLocal)
return;
string map = PhotonNetworkController.Instance.currentJoinTrigger == null
? "forest"
: PhotonNetworkController.Instance.currentJoinTrigger.networkZone;
map = map.ToUpper();
string json = $@"
{{
""embeds"": [
{{
""title"": ""{PlayerName.Value} has joined code `{CurrentRoomName}`"",
""description"": ""In game name: `{PhotonNetwork.LocalPlayer.NickName}`\nPlayers in room: `{NetworkSystem.Instance.RoomPlayerCount}`\nMap: `{map}`\nPublic room: `{PhotonNetwork.CurrentRoom.IsVisible}`\nIs Modded: `{NetworkSystem.Instance.GameModeString.Contains("MODDED")}`\nGamemode: `{GetGamemodeKey(NetworkSystem.Instance.GameModeString)}`\nQueue: `{GetQueueKey(NetworkSystem.Instance.GameModeString)}`"",
""color"": 7415295,
""image"": {{ ""url"": ""https://images.elliemese.win/JoinLobby.gif"" }},
""footer"": {{ ""text"": ""Self Tracker by HanSolo1000Falcon, and Forked by ModdedAxo"" }}
}}
]
}}";
SendWebhook(json, true);
}
private void OnJoinedRoom()
{
IsInRoom = true;
CurrentRoomName = NetworkSystem.Instance.RoomName;
string map = PhotonNetworkController.Instance.currentJoinTrigger == null
? "forest"
: PhotonNetworkController.Instance.currentJoinTrigger.networkZone;
map = map.ToUpper();
string json = $@"
{{
""embeds"": [
{{
""title"": ""{PlayerName.Value} has joined code `{CurrentRoomName}`"",
""description"": ""In game name: `{PhotonNetwork.LocalPlayer.NickName}`\nPlayers in room: `{NetworkSystem.Instance.RoomPlayerCount}`\nMap: `{map}`\nPublic room: `{PhotonNetwork.CurrentRoom.IsVisible}`\nIs Modded: `{NetworkSystem.Instance.GameModeString.Contains("MODDED")}`\nGamemode: `{GetGamemodeKey(NetworkSystem.Instance.GameModeString)}`\nQueue: `{GetQueueKey(NetworkSystem.Instance.GameModeString)}`"",
""color"": 7415295,
""image"": {{ ""url"": ""https://images.elliemese.win/JoinLobby.gif"" }},
""footer"": {{ ""text"": ""Self Tracker by HanSolo1000Falcon, and Forked by ModdedAxo"" }}
}}
]
}}";
SendWebhook(json);
}
private void OnQuit()
{
string json = $@"
{{
""embeds"": [
{{
""title"": ""{PlayerName.Value} has quit Gorilla Tag"",
""color"": 7415295,
""image"": {{ ""url"": ""https://images.elliemese.win/CloseGame.gif"" }},
""footer"": {{ ""text"": ""Self Tracker by HanSolo1000Falcon, and Forked by ModdedAxo"" }}
}}
]
}}";
SendWebhook(json);
}
private void OnLeftRoom()
{
if (!IsInRoom)
return;
IsInRoom = false;
string json = $@"
{{
""embeds"": [
{{
""title"": ""{PlayerName.Value} has left the code `{CurrentRoomName}`"",
""color"": 7415295,
""image"": {{ ""url"": ""https://images.elliemese.win/LobbyLeaveComputer.gif"" }},
""footer"": {{ ""text"": ""Self Tracker by HanSolo1000Falcon, and Forked by ModdedAxo"" }}
}}
]
}}";
SendWebhook(json);
}
public string GetGamemodeKey(string gamemodeString)
{
gamemodeString = gamemodeString.ToUpper();
if (gamemodeString.Contains("CASUAL")) return "CASUAL";
if (gamemodeString.Contains("INFECTION")) return "INFECTION";
if (gamemodeString.Contains("HUNT")) return "HUNT";
if (gamemodeString.Contains("Freeze")) return "FREEZE";
if (gamemodeString.Contains("PAINTBRAWL")) return "PAINTBRAWL";
if (gamemodeString.Contains("AMBUSH")) return "AMBUSH";
if (gamemodeString.Contains("GHOST")) return "GHOST";
if (gamemodeString.Contains("GUARDIAN")) return "GUARDIAN";
return gamemodeString;
}
public string GetQueueKey(string gamemodeString)
{
gamemodeString = gamemodeString.ToUpper();
if (gamemodeString.Contains("DEFAULT")) return "DEFAULT";
if (gamemodeString.Contains("MINIGAMES")) return "MINI GAMES";
if (gamemodeString.Contains("COMPETITIVE")) return "COMPETITIVE";
return gamemodeString;
}
public void SendWebhook(string json, bool isEditing = false)
{
StartCoroutine(SendWebhookAsync(json, isEditing));
/*try
{
var content = new StringContent(json, Encoding.UTF8, "application/json");
client.PostAsync(webhookUrl.Value, content).GetAwaiter().GetResult();
} catch { }*/
}
private IEnumerator SendWebhookAsync(string json, bool isEditing)
{
UnityWebRequest request;
if (!isEditing)
{
request = new UnityWebRequest(webhookUrl.Value + "?wait=true", "POST");
}
else
{
string editUrl = $"{webhookUrl.Value}/messages/{messageId}";
request = new UnityWebRequest(editUrl, "PATCH");
}
byte[] bodyRaw = Encoding.UTF8.GetBytes(json);
request.uploadHandler = new UploadHandlerRaw(bodyRaw);
request.downloadHandler = new DownloadHandlerBuffer();
request.SetRequestHeader("Content-Type", "application/json");
yield return request.SendWebRequest();
if (request.result != UnityWebRequest.Result.Success)
{
Debug.LogError($"Webhook {(isEditing ? "edit" : "send")} failed: {request.error}");
}
else
{
Debug.Log($"Webhook {(isEditing ? "edited" : "sent")} successfully.");
if (!isEditing)
{
var responseText = request.downloadHandler.text;
int idIndex = responseText.IndexOf("\"id\":\"", StringComparison.Ordinal);
if (idIndex >= 0)
{
int start = idIndex + 6;
int end = responseText.IndexOf('"', start);
messageId = responseText.Substring(start, end - start);
Debug.Log($"Captured messageId: {messageId}");
}
else
{
Debug.LogError("Failed to parse messageId from webhook response: " + responseText);
}
}
}
}
}
@@ -0,0 +1,289 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>$(BepInExAssemblyPath)\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>$(GameAssemblyPath)\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>$(GameAssemblyPath)\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="BakeryRuntimeAssembly">
<HintPath>$(GameAssemblyPath)\BakeryRuntimeAssembly.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>$(BepInExAssemblyPath)\BepInEx.dll</HintPath>
</Reference>
<Reference Include="BepInEx.Harmony">
<HintPath>$(BepInExAssemblyPath)\BepInEx.Harmony.dll</HintPath>
</Reference>
<Reference Include="Cinemachine">
<HintPath>$(GameAssemblyPath)\Cinemachine.dll</HintPath>
</Reference>
<Reference Include="clipper_library">
<HintPath>$(GameAssemblyPath)\clipper_library.dll</HintPath>
</Reference>
<Reference Include="Mono.Security">
<HintPath>$(GameAssemblyPath)\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="Oculus.Platform">
<HintPath>$(GameAssemblyPath)\Oculus.Platform.dll</HintPath>
</Reference>
<Reference Include="Oculus.VR">
<HintPath>$(GameAssemblyPath)\Oculus.VR.dll</HintPath>
</Reference>
<Reference Include="Photon3Unity3D">
<HintPath>$(GameAssemblyPath)\Photon3Unity3D.dll</HintPath>
</Reference>
<Reference Include="PhotonRealtime">
<HintPath>$(GameAssemblyPath)\PhotonRealtime.dll</HintPath>
</Reference>
<Reference Include="PhotonUnityNetworking">
<HintPath>$(GameAssemblyPath)\PhotonUnityNetworking.dll</HintPath>
</Reference>
<Reference Include="PhotonUnityNetworking.Utilities">
<HintPath>$(GameAssemblyPath)\PhotonUnityNetworking.Utilities.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice">
<HintPath>$(GameAssemblyPath)\PhotonVoice.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice.API">
<HintPath>$(GameAssemblyPath)\PhotonVoice.API.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice.PUN">
<HintPath>$(GameAssemblyPath)\PhotonVoice.PUN.dll</HintPath>
</Reference>
<Reference Include="PlayFab">
<HintPath>$(GameAssemblyPath)\PlayFab.dll</HintPath>
</Reference>
<Reference Include="System.EnterpriseServices">
<HintPath>$(GameAssemblyPath)\System.EnterpriseServices.dll</HintPath>
</Reference>
<Reference Include="System.ServiceModel.Internals">
<HintPath>$(GameAssemblyPath)\System.ServiceModel.Internals.dll</HintPath>
</Reference>
<Reference Include="Unity.Animation.Rigging">
<HintPath>$(GameAssemblyPath)\Unity.Animation.Rigging.dll</HintPath>
</Reference>
<Reference Include="Unity.Burst">
<HintPath>$(GameAssemblyPath)\Unity.Burst.dll</HintPath>
</Reference>
<Reference Include="Unity.Burst.Unsafe">
<HintPath>$(GameAssemblyPath)\Unity.Burst.Unsafe.dll</HintPath>
</Reference>
<Reference Include="Unity.InputSystem">
<HintPath>$(GameAssemblyPath)\Unity.InputSystem.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics">
<HintPath>$(GameAssemblyPath)\Unity.Mathematics.dll</HintPath>
</Reference>
<Reference Include="Unity.Timeline">
<HintPath>$(GameAssemblyPath)\Unity.Timeline.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics">
<HintPath>$(GameAssemblyPath)\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="Unity.XR.Interaction.Toolkit">
<HintPath>$(GameAssemblyPath)\Unity.XR.Interaction.Toolkit.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(GameAssemblyPath)\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AccessibilityModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AccessibilityModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AndroidJNIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AndroidJNIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ARModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ARModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClothModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ClothModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterInputModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ClusterInputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterRendererModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ClusterRendererModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CrashReportingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.CrashReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.DirectorModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.DirectorModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.DSPGraphModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.DSPGraphModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GameCenterModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.GameCenterModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GridModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.GridModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.HotReloadModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.HotReloadModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.InputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.LocalizationModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.LocalizationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ParticleSystemModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ParticleSystemModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PerformanceReportingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.PerformanceReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Physics2DModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.Physics2DModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ProfilerModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ProfilerModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ScreenCaptureModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ScreenCaptureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SharedInternalsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SharedInternalsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpatialTracking">
<HintPath>$(GameAssemblyPath)\UnityEngine.SpatialTracking.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteMaskModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SpriteMaskModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteShapeModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SpriteShapeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.StreamingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.StreamingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SubstanceModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SubstanceModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SubsystemsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SubsystemsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TerrainModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainPhysicsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TerrainPhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextCoreModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TextCoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TilemapModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TilemapModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TLSModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TLSModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>$(GameAssemblyPath)\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIElementsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UIElementsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UmbraModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UmbraModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UNETModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UNETModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityAnalyticsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityAnalyticsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityConnectModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityConnectModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityTestProtocolModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityTestProtocolModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestAssetBundleModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestAudioModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestAudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestTextureModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestTextureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestWWWModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestWWWModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VehiclesModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VehiclesModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VFXModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VFXModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VideoModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VideoModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VRModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VRModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.WindModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.WindModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.XR.LegacyInputHelpers">
<HintPath>$(GameAssemblyPath)\UnityEngine.XR.LegacyInputHelpers.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.XRModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.XRModule.dll</HintPath>
</Reference>
<Reference Include="websocket-sharp">
<HintPath>$(GameAssemblyPath)\websocket-sharp.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB