2023-05-10 09:36:02 +02:00
|
|
|
|
namespace EDPlayerJournal;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Contains information regarding instances you can supercruise into,
|
|
|
|
|
/// such as combat zones, installations and megaship scenarios.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class Instances {
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Low ship combat zone
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string WarzoneLow = "$Warzone_PointRace_Low";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Medium ship combat zone
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string WarzoneMedium = "$Warzone_PointRace_Med";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// High ship combat zone.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string WarzoneHigh = "$Warzone_PointRace_High";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Low Thargoid combat zone
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string WarzoneThargoidLow = "$Warzone_TG_Low";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Medium Thargoid combat zone
|
|
|
|
|
/// </summary>
|
2023-05-11 20:43:30 +02:00
|
|
|
|
public static readonly string WarzoneThargoidMedium = "$Warzone_TG_Med";
|
2023-05-10 09:36:02 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// High Thargoid combat zone
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string WarzoneThargoidHigh = "$Warzone_TG_High";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Very High Thargoid combat zone
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly string WarzoneThargoidVeryHigh = "$Warzone_TG_VeryHigh";
|
|
|
|
|
|
2023-05-11 20:43:30 +02:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-10 09:36:02 +02:00
|
|
|
|
public static bool IsInstance(string type, string instance) {
|
|
|
|
|
if (string.IsNullOrEmpty(type) || string.IsNullOrEmpty(instance)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Instance names are split by a semi colon, with the remainder being
|
|
|
|
|
// additional info to such as index.
|
|
|
|
|
string[] parts = type.Split(":");
|
|
|
|
|
if (!parts[0].StartsWith("$")) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return string.Compare(parts[0], instance, true) == 0;
|
|
|
|
|
}
|
|
|
|
|
}
|