2022-09-17 20:08:36 +02:00

27 lines
669 B
C#

using Comfort.Common;
using EFT;
namespace ScopeTweaks
{
public class Utils
{
public bool gameIsReady()
{
var gameWorld = Singleton<GameWorld>.Instance;
var sessionResultPanel = Singleton<SessionResultPanel>.Instance;
if (gameWorld == null
|| gameWorld.AllPlayers == null
|| gameWorld.AllPlayers.Count <= 0
|| sessionResultPanel != null)
{ return false; }
return true;
}
public Player getLocalPlayer()
{
return Singleton<GameWorld>.Instance.RegisteredPlayers.Find(p => p.IsYourPlayer);
}
}
}