-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCompatibilityTracker.cs
62 lines (56 loc) · 1.64 KB
/
CompatibilityTracker.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Verse;
using RimWorld;
using System.Reflection;
namespace QEthics
{
[StaticConstructorOnStartup]
public static class CompatibilityTracker
{
private static bool alienRacesActiveInt = false;
public static bool AlienRacesActive
{
get
{
return alienRacesActiveInt;
}
}
private static bool deathRattleActiveInt = false;
public static bool DeathRattleActive
{
get
{
return deathRattleActiveInt;
}
}
static CompatibilityTracker()
{
//Check for Alien Races Compatiblity.
Log.Message("Questionable Ethics checking for compatibility...");
Log.Message("Checking for compatibility for: Alien Race Framework...");
if(GenTypes.AllTypes.Any(type => type.FullName == "AlienRace.ThingDef_AlienRace"))
{
alienRacesActiveInt = true;
Log.Message("Is OK.");
}
else
{
Log.Message("No compatibility.");
}
//Check for Death Rattle Compatiblity.
Log.Message("Checking for compatibility for: Death Rattle...");
if (GenTypes.AllTypes.Any(type => type.FullName == "DeathRattle.DeathRattleBase"))
{
deathRattleActiveInt = true;
Log.Message("Is OK.");
}
else
{
Log.Message("No compatibility.");
}
}
}
}