coffees-rjw-ideology-addons/Source/Base/SoftDependencyChecker.cs

39 lines
1.2 KiB
C#
Raw Normal View History

2021-08-02 02:40:18 +00:00
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;
using rjw;
namespace C0ffee_s_RJW_Ideology_Addons
{
[StaticConstructorOnStartup]
public static class SoftDependencyChecker
{
static SoftDependencyChecker()
{
string missingSoftDependencies = "";
2021-08-02 18:55:46 +00:00
if (!LoadedModManager.RunningModsListForReading.Any((ModContentPack x) => x.PackageId == "c0ffee.rjw.events"))
2021-08-02 02:40:18 +00:00
{
missingSoftDependencies += "missing RJW Events, orgies will NOT be included; ";
}
2021-08-02 18:55:46 +00:00
if (!LoadedModManager.RunningModsListForReading.Any((ModContentPack x) => x.PackageId == "rjw.milk.humanoid"))
2021-08-02 02:40:18 +00:00
{
missingSoftDependencies += "missing RJW Milkable Colonists, hucow and lactation will NOT be included; ";
}
if(missingSoftDependencies != "")
{
2021-08-02 02:41:19 +00:00
Log.Warning("[c0ffee's RJW Ideology Addons] Warning, you're missing the following soft dependencies: " + missingSoftDependencies + "Features involving those mods will be disabled.");
2021-08-02 02:40:18 +00:00
}
}
}
}