Compare commits
No commits in common. "master" and "master" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
@ -52,4 +52,3 @@ WIP/CWX-BackpackReload/CWX-BackpackReload/obj
|
||||
|
||||
WIP/CWX-BUNDLEMAKER/BUNDLEMAKER/bin
|
||||
WIP/CWX-BUNDLEMAKER/BUNDLEMAKER/obj
|
||||
Live/CWX_Mods.sln.DotSettings.user
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\Shared\Aki.Reflection.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\Shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>..\Shared\Comfort.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\Shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AudioModule">
|
||||
<HintPath>..\Shared\UnityEngine.AudioModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.AudioModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UnityWebRequestAudioModule">
|
||||
<HintPath>..\Shared\UnityEngine.UnityWebRequestAudioModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.UnityWebRequestAudioModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UnityWebRequestModule">
|
||||
<HintPath>..\Shared\UnityEngine.UnityWebRequestModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.UnityWebRequestModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
@ -8,34 +8,34 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Common">
|
||||
<HintPath>..\Shared\Aki.Common.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\Shared\Aki.Reflection.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\Shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>..\Shared\Comfort.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\Shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AssetBundleModule">
|
||||
<HintPath>..\Shared\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.PhysicsModule">
|
||||
<HintPath>..\Shared\UnityEngine.PhysicsModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.PhysicsModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
@ -1,10 +1,11 @@
|
||||
University of Illinois/NCSA Open Source License
|
||||
|
||||
Copyright (c) [2024] [CWXDEV]. All rights reserved.
|
||||
Copyright (c) [year] [fullname]. All rights reserved.
|
||||
|
||||
Developed by:
|
||||
[CWX]
|
||||
[https://github.com/CWXDEV/MegaMod]
|
||||
[CWX]
|
||||
[https://github.com/CWXDEV/CWX-DeSharpener]
|
||||
[https://hub.sp-tarkov.com/files/file/455-cwx-desharpener/]
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
@ -1,6 +1,7 @@
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
using EFT.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
@ -9,8 +10,10 @@ using CWX_DebuggingTool.Models;
|
||||
|
||||
namespace CWX_DebuggingTool
|
||||
{
|
||||
public sealed class BotmonClass : MonoBehaviour
|
||||
public sealed class BotmonClass : MonoBehaviour, IDisposable
|
||||
{
|
||||
private static BotmonClass _instance;
|
||||
|
||||
private GUIContent _guiContent;
|
||||
private GUIStyle _textStyle;
|
||||
private Player _player;
|
||||
@ -18,7 +21,6 @@ namespace CWX_DebuggingTool
|
||||
private Dictionary<string, BotRoleAndDiffClass> _playerRoleAndDiff = new Dictionary<string, BotRoleAndDiffClass>();
|
||||
private List<BotZone> _zones;
|
||||
private GameWorld _gameWorld;
|
||||
private GameObject _mainCamera;
|
||||
private IBotGame _botGame;
|
||||
private Rect _rect;
|
||||
private string _content = "";
|
||||
@ -27,14 +29,35 @@ namespace CWX_DebuggingTool
|
||||
|
||||
private BotmonClass()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BotMonitorMode Mode { get; set; }
|
||||
public int Mode { get; set; }
|
||||
|
||||
public static BotmonClass Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new BotmonClass();
|
||||
}
|
||||
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
var gameWorld = Singleton<GameWorld>.Instance;
|
||||
|
||||
var gameobj = gameWorld.GetComponent<BotmonClass>();
|
||||
Destroy(gameobj);
|
||||
_instance = null;
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
~BotmonClass()
|
||||
{
|
||||
ConsoleScreen.Log("BotMonitor Disabled on game end");
|
||||
}
|
||||
|
||||
public void Awake()
|
||||
@ -47,9 +70,6 @@ namespace CWX_DebuggingTool
|
||||
|
||||
// Get Player from GameWorld
|
||||
_player = _gameWorld.MainPlayer;
|
||||
|
||||
// Get Player Camera
|
||||
_mainCamera = GameObject.Find("FPS Camera");
|
||||
|
||||
// Make new rect to use for GUI
|
||||
_rect = new Rect(0, 60, 0, 0);
|
||||
@ -64,7 +84,7 @@ namespace CWX_DebuggingTool
|
||||
}
|
||||
|
||||
// Add existing Bots to list
|
||||
if (_gameWorld.AllAlivePlayersList.Count > 1)
|
||||
if (_gameWorld.RegisteredPlayers.Count > 1)
|
||||
{
|
||||
foreach (var player in _gameWorld.AllAlivePlayersList)
|
||||
{
|
||||
@ -82,38 +102,21 @@ namespace CWX_DebuggingTool
|
||||
_botGame.BotsController.BotSpawner.OnBotCreated += owner =>
|
||||
{
|
||||
var player = owner.GetPlayer;
|
||||
_zoneAndPlayers[owner.BotsGroup.BotZone.NameZone].Add(player);
|
||||
_zoneAndPlayers[player.AIData.BotOwner.BotsGroup.BotZone.NameZone].Add(player);
|
||||
_playerRoleAndDiff.Add(player.ProfileId, GetBotRoleAndDiffClass(player.Profile.Info));
|
||||
};
|
||||
|
||||
// Sub to event to get and remove Bot when they despawn
|
||||
_botGame.BotsController.BotSpawner.OnBotRemoved += owner =>
|
||||
{
|
||||
var player = owner.GetPlayer;
|
||||
_zoneAndPlayers[owner.BotsGroup.BotZone.NameZone].Remove(player);
|
||||
_playerRoleAndDiff.Remove(player.ProfileId);
|
||||
};
|
||||
}
|
||||
|
||||
public BotRoleAndDiffClass GetBotRoleAndDiffClass(InfoClass info)
|
||||
{
|
||||
var settings = info.GetType().GetField("Settings", BindingFlags.Public | BindingFlags.Instance).GetValue(info);
|
||||
var settings = info.GetType().GetField("Settings", BindingFlags.Public | BindingFlags.Instance)?.GetValue(info);
|
||||
|
||||
var role = settings.GetType().GetField("Role", BindingFlags.Instance | BindingFlags.Public).GetValue(settings).ToString();
|
||||
var diff = settings.GetType().GetField("BotDifficulty", BindingFlags.Instance | BindingFlags.Public).GetValue(settings).ToString();
|
||||
var role = settings.GetType().GetField("Role", BindingFlags.Instance | BindingFlags.Public)?.GetValue(settings).ToString();
|
||||
var diff = settings.GetType().GetField("BotDifficulty", BindingFlags.Instance | BindingFlags.Public)?.GetValue(settings).ToString();
|
||||
|
||||
return new BotRoleAndDiffClass(string.IsNullOrEmpty(role) ? "" : role, string.IsNullOrEmpty(diff) ? "" : diff);
|
||||
}
|
||||
|
||||
public float GetRotationToPlayer(Player player, Player bot)
|
||||
{
|
||||
var directionToTarget = player.CameraPosition.position - bot.Transform.position;
|
||||
directionToTarget.y = 0;
|
||||
var targetRotation = Quaternion.LookRotation(directionToTarget, Vector3.up);
|
||||
var degreeOfRot = Quaternion.Angle(player.CameraPosition.rotation, targetRotation);
|
||||
return degreeOfRot;
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
// set basics on GUI
|
||||
@ -121,7 +124,7 @@ namespace CWX_DebuggingTool
|
||||
{
|
||||
_textStyle = new GUIStyle(GUI.skin.box);
|
||||
_textStyle.alignment = TextAnchor.MiddleLeft;
|
||||
_textStyle.fontSize = 14;
|
||||
_textStyle.fontSize = 20;
|
||||
_textStyle.margin = new RectOffset(3, 3, 3, 3);
|
||||
}
|
||||
|
||||
@ -130,48 +133,35 @@ namespace CWX_DebuggingTool
|
||||
{
|
||||
_guiContent = new GUIContent();
|
||||
}
|
||||
_content = string.Empty;
|
||||
|
||||
if (Mode >= BotMonitorMode.DelayedSpawn)
|
||||
{
|
||||
_content += $"Alive & Loading = {_botGame.BotsController.BotSpawner.AliveAndLoadingBotsCount}\n";
|
||||
_content += $"Delayed Bots = {_botGame.BotsController.BotSpawner.BotsDelayed}\n";
|
||||
_content += $"All Bots With Delayed = {_botGame.BotsController.BotSpawner.AllBotsWithDelayed}\n";
|
||||
}
|
||||
|
||||
// If Mode Greater than or equal to Total show total
|
||||
if (Mode >= BotMonitorMode.Total)
|
||||
// If Mode Greater than or equal to 1 show total
|
||||
if (Mode >= 1)
|
||||
{
|
||||
_content = string.Empty;
|
||||
_content += $"Total = {_gameWorld.AllAlivePlayersList.Count - 1}\n";
|
||||
}
|
||||
|
||||
// If Mode Greater than or equal to PerZoneTotal show total for each zone
|
||||
if (Mode >= BotMonitorMode.PerZoneTotal && _zoneAndPlayers != null)
|
||||
// If Mode Greater than or equal to 2 show total for each zone
|
||||
if (Mode >= 2 && _zoneAndPlayers != null)
|
||||
{
|
||||
foreach (var zone in _zoneAndPlayers)
|
||||
{
|
||||
if (_zoneAndPlayers[zone.Key].FindAll(x => x.HealthController.IsAlive).Count <= 0) continue;
|
||||
if (_zoneAndPlayers[zone.Key].FindAll(x => x != null && x.HealthController != null && x.HealthController.IsAlive).Count <= 0) continue;
|
||||
|
||||
_content += $"{zone.Key} = {_zoneAndPlayers[zone.Key].FindAll(x => x.HealthController.IsAlive).Count}\n";
|
||||
_content += $"{zone.Key} = {_zoneAndPlayers[zone.Key].FindAll(x => x != null && x.HealthController != null && x.HealthController.IsAlive).Count}\n";
|
||||
|
||||
// If Mode Greater than or equal to FullList show Bots individually also
|
||||
if (Mode < BotMonitorMode.FullList) continue;
|
||||
// If Mode Greater than or equal to 3 show Bots individually also
|
||||
if (Mode < 3) continue;
|
||||
|
||||
foreach (var player in _zoneAndPlayers[zone.Key].Where(player => player.HealthController.IsAlive))
|
||||
foreach (var player in _zoneAndPlayers[zone.Key].Where(player => player != null && player.HealthController != null && player.HealthController.IsAlive))
|
||||
{
|
||||
// if (Mode == BotMonitorMode.Directions)
|
||||
// {
|
||||
// // get bot direction from player
|
||||
// _content += $"[{GetRotationToPlayer(_player, player)}]";
|
||||
// }
|
||||
|
||||
_distance = Vector3.Distance(player.Transform.position, _player.CameraPosition.position);
|
||||
_distance = Vector3.Distance(player.Position, _player.Position);
|
||||
_content += $"> [{_distance:n2}m] [{_playerRoleAndDiff.First(x => x.Key == player.ProfileId).Value.Role}] " +
|
||||
$"[{player.Profile.Side}] [{_playerRoleAndDiff.First(x => x.Key == player.ProfileId).Value.Difficulty}] {player.Profile.Nickname}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_guiContent.text = _content;
|
||||
|
||||
_guiSize = _textStyle.CalcSize(_guiContent);
|
Binary file not shown.
40
Live/CWX_DebuggingTool/CWX_DebuggingTool.csproj
Normal file
40
Live/CWX_DebuggingTool/CWX_DebuggingTool.csproj
Normal file
@ -0,0 +1,40 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Common">
|
||||
<HintPath>..\..\..\Shared\Aki.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="bsg.console.core">
|
||||
<HintPath>..\..\..\Shared\bsg.console.core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.IMGUIModule">
|
||||
<HintPath>..\..\..\Shared\UnityEngine.IMGUIModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TextRenderingModule">
|
||||
<HintPath>..\..\..\Shared\UnityEngine.TextRenderingModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
64
Live/CWX_DebuggingTool/DebuggingTool.cs
Normal file
64
Live/CWX_DebuggingTool/DebuggingTool.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using BepInEx;
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
using EFT.Console.Core;
|
||||
using EFT.UI;
|
||||
|
||||
namespace CWX_DebuggingTool
|
||||
{
|
||||
[BepInPlugin("com.cwx.debuggingtool", "cwx-debuggingtool", "1.1.0")]
|
||||
public class DebuggingTool : BaseUnityPlugin
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
ConsoleScreen.Processor.RegisterCommandGroup<DebuggingTool>();
|
||||
}
|
||||
|
||||
[ConsoleCommand("BotMonitor")]
|
||||
public static void BotMonitorConsoleCommand([ConsoleArgument("", "Options: 0 = off, 1 = Total bots, 2 = 1+Total bots per Zone, 3 = 2+Each bot")] int value )
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0:
|
||||
DisableBotMonitor();
|
||||
ConsoleScreen.Log("BotMonitor disabled");
|
||||
break;
|
||||
case 1:
|
||||
EnableBotMonitor(1);
|
||||
ConsoleScreen.Log("BotMonitor enabled with only Total");
|
||||
break;
|
||||
case 2:
|
||||
EnableBotMonitor(2);
|
||||
ConsoleScreen.Log("BotMonitor enabled with Total and per zone Total");
|
||||
break;
|
||||
case 3:
|
||||
EnableBotMonitor(3);
|
||||
ConsoleScreen.Log("BotMonitor enabled with Total, per zone Total and each bot");
|
||||
break;
|
||||
default:
|
||||
// fail to load, or wrong option used
|
||||
ConsoleScreen.LogError("Wrong Option used, please use 0, 1, 2 or 3");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static void DisableBotMonitor()
|
||||
{
|
||||
BotmonClass.Instance.Dispose();
|
||||
}
|
||||
|
||||
private static void EnableBotMonitor(int option)
|
||||
{
|
||||
var gameWorld = Singleton<GameWorld>.Instance;
|
||||
|
||||
var checkExists = gameWorld.gameObject.GetComponentInChildren<BotmonClass>();
|
||||
|
||||
if (checkExists != null)
|
||||
Destroy(checkExists);
|
||||
|
||||
var btmInstance = gameWorld.gameObject.AddComponent<BotmonClass>();
|
||||
|
||||
btmInstance.Mode = option;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
# DebuggingTool
|
||||
## CWX-DEBUGGINGTOOL for EFT - SPT-AKI
|
||||
### CURRENT AKI VERSION: 3.5.7
|
||||
### GAMEVERSION: 23399
|
||||
### CURRENT AKI VERSION: 3.5.1
|
||||
### GAMEVERSION: 22032
|
||||
### USING BEPINEX
|
@ -7,25 +7,25 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\Shared\Aki.Reflection.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\Shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>..\Shared\Comfort.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\Shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\Shared\Aki.Reflection.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\Shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>..\Shared\Comfort.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil">
|
||||
<HintPath>..\Shared\Mono.Cecil.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\Shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AssetBundleModule">
|
||||
<HintPath>..\Shared\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
14
Live/CWX_LockPicking/LockPicker.cs
Normal file
14
Live/CWX_LockPicking/LockPicker.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using BepInEx;
|
||||
|
||||
namespace CWX_LockPicking
|
||||
{
|
||||
[BepInPlugin("com.CWX.LockPicker", "CWX-LockPicker", "1.0.0")]
|
||||
public class LockPicker : BaseUnityPlugin
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
new LockPickerMenuPatch().Enable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
112
Live/CWX_LockPicking/LockPickerMenuPatch.cs
Normal file
112
Live/CWX_LockPicking/LockPickerMenuPatch.cs
Normal file
@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.Reflection.Utils;
|
||||
using EFT;
|
||||
using UnityEngine;
|
||||
using System.Threading.Tasks;
|
||||
using EFT.Interactive;
|
||||
|
||||
namespace CWX_LockPicking
|
||||
{
|
||||
public class LockPickerMenuPatch : ModulePatch
|
||||
{
|
||||
// TODO: Make Version Agnostic
|
||||
private static Type playerActionClass; // GClass1726 - smethod_9 on this class
|
||||
private static Type menuClass; // GClass2804
|
||||
private static Type menuItemClass; // GClass2803
|
||||
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return typeof(GClass1726).GetMethod("smethod_9", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
[PatchPostfix]
|
||||
public static void PatchPostFix(ref GClass2804 __result, GamePlayerOwner owner, Door door)
|
||||
{
|
||||
// always do this to get rid of the useless interactions
|
||||
__result.Actions.RemoveAll(
|
||||
x => x.Name == "Bang & clear" || x.Name == "Flash & clear" || x.Name == "Move in");
|
||||
|
||||
// make sure its a locked and a door that can be unlocked
|
||||
if (door.DoorState != EDoorState.Locked || door.KeyId == null || door.KeyId == "") return;
|
||||
|
||||
// add action to unlock door - currently no animation
|
||||
__result.Actions.Add(new GClass2803
|
||||
{
|
||||
Name = "LockPicking",
|
||||
Action = () => { door.DoorState = EDoorState.Shut; },
|
||||
Disabled = false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class TestLock : MonoBehaviour
|
||||
{
|
||||
private string _BundlePath = "BepInEx/plugins/CWX/Test/lockpick.bundle";
|
||||
public AssetBundle assetBundle;
|
||||
public async Task<GameObject> LoadLock()
|
||||
{
|
||||
var bundleLoadRequest = AssetBundle.LoadFromFileAsync(_BundlePath);
|
||||
|
||||
while (!bundleLoadRequest.isDone)
|
||||
await Task.Yield();
|
||||
|
||||
assetBundle = bundleLoadRequest.assetBundle;
|
||||
|
||||
var assetLoadRequest = assetBundle.LoadAllAssetsAsync<GameObject>();
|
||||
|
||||
while (!assetLoadRequest.isDone)
|
||||
await Task.Yield();
|
||||
|
||||
var requestedGo = assetLoadRequest.allAssets[0] as GameObject;
|
||||
|
||||
return requestedGo;
|
||||
}
|
||||
|
||||
public async void Init()
|
||||
{
|
||||
Instantiate(await LoadLock(), new Vector3(0, 0, 0), Quaternion.Euler(new Vector3(0, 0, 0)));
|
||||
}
|
||||
}
|
||||
}
|
@ -8,28 +8,28 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Common">
|
||||
<HintPath>..\Shared\Aki.Common.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\Shared\Aki.Reflection.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\Shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>..\Shared\Comfort.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\Shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
@ -3,9 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32407.343
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kaeno-TraderScrolling", "Kaeno-TraderScrolling\Kaeno-TraderScrolling.csproj", "{01BF7708-EC1F-4E2A-A788-084AE1C9E467}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX_WeatherPatcher", "CWX_WeatherPatcher\CWX_WeatherPatcher.csproj", "{0E6813D8-8989-4643-9D11-138F21CE4963}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CWX_VoiceAdder", "CWX_VoiceAdder\CWX_VoiceAdder.csproj", "{8030C0C1-BD86-4891-BD69-3D0772423641}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX_BushWhacker", "CWX_BushWhacker\CWX_BushWhacker.csproj", "{FBA1D35B-1115-4333-8A6F-6F5884BD47D9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX_MasterKey", "CWX_MasterKey\CWX_MasterKey.csproj", "{40BE277F-55BE-4579-9535-D1F5ED9CC549}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX_DebuggingTool", "CWX_DebuggingTool\CWX_DebuggingTool.csproj", "{E439D92F-26FD-42A2-9EA5-38A318EB5403}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX_AlarmChanger", "CWX_AlarmChanger\CWX_AlarmChanger.csproj", "{518D3743-AE98-41CD-8A6A-7B537C3FC293}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "test-layout", "test-layout\test-layout.csproj", "{CBDE7880-21AE-45AC-B216-D1061FD6A8A0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX_GrassCutter", "CWX_GrassCutter\CWX_GrassCutter.csproj", "{CC095831-11F9-4429-9A5C-BF60EF451E96}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CWX_LockPicking", "CWX_LockPicking\CWX_LockPicking.csproj", "{A9363B69-7848-48FB-8562-4B694778F679}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kaeno-TraderScrolling", "Kaeno-TraderScrolling\Kaeno-TraderScrolling.csproj", "{01BF7708-EC1F-4E2A-A788-084AE1C9E467}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -13,14 +27,42 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0E6813D8-8989-4643-9D11-138F21CE4963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E6813D8-8989-4643-9D11-138F21CE4963}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E6813D8-8989-4643-9D11-138F21CE4963}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E6813D8-8989-4643-9D11-138F21CE4963}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FBA1D35B-1115-4333-8A6F-6F5884BD47D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FBA1D35B-1115-4333-8A6F-6F5884BD47D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FBA1D35B-1115-4333-8A6F-6F5884BD47D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FBA1D35B-1115-4333-8A6F-6F5884BD47D9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{40BE277F-55BE-4579-9535-D1F5ED9CC549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{40BE277F-55BE-4579-9535-D1F5ED9CC549}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{40BE277F-55BE-4579-9535-D1F5ED9CC549}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{40BE277F-55BE-4579-9535-D1F5ED9CC549}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E439D92F-26FD-42A2-9EA5-38A318EB5403}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E439D92F-26FD-42A2-9EA5-38A318EB5403}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E439D92F-26FD-42A2-9EA5-38A318EB5403}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E439D92F-26FD-42A2-9EA5-38A318EB5403}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{518D3743-AE98-41CD-8A6A-7B537C3FC293}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{518D3743-AE98-41CD-8A6A-7B537C3FC293}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{518D3743-AE98-41CD-8A6A-7B537C3FC293}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{518D3743-AE98-41CD-8A6A-7B537C3FC293}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CBDE7880-21AE-45AC-B216-D1061FD6A8A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CBDE7880-21AE-45AC-B216-D1061FD6A8A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CBDE7880-21AE-45AC-B216-D1061FD6A8A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CBDE7880-21AE-45AC-B216-D1061FD6A8A0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC095831-11F9-4429-9A5C-BF60EF451E96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC095831-11F9-4429-9A5C-BF60EF451E96}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC095831-11F9-4429-9A5C-BF60EF451E96}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC095831-11F9-4429-9A5C-BF60EF451E96}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A9363B69-7848-48FB-8562-4B694778F679}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A9363B69-7848-48FB-8562-4B694778F679}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A9363B69-7848-48FB-8562-4B694778F679}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A9363B69-7848-48FB-8562-4B694778F679}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8030C0C1-BD86-4891-BD69-3D0772423641}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8030C0C1-BD86-4891-BD69-3D0772423641}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8030C0C1-BD86-4891-BD69-3D0772423641}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8030C0C1-BD86-4891-BD69-3D0772423641}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -7,28 +7,28 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\0Harmony.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SPT.Common">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\spt-Common.dll</HintPath>
|
||||
<Reference Include="Aki.Common">
|
||||
<HintPath>..\..\..\Shared\Aki\Aki.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SPT.Reflection">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\spt-Reflection.dll</HintPath>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\..\..\Shared\Aki\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\EFT\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\EFT\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\EFT\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\EFT\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
using HarmonyLib;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.Reflection.Utils;
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
using System.IO;
|
||||
using SPT.Reflection.Patching;
|
||||
using SPT.Reflection.Utils;
|
||||
|
||||
namespace VoiceAdd
|
||||
{
|
||||
|
@ -8,25 +8,25 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Common">
|
||||
<HintPath>..\Shared\Aki.Common.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\Shared\Aki.Reflection.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\Shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>..\Shared\Comfort.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\Shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
@ -26,9 +26,9 @@ namespace CWX_WeatherPatcher
|
||||
var debug = WeatherController.Instance.WeatherDebug;
|
||||
debug.Enabled = true;
|
||||
debug.CloudDensity = -1f;
|
||||
// debug.Fog = 0f;
|
||||
// debug.Rain = 0f;
|
||||
// debug.LightningThunderProbability = 0f;
|
||||
debug.Fog = 0f;
|
||||
debug.Rain = 0f;
|
||||
debug.LightningThunderProbability = 0f;
|
||||
debug.WindMagnitude = 0f;
|
||||
}
|
||||
}
|
@ -1,42 +1,36 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net471</TargetFramework>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="spt-Reflection">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\spt-Reflection.dll</HintPath>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\..\..\Shared\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\BepInEx.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\Comfort.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Sirenix.Serialization">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\Sirenix.Serialization.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\UnityEngine.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\UnityEngine.UI.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UIModule">
|
||||
<HintPath>D:\HomeRepos\CWX-MegaMod\shared\UnityEngine.UIModule.dll</HintPath>
|
||||
<HintPath>..\..\..\Shared\UnityEngine.UIModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Naekami
|
||||
|
||||
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.
|
@ -1,5 +1,5 @@
|
||||
using SPT.Reflection.Patching;
|
||||
using SPT.Reflection.Utils;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.Reflection.Utils;
|
||||
using EFT.UI;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
@ -13,7 +13,7 @@ namespace TraderScrolling
|
||||
var rightPerson = GameObject.Find("Right Person");
|
||||
var list = rightPerson.GetComponentsInChildren<RectTransform>(true).ToList();
|
||||
var money = list.FirstOrDefault(x => x.name == "Money");
|
||||
var moneyRect = money.GetComponent<RectTransform>();
|
||||
var moneyRect = money.RectTransform();
|
||||
moneyRect.anchoredPosition = new Vector2(moneyRect.anchoredPosition.x + 60f, moneyRect.anchoredPosition.y);
|
||||
//End of Money position Change
|
||||
|
||||
@ -38,8 +38,7 @@ namespace TraderScrolling
|
||||
|
||||
// Change Colour alpha to max for background
|
||||
var background = tile.FirstOrDefault(x => x.name == "Background");
|
||||
background.color = new Color(0, 0, 0, 1);
|
||||
|
||||
background.color = new Color(0, 0, 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
namespace TraderScrolling
|
||||
{
|
||||
[BepInPlugin("com.kaeno.TraderScrolling", "Kaeno-TraderScrolling", "1.1.0")]
|
||||
[BepInPlugin("com.kaeno.TraderScrolling", "Kaeno-TraderScrolling", "1.0.0")]
|
||||
public class TraderScrolling : BaseUnityPlugin
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
new TraderScrollingPatch().Enable();
|
||||
new PlayerCardPatch().Enable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
using System.Reflection;
|
||||
using SPT.Reflection.Patching;
|
||||
using SPT.Reflection.Utils;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.Reflection.Utils;
|
||||
using EFT.UI;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TraderScrolling
|
||||
@ -11,7 +10,7 @@ namespace TraderScrolling
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(TraderScreensGroup), nameof(TraderScreensGroup.Show));
|
||||
return typeof(TraderScreensGroup).GetMethod("method_4", PatchConstants.PrivateFlags);
|
||||
}
|
||||
|
||||
[PatchPostfix]
|
||||
@ -19,12 +18,12 @@ namespace TraderScrolling
|
||||
{
|
||||
var gameObject = GameObject.Find("Menu UI");
|
||||
var check = gameObject.GetComponentInChildren<TraderScrollingScript>();
|
||||
|
||||
|
||||
|
||||
if (check != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gameObject.AddComponent<TraderScrollingScript>();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Comfort.Common;
|
||||
using EFT.UI;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@ -15,10 +13,10 @@ namespace TraderScrolling
|
||||
var list = menuUI.GetComponentsInChildren<RectTransform>(true).ToList();
|
||||
var container = list.FirstOrDefault(x => x.name == "Container");
|
||||
var scrollrect = traderCards.AddComponent<ScrollRect>();
|
||||
var traderCardsRect = traderCards.GetComponent<RectTransform>();
|
||||
var containerRect = container.GetComponent<RectTransform>();
|
||||
var traderCardsRect = traderCards.RectTransform();
|
||||
var containerRect = container.RectTransform();
|
||||
|
||||
var countCards = traderCards.transform.childCount;
|
||||
var countCards = traderCards.transform.childCount;
|
||||
|
||||
var count = countCards - 10;
|
||||
//THIS IS DEFAULT anchorMin For anything below 11
|
||||
@ -37,6 +35,6 @@ namespace TraderScrolling
|
||||
scrollrect.vertical = false;
|
||||
scrollrect.movementType = ScrollRect.MovementType.Elastic;
|
||||
scrollrect.viewport = containerRect;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,216 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>ConfigurationManager</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:ConfigurationManager.SettingSearcher.GetBepInExCoreConfig">
|
||||
<summary>
|
||||
Get entries for all core BepInEx settings
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.SettingSearcher.GetPluginConfig(BepInEx.BaseUnityPlugin)">
|
||||
<summary>
|
||||
Get entries for all settings of a plugin
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.Utilities.Utils.FindPlugins">
|
||||
<summary>
|
||||
Search for all instances of BaseUnityPlugin loaded by chainloader or other means.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ConfigurationManager.ConfigurationManager">
|
||||
<summary>
|
||||
An easy way to let user configure how a plugin behaves without the need to make your own GUI. The user can change any of the settings you expose, even keyboard shortcuts.
|
||||
https://github.com/ManlyMarco/BepInEx.ConfigurationManager
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:ConfigurationManager.ConfigurationManager.GUID">
|
||||
<summary>
|
||||
GUID of this plugin
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:ConfigurationManager.ConfigurationManager.Version">
|
||||
<summary>
|
||||
Version constant
|
||||
</summary>
|
||||
</member>
|
||||
<member name="E:ConfigurationManager.ConfigurationManager.DisplayingWindowChanged">
|
||||
<summary>
|
||||
Event fired every time the manager window is shown or hidden.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:ConfigurationManager.ConfigurationManager.OverrideHotkey">
|
||||
<summary>
|
||||
Disable the hotkey check used by config manager. If enabled you have to set <see cref="P:ConfigurationManager.ConfigurationManager.DisplayingWindow"/> to show the manager.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.ConfigurationManager.#ctor">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.ConfigurationManager.DisplayingWindow">
|
||||
<summary>
|
||||
Is the config manager main window displayed on screen
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.ConfigurationManager.RegisterCustomSettingDrawer(System.Type,System.Action{ConfigurationManager.SettingEntryBase})">
|
||||
<summary>
|
||||
Register a custom setting drawer for a given type. The action is ran in OnGui in a single setting slot.
|
||||
Do not use any Begin / End layout methods, and avoid raising height from standard.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.ConfigurationManager.BuildSettingList">
|
||||
<summary>
|
||||
Rebuild the setting list. Use to update the config manager window if config settings were removed or added while it was open.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.ConfigurationManager.SearchString">
|
||||
<summary>
|
||||
String currently entered into the search box
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ConfigurationManager.SettingEntryBase">
|
||||
<summary>
|
||||
Class representing all data about a setting collected by ConfigurationManager.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.AcceptableValues">
|
||||
<summary>
|
||||
List of values this setting can take
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.AcceptableValueRange">
|
||||
<summary>
|
||||
Range of the values this setting can take
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.ShowRangeAsPercent">
|
||||
<summary>
|
||||
Should the setting be shown as a percentage (only applies to value range settings)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.CustomDrawer">
|
||||
<summary>
|
||||
Custom setting draw action.
|
||||
Use either CustomDrawer or CustomHotkeyDrawer, using both at the same time leads to undefined behaviour.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.CustomHotkeyDrawer">
|
||||
<summary>
|
||||
Custom setting draw action that allows polling keyboard input with the Input class.
|
||||
Use either CustomDrawer or CustomHotkeyDrawer, using both at the same time leads to undefined behaviour.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ConfigurationManager.SettingEntryBase.CustomHotkeyDrawerFunc">
|
||||
<summary>
|
||||
Custom setting draw action that allows polling keyboard input with the Input class.
|
||||
</summary>
|
||||
<param name="setting">Setting currently being set, is available</param>
|
||||
<param name="isCurrentlyAcceptingInput">Set this ref parameter to true when you want the current setting drawer to receive Input events. Remember to set it to false after you are done!</param>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.Browsable">
|
||||
<summary>
|
||||
Show this setting in the settings screen at all? If false, don't show.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.Category">
|
||||
<summary>
|
||||
Category the setting is under. Null to be directly under the plugin.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.DefaultValue">
|
||||
<summary>
|
||||
If set, a "Default" button will be shown next to the setting to allow resetting to default.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.HideDefaultButton">
|
||||
<summary>
|
||||
Force the "Reset" button to not be displayed, even if a valid DefaultValue is available.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.HideSettingName">
|
||||
<summary>
|
||||
Force the setting name to not be displayed. Should only be used with a <see cref="P:ConfigurationManager.SettingEntryBase.CustomDrawer"/> to get more space.
|
||||
Can be used together with <see cref="P:ConfigurationManager.SettingEntryBase.HideDefaultButton"/> to gain even more space.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.Description">
|
||||
<summary>
|
||||
Optional description shown when hovering over the setting
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.DispName">
|
||||
<summary>
|
||||
Name of the setting
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.PluginInfo">
|
||||
<summary>
|
||||
Plugin this setting belongs to
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.ReadOnly">
|
||||
<summary>
|
||||
Only allow showing of the value. False whenever possible by default.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.SettingType">
|
||||
<summary>
|
||||
Type of the variable
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.PluginInstance">
|
||||
<summary>
|
||||
Instance of the plugin that owns this setting
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.IsAdvanced">
|
||||
<summary>
|
||||
Is this setting advanced
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.Order">
|
||||
<summary>
|
||||
Order of the setting on the settings list relative to other settings in a category. 0 by default, lower is higher on the list.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.SettingEntryBase.Get">
|
||||
<summary>
|
||||
Get the value of this setting
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.SettingEntryBase.Set(System.Object)">
|
||||
<summary>
|
||||
Set the value of this setting
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.SettingEntryBase.SetValue(System.Object)">
|
||||
<summary>
|
||||
Implementation of <see cref="M:ConfigurationManager.SettingEntryBase.Set(System.Object)"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.ObjToStr">
|
||||
<summary>
|
||||
Custom converter from setting type to string for the textbox
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.SettingEntryBase.StrToObj">
|
||||
<summary>
|
||||
Custom converter from string to setting type for the textbox
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ConfigurationManager.ValueChangedEventArgs`1">
|
||||
<summary>
|
||||
Arguments representing a change in value
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ConfigurationManager.ValueChangedEventArgs`1.#ctor(`0)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:ConfigurationManager.ValueChangedEventArgs`1.NewValue">
|
||||
<summary>
|
||||
Newly assigned value
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user