Skip to content

Commit

Permalink
Update 'IsSingleplayer'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Jul 9, 2024
1 parent 31f590c commit 015582b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Fika.Core/Coop/Utils/FikaBackendUtils.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using EFT;
using Comfort.Common;
using EFT;
using EFT.UI.Matchmaker;
using Fika.Core.Networking;
using Fika.Core.Networking.Http;
using Fika.Core.Networking.Http.Models;
using System;
Expand All @@ -22,7 +24,15 @@ public static class FikaBackendUtils
public static EMatchmakerType MatchingType = EMatchmakerType.Single;
public static bool IsServer => MatchingType == EMatchmakerType.GroupLeader;
public static bool IsClient => MatchingType == EMatchmakerType.GroupPlayer;
public static bool IsSinglePlayer => MatchingType == EMatchmakerType.Single;
public static bool IsSinglePlayer
{
get
{
return Singleton<FikaServer>.Instantiated
&& Singleton<FikaServer>.Instance.NetServer.ConnectedPeersCount == 0;
}
}
public static bool IsDedicated = false;
public static PlayersRaidReadyPanel PlayersRaidReadyPanel;
public static MatchMakerGroupPreview MatchMakerGroupPreview;
public static int HostExpectedNumberOfPlayers = 1;
Expand Down

0 comments on commit 015582b

Please sign in to comment.