update instance code

This commit is contained in:
Florian Stinglmayr 2023-05-11 20:43:30 +02:00
parent 1e36eb3419
commit c23e8627f6

View File

@ -25,7 +25,7 @@ public class Instances {
/// <summary>
/// Medium Thargoid combat zone
/// </summary>
public static readonly string WarzoneThargoidMed = "$Warzone_TG_Med";
public static readonly string WarzoneThargoidMedium = "$Warzone_TG_Med";
/// <summary>
/// High Thargoid combat zone
/// </summary>
@ -35,6 +35,27 @@ public class Instances {
/// </summary>
public static readonly string WarzoneThargoidVeryHigh = "$Warzone_TG_VeryHigh";
public static bool IsThargoidWarzone(string type) {
return
IsInstance(type, WarzoneThargoidLow) ||
IsInstance(type, WarzoneThargoidMedium) ||
IsInstance(type, WarzoneThargoidHigh) ||
IsInstance(type, WarzoneThargoidVeryHigh)
;
}
public static bool IsHumanWarzone(string type) {
return
IsInstance(type, WarzoneLow) ||
IsInstance(type, WarzoneMedium) ||
IsInstance(type, WarzoneHigh)
;
}
public static bool IsWarzone(string type) {
return IsHumanWarzone(type) || IsThargoidWarzone(type);
}
public static bool IsInstance(string type, string instance) {
if (string.IsNullOrEmpty(type) || string.IsNullOrEmpty(instance)) {
return false;