using System.Collections.Generic;
using Verse;
namespace BlaxSlaves
{
///
/// Shared mod detection and the list of mods Blax Slaves replaces. The third-party patches for
/// slave harm (War Crimes Expanded 2, Harvest Organs Post Mortem, Hospitality) live in SlaveHarm.cs.
///
public static partial class Compat
{
public const string TradeAsSlaveOrColonist = "Rhajiit.tradepurchasemode";
public const string EverybodyBuysSlaves = "bblkepling.EverybodyBuysSlaves";
public const string SyrMoreSlaves = "Mlie.SYRMoreSlaves";
///
/// Active by packageId, local or Steam copy. ModsConfig.IsActive misses a mod that is installed
/// both ways (the Steam copy gets a "_steam" postfix), so nothing in Blax Slaves uses it.
///
public static bool IsActive(string packageId) => ModLister.GetActiveModWithIdentifier(packageId, ignorePostfix: true) != null;
public struct ReplacedMod
{
public string packageId;
public string name;
public string note; // translation key
public ReplacedMod(string packageId, string name, string note)
{
this.packageId = packageId;
this.name = name;
this.note = note;
}
}
/// Mods a Blax Slaves feature replaces, shown in the Compat tab when they are active.
public static readonly List Replaced = new List
{
new ReplacedMod(TradeAsSlaveOrColonist, "Trade as Slave or Colonist", "BlaxSlaves_CompatNoteBuyMode"),
new ReplacedMod(EverybodyBuysSlaves, "Everybody Buys Slaves", "BlaxSlaves_CompatNoteEverybodyBuys"),
new ReplacedMod(SyrMoreSlaves, "[SYR] More Slaves", "BlaxSlaves_CompatNoteMoreSlaves"),
};
}
}