the initial commit to the repo.
This commit is contained in:
parent
025c032b8c
commit
1b757591b9
264 changed files with 21882 additions and 0 deletions
40
stoopid.raw/stupid.solutions.Data/WildSpawnTypeManager.cs
Normal file
40
stoopid.raw/stupid.solutions.Data/WildSpawnTypeManager.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using EFT;
|
||||
using EFT.NextObservedPlayer;
|
||||
using EFT.UI;
|
||||
using stupid.solutions.stupid.solutions.Data;
|
||||
using UnityEngine;
|
||||
|
||||
namespace stupid.solutions.Data;
|
||||
|
||||
public class WildSpawnTypeManager : MonoBehaviour
|
||||
{
|
||||
private static List<(ObservedPlayerView PlayerInstance, WildSpawnType Role)> unassignedRoles = new List<(ObservedPlayerView, WildSpawnType)>();
|
||||
|
||||
public void Start()
|
||||
{
|
||||
ConsoleScreen.Log("WST Manager initiated");
|
||||
}
|
||||
|
||||
public static void WST_Postfix(ObservedPlayerView __instance, WildSpawnType role)
|
||||
{
|
||||
try
|
||||
{
|
||||
ConsoleScreen.Log("WST method_6 called for ObservedPlayerView.");
|
||||
unassignedRoles.Add((__instance, role));
|
||||
foreach (OnlineGamePlayer onlineGamePlayer in Main.OnlineGamePlayers)
|
||||
{
|
||||
if (__instance.ProfileId == onlineGamePlayer.profileid)
|
||||
{
|
||||
onlineGamePlayer.wst = role;
|
||||
onlineGamePlayer.gotwst = true;
|
||||
}
|
||||
}
|
||||
ConsoleScreen.Log($"Temporary role assignment queued: PlayerPID={__instance.ProfileId}, Role={role}");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue