Skip to content

Commit

Permalink
remove IncompatibleMods
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Apr 25, 2024
1 parent d12e1a1 commit cd9db16
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 48 deletions.
1 change: 0 additions & 1 deletion QSB/Localization/Translation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class Translation
public string DLCMismatch;
public string GameProgressLimit;
public string AddonMismatch;
public string IncompatibleMod;
public string PlayerJoinedTheGame;
public string PlayerLeftTheGame;
public string PlayerWasKicked;
Expand Down
22 changes: 0 additions & 22 deletions QSB/Player/Messages/PlayerJoinMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ public class PlayerJoinMessage : QSBMessage
private string QSBVersion;
private string GameVersion;
private bool DlcInstalled;
// empty if no incompatible mods
private string FirstIncompatibleMod;

private int[] AddonHashes;

Expand All @@ -28,18 +26,6 @@ public PlayerJoinMessage(string name)
GameVersion = QSBCore.GameVersion;
DlcInstalled = QSBCore.DLCInstalled;

var allEnabledMods = QSBCore.Helper.Interaction.GetMods();

FirstIncompatibleMod = "";

foreach (var mod in allEnabledMods)
{
if (QSBCore.IncompatibleMods.Contains(mod.ModHelper.Manifest.UniqueName))
{
FirstIncompatibleMod = mod.ModHelper.Manifest.UniqueName;
}
}

AddonHashes = QSBCore.Addons.Keys
.Except(QSBCore.CosmeticAddons)
.Select(x => x.GetStableHashCode())
Expand All @@ -53,7 +39,6 @@ public override void Serialize(NetworkWriter writer)
writer.Write(QSBVersion);
writer.Write(GameVersion);
writer.Write(DlcInstalled);
writer.Write(FirstIncompatibleMod);

writer.Write(AddonHashes);
}
Expand All @@ -65,7 +50,6 @@ public override void Deserialize(NetworkReader reader)
QSBVersion = reader.ReadString();
GameVersion = reader.ReadString();
DlcInstalled = reader.Read<bool>();
FirstIncompatibleMod = reader.ReadString();

AddonHashes = reader.Read<int[]>();
}
Expand Down Expand Up @@ -119,12 +103,6 @@ public override void OnReceiveRemote()
new PlayerKickMessage(From, string.Format(QSBLocalization.Current.AddonMismatch, AddonHashes.Length, addonHashes.Length)).Send();
return;
}

if (FirstIncompatibleMod != "" && !QSBCore.IncompatibleModsAllowed)
{
DebugLog.ToConsole($"Error - Client {PlayerName} connecting with incompatible mod. (First mod found was {FirstIncompatibleMod})");
new PlayerKickMessage(From, string.Format(QSBLocalization.Current.IncompatibleMod, FirstIncompatibleMod)).Send();
}
}

var player = QSBPlayerManager.GetPlayer(From);
Expand Down
11 changes: 0 additions & 11 deletions QSB/QSBCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public class QSBCore : ModBehaviour
Application.version.Split('.').Take(3).Join(delimiter: ".");
public static bool DLCInstalled => EntitlementsManager.IsDlcOwned() == EntitlementsManager.AsyncOwnershipStatus.Owned;
public static bool UseKcpTransport { get; private set; }
public static bool IncompatibleModsAllowed { get; private set; }
public static bool ShowPlayerNames { get; private set; }
public static bool ShipDamage { get; private set; }
public static bool ShowExtraHUDElements { get; private set; }
Expand All @@ -86,15 +85,6 @@ public class QSBCore : ModBehaviour

public static Assembly QSBNHAssembly = null;

public static readonly string[] IncompatibleMods =
{
// probably extremely outdated list. oh well
"Vesper.AutoResume",
"Vesper.OuterWildsMMO",
"_nebula.StopTime",
"PacificEngine.OW_CommonResources" // breaks random shit in NH so i do not trust it here
};

public static event Action OnSkinsBundleLoaded;

public override object GetApi() => new QSBAPI();
Expand Down Expand Up @@ -414,7 +404,6 @@ public override void Configure(IModConfig config)
QSBNetworkManager.UpdateTransport();

DefaultServerIP = config.GetSettingsValue<string>("defaultServerIP");
IncompatibleModsAllowed = config.GetSettingsValue<bool>("incompatibleModsAllowed");
ShowPlayerNames = config.GetSettingsValue<bool>("showPlayerNames");
ShipDamage = config.GetSettingsValue<bool>("shipDamage");
ShowExtraHUDElements = config.GetSettingsValue<bool>("showExtraHud");
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "DLC Installationsstatus stimmt nicht überein. (Client:{0}, Server:{1})",
"GameProgressLimit": "Spiel ist zu weit fortgeschritten.",
"AddonMismatch": "Addons stimmen nicht überein. (Client:{0} addons, Server:{1} addons)",
"IncompatibleMod": "Es wird eine inkompatible/unerlaubte Modifikation genutzt. Die erste gefundene Modifikation war {0}",
"PlayerJoinedTheGame": "{0} trat bei!",
"PlayerLeftTheGame": "{0} verließ!",
"PlayerWasKicked": "{0} wurde gekickt.",
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "DLC installation state does not match. (Client:{0}, Server:{1})",
"GameProgressLimit": "Game has progressed too far.",
"AddonMismatch": "Addon mismatch. (Client:{0} addons, Server:{1} addons)",
"IncompatibleMod": "Using an incompatible/disallowed mod. First mod found was {0}",
"PlayerJoinedTheGame": "{0} joined!",
"PlayerLeftTheGame": "{0} left!",
"PlayerWasKicked": "{0} was kicked.",
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "Les états d'installation du DLC ne correspondent pas. (Client:{0}, Serveur:{1})",
"GameProgressLimit": "Le jeu a trop progressé.",
"AddonMismatch": "Non-concordance des addons. (Client:{0} addons, Serveur:{1} addons)",
"IncompatibleMod": "Tu utilises un mod incompatible/non autorisé. Le premier mod trouvé était {0}",
"PlayerJoinedTheGame": "{0} a rejoint!",
"PlayerLeftTheGame": "{0} est parti!",
"PlayerWasKicked": "{0} a été expulsé.",
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "O estado da instalação da DLC não correspondem. (Cliente:{0}, Servidor:{1})",
"GameProgressLimit": "O jogo progrediu além do limite.",
"AddonMismatch": "Incompatibilidade de Addons. (Cliente:{0} addons, Servidor:{1} addons)",
"IncompatibleMod": "Usando um mod incompativel ou não permitido. Primeiro mod encontrado foi {0}",
"PlayerJoinedTheGame": "{0} entrou!",
"PlayerLeftTheGame": "{0} saiu!",
"PlayerWasKicked": "{0} foi expulso.",
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "Состояние присутствия DLC отличается. (Клиент:{0}, Сервер:{1})",
"GameProgressLimit": "Игра продолжалась слишком долго.",
"AddonMismatch": "Аддоны различаются. (Клиент:{0} аддонов, Сервер:{1} аддонов)",
"IncompatibleMod": "Используется несовместимый(ые)/неразрешенный(ые) мод(ы). Первый из них - {0}",
"PlayerJoinedTheGame": "{0} подключился!",
"PlayerWasKicked": "{0} был отключён.",
"KickedFromServer": "Отключён от сервера. Причина : {0}",
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/spanish.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "El estado de instalación del DLC no coincide. (Cliente:{0}, Servidor:{1})",
"GameProgressLimit": "El juego ha progresado mas del límite permitido.",
"AddonMismatch": "Incompatibilidad de Addons. (Cliente:{0} addons, Servidor:{1} addons)",
"IncompatibleMod": "Se está usando un mod incompatible/no permitido. El primer mod encontrado ha sido {0}",
"PlayerJoinedTheGame": "¡{0} se ha unido!",
"PlayerWasKicked": "{0} ha sido expulsado.",
"KickedFromServer": "Expulsado del servidor. Razón : {0}",
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "DLC yüklenme durumu uyumlu değil. (İstemci:{0}, Sunucu:{1})",
"GameProgressLimit": "Oyun çok fazla ilerlemiş.",
"AddonMismatch": "Yüklü eklentiler uyumsuz. (İstemci:{0} eklentileri, Sunucu:{1} eklentileri)",
"IncompatibleMod": "İzin verilmeyen veya uyumsuz mod kullanılıyor. İlk bulunan mod {0}",
"PlayerJoinedTheGame": "{0} katıldı!",
"PlayerLeftTheGame": "{0} ayrıldı.",
"PlayerWasKicked": "{0} atıldı.",
Expand Down
1 change: 0 additions & 1 deletion QSB/Translations/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"DLCMismatch": "DLC安装情况不匹配。(客户端:{0},服务端:{1})",
"GameProgressLimit": "游戏中时间太久了。",
"AddonMismatch": "插件不匹配(客户端:{0}插件,服务端:{1}插件)",
"IncompatibleMod": "使用了不兼容/不允许的模组,检测到的第一个模组是{0}",
"PlayerJoinedTheGame": "{0}加入了游戏!",
"PlayerWasKicked": "{0}被踢出了游戏。",
"KickedFromServer": "被踢出了游戏,理由是:{0}",
Expand Down
6 changes: 0 additions & 6 deletions QSB/default-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
"value": "localhost",
"tooltip": "Used if you leave the connect prompt blank."
},
"incompatibleModsAllowed": {
"title": "Incompatible Mods Allowed",
"type": "toggle",
"value": false,
"tooltip": "Kicks players if they have certain mods."
},
"showPlayerNames": {
"title": "Show Player Names",
"type": "toggle",
Expand Down

0 comments on commit cd9db16

Please sign in to comment.