|
|
@@ -5,7 +5,7 @@ using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
using GamecraftModdingAPI.Tasks; |
|
|
|
using GamecraftModdingAPI.Utility; |
|
|
|
using GamecraftModdingAPI.Engines; |
|
|
|
using Svelto.ECS; |
|
|
|
|
|
|
|
using RobocraftX.Character; |
|
|
@@ -19,7 +19,9 @@ namespace GamecraftRPC.Engines |
|
|
|
|
|
|
|
public EntitiesDB entitiesDB { set; private get; } |
|
|
|
|
|
|
|
private Discord.Discord discordRPC = null; |
|
|
|
public bool isRemovable => false; |
|
|
|
|
|
|
|
private Discord.Discord discordRPC = null; |
|
|
|
|
|
|
|
private bool Ok = false; |
|
|
|
|
|
|
@@ -35,7 +37,7 @@ namespace GamecraftRPC.Engines |
|
|
|
public void Ready() |
|
|
|
{ |
|
|
|
Ok = true; |
|
|
|
Scheduler.Schedule(new Repeatable(updatePlayerCount, () => { return Ok; }, delay: 2f)); |
|
|
|
Scheduler.Schedule(new Repeatable(updatePlayerCount, () => { return Ok; }, delay: 5f)); |
|
|
|
PresenceUtility.Activity.Party.Size.CurrentSize = 1; |
|
|
|
PresenceUtility.Activity.Party.Size.MaxSize = PresenceUtility.LobbySize; |
|
|
|
PresenceUtility.Activity.Party.Id = "";//PresenceUtility.PartyId.ToString(); |
|
|
@@ -49,8 +51,10 @@ namespace GamecraftRPC.Engines |
|
|
|
{ |
|
|
|
count += entitiesDB.Count<RigidBodyEntityStruct>(CharacterExclusiveGroups.AllCharacters[i]); |
|
|
|
} |
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaLog($"Player Count: {count}"); |
|
|
|
if ((int)count != PresenceUtility.PlayerCount && count > 0) |
|
|
|
#if DEBUG |
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaLog($"Player Count: {count}"); |
|
|
|
#endif |
|
|
|
if ((int)count != PresenceUtility.PlayerCount && count > 0) |
|
|
|
{ |
|
|
|
PresenceUtility.PlayerCount = (int)count; |
|
|
|
PresenceUtility.Activity.Party.Size.CurrentSize = (int)count; |
|
|
|