mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
remove game vendor checks
This commit is contained in:
parent
94a27d83da
commit
809916103c
@ -343,7 +343,6 @@ namespace QSB.Menus
|
||||
{
|
||||
KickReason.QSBVersionNotMatching => "Server refused connection as QSB version does not match.",
|
||||
KickReason.GameVersionNotMatching => "Server refused connection as Outer Wilds version does not match.",
|
||||
KickReason.GamePlatformNotMatching => "Server refused connection as Outer Wilds platform does not match. (Steam/Epic/Xbox)",
|
||||
KickReason.DLCNotMatching => "Server refused connection as DLC installation state does not match.",
|
||||
KickReason.InEye => "Server refused connection as game has progressed too far.",
|
||||
KickReason.None => "Kicked from server. No reason given.",
|
||||
|
@ -1,9 +0,0 @@
|
||||
namespace QSB.Player
|
||||
{
|
||||
public enum GamePlatform
|
||||
{
|
||||
Steam,
|
||||
Epic,
|
||||
Xbox
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@
|
||||
None,
|
||||
QSBVersionNotMatching,
|
||||
GameVersionNotMatching,
|
||||
GamePlatformNotMatching,
|
||||
DLCNotMatching,
|
||||
InEye
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ namespace QSB.Player.Messages
|
||||
private string PlayerName;
|
||||
private string QSBVersion;
|
||||
private string GameVersion;
|
||||
private GamePlatform Platform;
|
||||
private bool DlcInstalled;
|
||||
|
||||
public PlayerJoinMessage(string name)
|
||||
@ -19,7 +18,6 @@ namespace QSB.Player.Messages
|
||||
PlayerName = name;
|
||||
QSBVersion = QSBCore.QSBVersion;
|
||||
GameVersion = QSBCore.GameVersion;
|
||||
Platform = QSBCore.Platform;
|
||||
DlcInstalled = QSBCore.DLCInstalled;
|
||||
}
|
||||
|
||||
@ -29,7 +27,6 @@ namespace QSB.Player.Messages
|
||||
writer.Write(PlayerName);
|
||||
writer.Write(QSBVersion);
|
||||
writer.Write(GameVersion);
|
||||
writer.Write((int)Platform);
|
||||
writer.Write(DlcInstalled);
|
||||
}
|
||||
|
||||
@ -39,7 +36,6 @@ namespace QSB.Player.Messages
|
||||
PlayerName = reader.ReadString();
|
||||
QSBVersion = reader.ReadString();
|
||||
GameVersion = reader.ReadString();
|
||||
Platform = (GamePlatform)reader.Read<int>();
|
||||
DlcInstalled = reader.Read<bool>();
|
||||
}
|
||||
|
||||
@ -61,13 +57,6 @@ namespace QSB.Player.Messages
|
||||
return;
|
||||
}
|
||||
|
||||
if (Platform != QSBCore.Platform)
|
||||
{
|
||||
DebugLog.ToConsole($"Error - Client {PlayerName} connecting with wrong game platform. (Client:{Platform}, Server:{QSBCore.Platform})", MessageType.Error);
|
||||
new PlayerKickMessage(From, KickReason.GamePlatformNotMatching).Send();
|
||||
return;
|
||||
}
|
||||
|
||||
if (DlcInstalled != QSBCore.DLCInstalled)
|
||||
{
|
||||
DebugLog.ToConsole($"Error - Client {PlayerName} connecting with wrong DLC installation state. (Client:{DlcInstalled}, Server:{QSBCore.DLCInstalled})", MessageType.Error);
|
||||
@ -86,7 +75,7 @@ namespace QSB.Player.Messages
|
||||
var player = QSBPlayerManager.GetPlayer(From);
|
||||
player.Name = PlayerName;
|
||||
DebugLog.ToAll($"{player.Name} joined!", MessageType.Info);
|
||||
DebugLog.DebugWrite($"{player.Name} joined. id:{player.PlayerId}, qsbVersion:{QSBVersion}, gameVersion:{GameVersion}, platform:{Platform}. dlcInstalled:{DlcInstalled}", MessageType.Info);
|
||||
DebugLog.DebugWrite($"{player.Name} joined. id:{player.PlayerId}, qsbVersion:{QSBVersion}, gameVersion:{GameVersion}, dlcInstalled:{DlcInstalled}", MessageType.Info);
|
||||
}
|
||||
|
||||
public override void OnReceiveLocal()
|
||||
|
@ -62,7 +62,6 @@ namespace QSB
|
||||
public static bool IsInMultiplayer => QSBNetworkManager.singleton.isNetworkActive;
|
||||
public static string QSBVersion => Helper.Manifest.Version;
|
||||
public static string GameVersion => Application.version;
|
||||
public static GamePlatform Platform { get; private set; }
|
||||
public static bool DLCInstalled => EntitlementsManager.IsDlcOwned() == EntitlementsManager.AsyncOwnershipStatus.Owned;
|
||||
public static IMenuAPI MenuApi { get; private set; }
|
||||
|
||||
@ -80,23 +79,6 @@ namespace QSB
|
||||
Helper = ModHelper;
|
||||
DebugLog.ToConsole($"* Start of QSB version {QSBVersion} - authored by {Helper.Manifest.Author}", MessageType.Info);
|
||||
|
||||
switch (EntitlementsManager.instance._entitlementRetriever.GetType().Name)
|
||||
{
|
||||
case "EpicEntitlementRetriever":
|
||||
Platform = GamePlatform.Epic;
|
||||
break;
|
||||
case "SteamEntitlementRetriever":
|
||||
Platform = GamePlatform.Steam;
|
||||
break;
|
||||
case "MSStoreEntitlementRetriever":
|
||||
Platform = GamePlatform.Xbox;
|
||||
break;
|
||||
case var other:
|
||||
DebugLog.ToConsole($"Cannot get game platform (entitlement retriever name = {other})\nTell a QSB Dev!", MessageType.Error);
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
MenuApi = ModHelper.Interaction.GetModApi<IMenuAPI>("_nebula.MenuFramework");
|
||||
|
||||
NetworkAssetBundle = Helper.Assets.LoadBundle("AssetBundles/network");
|
||||
|
Loading…
Reference in New Issue
Block a user