mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 02:10:45 -05:00
32280
This commit is contained in:
parent
32b2136630
commit
8a0f088292
@ -22,7 +22,7 @@ git config --local user.email "USERNAME@SOMETHING.com"
|
||||
```
|
||||
|
||||
## Requirements
|
||||
- Escape From Tarkov 32197
|
||||
- Escape From Tarkov 32280
|
||||
- Visual Studio Code -OR- Visual Studio 2022
|
||||
- .NET 6 SDK
|
||||
- [PowerShell v7](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows)
|
||||
|
@ -14,7 +14,7 @@ namespace SPT.Debugging.Patches
|
||||
// TODO: Instantiation of this is fairly slow, need to find best way to cache it
|
||||
public class SptSpawnHelper
|
||||
{
|
||||
private readonly List<ISpawnPoint> playerSpawnPoints;
|
||||
private readonly List<ISpawnPoint> _playerSpawnPoints;
|
||||
private readonly Random _rnd = new Random();
|
||||
//private readonly GStruct381 _spawnSettings = new GStruct381();
|
||||
|
||||
@ -23,12 +23,12 @@ namespace SPT.Debugging.Patches
|
||||
IEnumerable<ISpawnPoint> locationSpawnPoints = SpawnPointManagerClass.CreateFromScene();
|
||||
|
||||
var playerSpawns = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList();
|
||||
this.playerSpawnPoints = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList();
|
||||
this._playerSpawnPoints = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList();
|
||||
}
|
||||
|
||||
public void PrintSpawnPoints()
|
||||
{
|
||||
foreach (var spawnPoint in playerSpawnPoints)
|
||||
foreach (var spawnPoint in _playerSpawnPoints)
|
||||
{
|
||||
ConsoleScreen.Log("[SPT PMC Bot spawn] Spawn point " + spawnPoint.Id + " location is " + spawnPoint.Position.ToString());
|
||||
}
|
||||
@ -37,18 +37,18 @@ namespace SPT.Debugging.Patches
|
||||
public ISpawnPoint SelectSpawnPoint()
|
||||
{
|
||||
// TODO: Select spawn points more intelligently
|
||||
return this.playerSpawnPoints[_rnd.Next(this.playerSpawnPoints.Count)];
|
||||
return this._playerSpawnPoints[_rnd.Next(this._playerSpawnPoints.Count)];
|
||||
}
|
||||
|
||||
public List<ISpawnPoint> SelectSpawnPoints(int count)
|
||||
{
|
||||
// TODO: Fine-grained spawn selection
|
||||
if (count > this.playerSpawnPoints.Count())
|
||||
if (count > this._playerSpawnPoints.Count())
|
||||
{
|
||||
ConsoleScreen.Log($"[SPT PMC Bot spawn] Wanted ${count} but only {this.playerSpawnPoints.Count()} found, returning all");
|
||||
return this.playerSpawnPoints;
|
||||
ConsoleScreen.Log($"[SPT PMC Bot spawn] Wanted ${count} but only {this._playerSpawnPoints.Count()} found, returning all");
|
||||
return this._playerSpawnPoints;
|
||||
}
|
||||
return this.playerSpawnPoints.OrderBy(x => _rnd.Next()).Take(count).ToList();
|
||||
return this._playerSpawnPoints.OrderBy(x => _rnd.Next()).Take(count).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ namespace SPT.Debugging.Patches
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
public static bool PatchPrefix(GClass1574 __instance, BotCreationDataClass data)
|
||||
public static bool PatchPrefix(GClass1575 __instance, BotCreationDataClass data)
|
||||
{
|
||||
var firstBotRole = data.Profiles[0].Info.Settings.Role;
|
||||
if (firstBotRole != WildSpawnType.pmcBEAR || firstBotRole != WildSpawnType.pmcUSEC)
|
||||
|
@ -12,7 +12,7 @@ namespace SPT.SinglePlayer.Patches.MainMenu
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(MerchantsList.Class2759), nameof(MerchantsList.Class2759.method_0));
|
||||
return AccessTools.Method(typeof(MerchantsList.Class2758), nameof(MerchantsList.Class2758.method_0));
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
|
@ -8,7 +8,7 @@ namespace SPT.SinglePlayer.Patches.MainMenu
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(GClass1925), nameof(GClass1925.GetBoolForProfile));
|
||||
return AccessTools.Method(typeof(GClass1926), nameof(GClass1926.GetBoolForProfile));
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
|
@ -15,7 +15,7 @@ namespace SPT.SinglePlayer.Patches.MainMenu
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
private static void Prefix(ref ClothingItem.GClass3338 offer)
|
||||
private static void Prefix(ref ClothingItem.GClass3339 offer)
|
||||
{
|
||||
offer.Offer.ExternalObtain = false;
|
||||
}
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user