Added eventType enum
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
using Core.Models.Eft.Hideout;
|
||||
using Core.Models.Enums;
|
||||
|
||||
namespace Core.Models.Eft.Common;
|
||||
|
||||
@@ -538,7 +539,7 @@ public record Config
|
||||
public BTRSettings? BTRSettings { get; set; }
|
||||
|
||||
[JsonPropertyName("EventType")]
|
||||
public List<string> EventType { get; set; }
|
||||
public List<EventType> EventType { get; set; }
|
||||
|
||||
[JsonPropertyName("WalkSpeed")]
|
||||
public XYZ? WalkSpeed { get; set; }
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Core.Models.Enums
|
||||
{
|
||||
public enum EventType
|
||||
{
|
||||
None,
|
||||
Halloween,
|
||||
Christmas,
|
||||
HalloweenIllumination
|
||||
}
|
||||
}
|
||||
@@ -471,9 +471,9 @@ public class SeasonalEventService(
|
||||
{
|
||||
_halloweenEventActive = true;
|
||||
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != "None").ToList();
|
||||
globalConfig.EventType.Add("Halloween");
|
||||
globalConfig.EventType.Add("HalloweenIllumination");
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != EventType.None).ToList();
|
||||
globalConfig.EventType.Add(EventType.Halloween);
|
||||
globalConfig.EventType.Add(EventType.HalloweenIllumination);
|
||||
globalConfig.Health.ProfileHealthSettings.DefaultStimulatorBuff = "Buffs_Halloween";
|
||||
AddEventGearToBots(eventType.Type);
|
||||
AdjustZryachiyMeleeChance();
|
||||
@@ -513,8 +513,8 @@ public class SeasonalEventService(
|
||||
|
||||
if (eventType.Settings?.EnableChristmasHideout ?? false)
|
||||
{
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != "None").ToList();
|
||||
globalConfig.EventType.Add("Christmas");
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != EventType.None).ToList();
|
||||
globalConfig.EventType.Add(EventType.Christmas);
|
||||
}
|
||||
|
||||
AddEventGearToBots(eventType.Type);
|
||||
@@ -539,8 +539,8 @@ public class SeasonalEventService(
|
||||
|
||||
if (eventType.Settings?.EnableChristmasHideout ?? false)
|
||||
{
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != "None").ToList();
|
||||
globalConfig.EventType.Add("Christmas");
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != EventType.None).ToList();
|
||||
globalConfig.EventType.Add(EventType.Christmas);
|
||||
}
|
||||
|
||||
AddEventGearToBots(SeasonalEventType.Christmas);
|
||||
@@ -1032,14 +1032,14 @@ public class SeasonalEventService(
|
||||
protected void HandleModEvent(SeasonalEvent seasonalEvent, Config globalConfig)
|
||||
{
|
||||
if (seasonalEvent.Settings?.EnableChristmasHideout ?? false) {
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != "None").ToList();
|
||||
globalConfig.EventType.Add("Christmas");
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != EventType.None).ToList();
|
||||
globalConfig.EventType.Add(EventType.Christmas);
|
||||
}
|
||||
|
||||
if (seasonalEvent.Settings?.EnableHalloweenHideout ?? false) {
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != "None").ToList();
|
||||
globalConfig.EventType.Add("Halloween");
|
||||
globalConfig.EventType.Add("HalloweenIllumination");
|
||||
globalConfig.EventType = globalConfig.EventType.Where((x) => x != EventType.None).ToList();
|
||||
globalConfig.EventType.Add(EventType.Halloween);
|
||||
globalConfig.EventType.Add(EventType.HalloweenIllumination);
|
||||
}
|
||||
|
||||
if (seasonalEvent.Settings?.AddEventGearToBots ?? false) {
|
||||
|
||||
@@ -42,6 +42,7 @@ public class JsonUtil
|
||||
new EftEnumConverter<DamageEffectType>(),
|
||||
new EftEnumConverter<RepairStrategyType>(),
|
||||
new EftEnumConverter<ThrowWeapType>(),
|
||||
new EftEnumConverter<EventType>(),
|
||||
new BaseInteractionRequestDataConverter()
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user