diff --git a/Core/Models/Eft/Hideout/HideoutArea.cs b/Core/Models/Eft/Hideout/HideoutArea.cs new file mode 100644 index 00000000..0f1d1a79 --- /dev/null +++ b/Core/Models/Eft/Hideout/HideoutArea.cs @@ -0,0 +1,201 @@ +using System.Text.Json.Serialization; +using Core.Models.Enums; + +namespace Core.Models.Eft.Hideout; + +public class HideoutArea +{ + [JsonPropertyName("_id")] + public string Id { get; set; } + + [JsonPropertyName("type")] + public int Type { get; set; } + + [JsonPropertyName("enabled")] + public bool IsEnabled { get; set; } + + [JsonPropertyName("needsFuel")] + public bool NeedsFuel { get; set; } + + [JsonPropertyName("requirements")] + public List Requirements { get; set; } + + [JsonPropertyName("takeFromSlotLocked")] + public bool IsTakeFromSlotLocked { get; set; } + + [JsonPropertyName("craftGivesExp")] + public bool CraftGivesExperience { get; set; } + + [JsonPropertyName("displayLevel")] + public bool DisplayLevel { get; set; } + + [JsonPropertyName("enableAreaRequirements")] + public bool EnableAreaRequirements { get; set; } + + [JsonPropertyName("parentArea")] + public string? ParentArea { get; set; } + + [JsonPropertyName("stages")] + public Dictionary Stages { get; set; } +} + +public class HideoutAreaRequirement +{ + [JsonPropertyName("areaType")] + public int AreaType { get; set; } + + [JsonPropertyName("requiredlevel")] + public int RequiredLevel { get; set; } + + [JsonPropertyName("type")] + public string Type { get; set; } +} + +public class Stage +{ + [JsonPropertyName("autoUpgrade")] + public bool AutoUpgrade { get; set; } + + [JsonPropertyName("bonuses")] + public List Bonuses { get; set; } + + [JsonPropertyName("constructionTime")] + public int ConstructionTime { get; set; } + + /** Containers inventory tpl */ + [JsonPropertyName("container")] + public string? Container { get; set; } + + [JsonPropertyName("description")] + public string Description { get; set; } + + [JsonPropertyName("displayInterface")] + public bool DisplayInterface { get; set; } + + [JsonPropertyName("improvements")] + public List Improvements { get; set; } + + [JsonPropertyName("requirements")] + public List Requirements { get; set; } + + [JsonPropertyName("slots")] + public int Slots { get; set; } +} + +public class StageImprovement +{ + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("bonuses")] + public List Bonuses { get; set; } + + [JsonPropertyName("improvementTime")] + public int ImprovementTime { get; set; } + + [JsonPropertyName("requirements")] + public List Requirements { get; set; } +} + +public class StageImprovementBonus +{ + [JsonPropertyName("passive")] + public bool IsPassive { get; set; } + + [JsonPropertyName("production")] + public bool IsProduction { get; set; } + + [JsonPropertyName("type")] + public string Type { get; set; } + + [JsonPropertyName("value")] + public int Value { get; set; } + + [JsonPropertyName("visible")] + public bool IsVisible { get; set; } +} + +public class StageImprovementRequirement +{ + [JsonPropertyName("count")] + public int Count { get; set; } + + [JsonPropertyName("isEncoded")] + public bool IsEncoded { get; set; } + + [JsonPropertyName("isFunctional")] + public bool IsFunctional { get; set; } + + [JsonPropertyName("templateId")] + public string TemplateId { get; set; } + + [JsonPropertyName("type")] + public string Type { get; set; } +} + +public class StageRequirement : RequirementBase +{ + [JsonPropertyName("areaType")] + public int? AreaType { get; set; } + + [JsonPropertyName("requiredLevel")] + public int? RequiredLevel { get; set; } + + [JsonPropertyName("templateId")] + public string TemplateId { get; set; } + + [JsonPropertyName("count")] + public int? Count { get; set; } + + [JsonPropertyName("isEncoded")] + public bool IsEncoded { get; set; } = false; + + [JsonPropertyName("isFunctional")] + public bool IsFunctional { get; set; } + + [JsonPropertyName("traderId")] + public string TraderId { get; set; } + + [JsonPropertyName("loyaltyLevel")] + public int? LoyaltyLevel { get; set; } + + [JsonPropertyName("skillName")] + public string SkillName { get; set; } + + [JsonPropertyName("skillLevel")] + public int? SkillLevel { get; set; } +} + +public class StageBonus +{ + [JsonPropertyName("value")] + public int Value { get; set; } + + [JsonPropertyName("passive")] + public bool Passive { get; set; } + + [JsonPropertyName("production")] + public bool Production { get; set; } + + [JsonPropertyName("visible")] + public bool Visible { get; set; } + + [JsonPropertyName("skillType")] + public BonusSkillType? SkillType { get; set; } + + [JsonPropertyName("type")] + public BonusType Type { get; set; } + + [JsonPropertyName("filter")] + public List Filter { get; set; } + + [JsonPropertyName("icon")] + public string Icon { get; set; } + + /** CHANGES PER DUMP */ + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("templateId")] + public string TemplateId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Hideout/HideoutCustomisation.cs b/Core/Models/Eft/Hideout/HideoutCustomisation.cs new file mode 100644 index 00000000..65d47a16 --- /dev/null +++ b/Core/Models/Eft/Hideout/HideoutCustomisation.cs @@ -0,0 +1,64 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Eft.Hideout; + +public class HideoutCustomisation +{ + [JsonPropertyName("globals")] + public List Globals { get; set; } + + [JsonPropertyName("slots")] + public List Slots { get; set; } +} + +public class HideoutCustomisationGlobal +{ + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("conditions")] + public List Conditions { get; set; } + + [JsonPropertyName("type")] + public string Type { get; set; } + + [JsonPropertyName("index")] + public int Index { get; set; } + + [JsonPropertyName("systemName")] + public string SystemName { get; set; } + + [JsonPropertyName("isEnabled")] + public bool IsEnabled { get; set; } + + [JsonPropertyName("itemId")] + public string ItemId { get; set; } +} + +public class HideoutCustomisationSlot +{ + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("conditions")] + public List Conditions { get; set; } + + [JsonPropertyName("type")] + public string Type { get; set; } + + [JsonPropertyName("index")] + public int Index { get; set; } + + [JsonPropertyName("systemName")] + public string SystemName { get; set; } + + [JsonPropertyName("isEnabled")] + public bool IsEnabled { get; set; } + + [JsonPropertyName("slotId")] + public string SlotId { get; set; } + + [JsonPropertyName("areaTypeId")] + public int AreaTypeId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Hideout/HideoutProduction.cs b/Core/Models/Eft/Hideout/HideoutProduction.cs new file mode 100644 index 00000000..6991dd15 --- /dev/null +++ b/Core/Models/Eft/Hideout/HideoutProduction.cs @@ -0,0 +1,122 @@ +using System.Text.Json.Serialization; +using Core.Models.Common; + +namespace Core.Models.Eft.Hideout; + +public class HideoutProductionData +{ + [JsonPropertyName("recipes")] + public List Recipes { get; set; } + + [JsonPropertyName("scavRecipes")] + public List ScavRecipes { get; set; } + + [JsonPropertyName("cultistRecipes")] + public List CultistRecipes { get; set; } +} + +public class HideoutProduction +{ + [JsonPropertyName("_id")] + public string Id { get; set; } + + [JsonPropertyName("areaType")] + public int AreaType { get; set; } + + [JsonPropertyName("requirements")] + public List Requirements { get; set; } + + [JsonPropertyName("productionTime")] + public int ProductionTime { get; set; } + + /** Tpl of item being crafted */ + [JsonPropertyName("endProduct")] + public string EndProduct { get; set; } + + [JsonPropertyName("isEncoded")] + public bool IsEncoded { get; set; } + + [JsonPropertyName("locked")] + public bool Locked { get; set; } + + [JsonPropertyName("needFuelForAllProductionTime")] + public bool NeedFuelForAllProductionTime { get; set; } + + [JsonPropertyName("continuous")] + public bool Continuous { get; set; } + + [JsonPropertyName("count")] + public int Count { get; set; } + + [JsonPropertyName("productionLimitCount")] + public int ProductionLimitCount { get; set; } + + [JsonPropertyName("isCodeProduction")] + public bool IsCodeProduction { get; set; } +} + +public class Requirement : RequirementBase +{ + [JsonPropertyName("templateId")] + public string? TemplateId { get; set; } + + [JsonPropertyName("count")] + public int? Count { get; set; } + + [JsonPropertyName("isEncoded")] + public bool? IsEncoded { get; set; } + + [JsonPropertyName("isFunctional")] + public bool? IsFunctional { get; set; } + + [JsonPropertyName("areaType")] + public int? AreaType { get; set; } + + [JsonPropertyName("requiredLevel")] + public int? RequiredLevel { get; set; } + + [JsonPropertyName("resource")] + public int? Resource { get; set; } + + [JsonPropertyName("questId")] + public string? QuestId { get; set; } +} + +public class RequirementBase +{ + [JsonPropertyName("type")] + public string Type { get; set; } +} + +public class ScavRecipe +{ + [JsonPropertyName("_id")] + public string Id { get; set; } + + [JsonPropertyName("requirements")] + public List Requirements { get; set; } + + [JsonPropertyName("productionTime")] + public int ProductionTime { get; set; } + + [JsonPropertyName("endProducts")] + public EndProducts EndProducts { get; set; } +} + +public class EndProducts +{ + [JsonPropertyName("Common")] + public MinMax Common { get; set; } + + [JsonPropertyName("Rare")] + public MinMax Rare { get; set; } + + [JsonPropertyName("Superrare")] + public MinMax Superrare { get; set; } +} + +public class CultistRecipe +{ + [JsonPropertyName("_id")] + public string Id { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Hideout/HideoutSettingsBase.cs b/Core/Models/Eft/Hideout/HideoutSettingsBase.cs new file mode 100644 index 00000000..f73d9b75 --- /dev/null +++ b/Core/Models/Eft/Hideout/HideoutSettingsBase.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Hideout; + +public class HideoutSettingsBase +{ + [JsonPropertyName("generatorSpeedWithoutFuel")] + public double GeneratorSpeedWithoutFuel { get; set; } + + [JsonPropertyName("generatorFuelFlowRate")] + public double GeneratorFuelFlowRate { get; set; } + + [JsonPropertyName("airFilterUnitFlowRate")] + public double AirFilterUnitFlowRate { get; set; } + + [JsonPropertyName("cultistAmuletBonusPercent")] + public double CultistAmuletBonusPercent { get; set; } + + [JsonPropertyName("gpuBoostRate")] + public double GpuBoostRate { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Hideout/QteData.cs b/Core/Models/Eft/Hideout/QteData.cs new file mode 100644 index 00000000..ea41d9b1 --- /dev/null +++ b/Core/Models/Eft/Hideout/QteData.cs @@ -0,0 +1,249 @@ +using System.Text.Json.Serialization; +using Core.Models.Enums; +using Core.Models.Enums.Hideout; + +namespace Core.Models.Eft.Hideout; + +public class QteData +{ + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("type")] + public QteActivityType Type { get; set; } + + [JsonPropertyName("area")] + public HideoutAreas Area { get; set; } + + [JsonPropertyName("areaLevel")] + public int AreaLevel { get; set; } + + [JsonPropertyName("quickTimeEvents")] + public List QuickTimeEvents { get; set; } + + [JsonPropertyName("requirements")] + public List Requirements { get; set; } + /* + TODO: Could be an array of any of these: + | IAreaRequirement + | IItemRequirement + | ITraderUnlockRequirement + | ITraderLoyaltyRequirement + | ISkillRequirement + | IResourceRequirement + | IToolRequirement + | IQuestRequirement + | IHealthRequirement + | IBodyPartBuffRequirement + */ + + [JsonPropertyName("results")] + public Dictionary Results { get; set; } +} + +public class QuickTimeEvent +{ + [JsonPropertyName("type")] + public QteType EventType { get; set; } + + [JsonPropertyName("position")] + public Position Coordinates { get; set; } + + [JsonPropertyName("startDelay")] + public int StartDelayInMilliseconds { get; set; } + + [JsonPropertyName("endDelay")] + public int EndDelayInMilliseconds { get; set; } + + [JsonPropertyName("speed")] + public float MovementSpeed { get; set; } + + [JsonPropertyName("successRange")] + public Position SuccessCoordinates { get; set; } + + [JsonPropertyName("key")] + public string UniqueKey { get; set; } +} + +public class QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType RequirementType { get; set; } +} + +public class QteResult +{ + [JsonPropertyName("energy")] + public int Energy { get; set; } + + [JsonPropertyName("hydration")] + public int Hydration { get; set; } + + [JsonPropertyName("rewardsRange")] + public List RewardEffects { get; set; } +} + +public class QteEffect +{ + [JsonPropertyName("type")] + public QteRewardType EffectType { get; set; } + + [JsonPropertyName("skillId")] + public int SkillIdentifier { get; set; } + + [JsonPropertyName("levelMultipliers")] + public List LevelMultipliers { get; set; } + + [JsonPropertyName("time")] + public int DurationInMilliseconds { get; set; } + + [JsonPropertyName("weight")] + public float EffectWeight { get; set; } + + [JsonPropertyName("result")] + public QteResultType ResultType { get; set; } +} + +public class SkillLevelMultiplier +{ + [JsonPropertyName("level")] + public int Level { get; set; } + + [JsonPropertyName("multiplier")] + public float MultiplierValue { get; set; } +} + +public class Position +{ + public float X { get; set; } + public float Y { get; set; } +} + +public class AreaRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.Area; + + [JsonPropertyName("areaType")] + public HideoutAreas AreaType { get; set; } + + [JsonPropertyName("requiredLevel")] + public int RequiredLevel { get; set; } +} + +public class TraderUnlockRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.TraderUnlock; + + [JsonPropertyName("traderId")] + public Traders TraderId { get; set; } +} + +public class TraderLoyaltyRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.TraderLoyalty; + + [JsonPropertyName("traderId")] + public Traders TraderId { get; set; } + + [JsonPropertyName("loyaltyLevel")] + public int LoyaltyLevel { get; set; } +} + +public class SkillRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.Skill; + + [JsonPropertyName("skillName")] + public SkillTypes SkillName { get; set; } + + [JsonPropertyName("skillLevel")] + public int SkillLevel { get; set; } +} + +public class ResourceRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.Resource; + + [JsonPropertyName("templateId")] + public string TemplateId { get; set; } + + [JsonPropertyName("resource")] + public int Resource { get; set; } +} + +public class ItemRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.Item; + + [JsonPropertyName("templateId")] + public string TemplateId { get; set; } + + [JsonPropertyName("count")] + public int Count { get; set; } + + [JsonPropertyName("isFunctional")] + public bool IsFunctional { get; set; } + + [JsonPropertyName("isEncoded")] + public bool IsEncoded { get; set; } +} + +public class ToolRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.Tool; + + [JsonPropertyName("templateId")] + public string TemplateId { get; set; } + + [JsonPropertyName("count")] + public int Count { get; set; } + + [JsonPropertyName("isFunctional")] + public bool IsFunctional { get; set; } + + [JsonPropertyName("isEncoded")] + public bool IsEncoded { get; set; } +} + +public class QuestRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.QuestComplete; + + [JsonPropertyName("questId")] + public string QuestId { get; set; } +} + +public class HealthRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.Health; + + [JsonPropertyName("energy")] + public int Energy { get; set; } + + [JsonPropertyName("hydration")] + public int Hydration { get; set; } +} + +public class BodyPartBuffRequirement : QteRequirement +{ + [JsonPropertyName("type")] + public RequirementType Type { get; set; } = RequirementType.BodyPartBuff; + + [JsonPropertyName("effectName")] + public Effect EffectName { get; set; } + + [JsonPropertyName("bodyPart")] + public BodyPart BodyPart { get; set; } + + [JsonPropertyName("excluded")] + public bool Excluded { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Enums/Hideout/CircleRewardType.cs b/Core/Models/Enums/Hideout/CircleRewardType.cs new file mode 100644 index 00000000..053c534c --- /dev/null +++ b/Core/Models/Enums/Hideout/CircleRewardType.cs @@ -0,0 +1,7 @@ +namespace Core.Models.Enums.Hideout; + +public enum CircleRewardType +{ + RANDOM = 0, + HIDEOUT_TASK = 1 +} \ No newline at end of file diff --git a/Core/Models/Enums/Hideout/QteActivityType.cs b/Core/Models/Enums/Hideout/QteActivityType.cs new file mode 100644 index 00000000..30e20b7e --- /dev/null +++ b/Core/Models/Enums/Hideout/QteActivityType.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Enums.Hideout; + +public enum QteActivityType +{ + GYM = 0 +} \ No newline at end of file diff --git a/Core/Models/Enums/Hideout/QteEffectType.cs b/Core/Models/Enums/Hideout/QteEffectType.cs new file mode 100644 index 00000000..d49c3af9 --- /dev/null +++ b/Core/Models/Enums/Hideout/QteEffectType.cs @@ -0,0 +1,8 @@ +namespace Core.Models.Enums.Hideout; + +public enum QteEffectType +{ + finishEffect, + singleSuccessEffect, + singleFailEffect +} \ No newline at end of file diff --git a/Core/Models/Enums/Hideout/QteResultType.cs b/Core/Models/Enums/Hideout/QteResultType.cs new file mode 100644 index 00000000..bf04aa61 --- /dev/null +++ b/Core/Models/Enums/Hideout/QteResultType.cs @@ -0,0 +1,7 @@ +namespace Core.Models.Enums.Hideout; + +public enum QteResultType +{ + None, + Exit +} \ No newline at end of file diff --git a/Core/Models/Enums/Hideout/QteRewardType.cs b/Core/Models/Enums/Hideout/QteRewardType.cs new file mode 100644 index 00000000..98f223e2 --- /dev/null +++ b/Core/Models/Enums/Hideout/QteRewardType.cs @@ -0,0 +1,9 @@ +namespace Core.Models.Enums.Hideout; + +public enum QteRewardType +{ + Skill, + HealthEffect, + MusclePain, + GymArmTrauma +} \ No newline at end of file diff --git a/Core/Models/Enums/Hideout/QteType.cs b/Core/Models/Enums/Hideout/QteType.cs new file mode 100644 index 00000000..99fcbe22 --- /dev/null +++ b/Core/Models/Enums/Hideout/QteType.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Enums.Hideout; + +public enum QteType +{ + SHRINKING_CIRCLE = 0, +} \ No newline at end of file diff --git a/Core/Models/Enums/Hideout/RequirementType.cs b/Core/Models/Enums/Hideout/RequirementType.cs new file mode 100644 index 00000000..a8dce8db --- /dev/null +++ b/Core/Models/Enums/Hideout/RequirementType.cs @@ -0,0 +1,15 @@ +namespace Core.Models.Enums.Hideout; + +public enum RequirementType +{ + Area, + Item, + TraderUnlock, + TraderLoyalty, + Skill, + Resource, + Tool, + QuestComplete, + Health, + BodyPartBuff +} \ No newline at end of file diff --git a/Core/Models/Spt/Hideout/Hideout.cs b/Core/Models/Spt/Hideout/Hideout.cs index 441408d4..27b6d101 100644 --- a/Core/Models/Spt/Hideout/Hideout.cs +++ b/Core/Models/Spt/Hideout/Hideout.cs @@ -1,5 +1,5 @@ using System.Text.Json.Serialization; -using Core.Models.Spt.Repeatable; +using Core.Models.Eft.Hideout; namespace Core.Models.Spt.Hideout; @@ -18,5 +18,5 @@ public class Hideout public HideoutSettingsBase Settings { get; set; } [JsonPropertyName("qte")] - public List Qte { get; set; } + public List Qte { get; set; } } \ No newline at end of file diff --git a/server-csharp.sln.DotSettings b/server-csharp.sln.DotSettings index 37cd0abc..520e5053 100644 --- a/server-csharp.sln.DotSettings +++ b/server-csharp.sln.DotSettings @@ -2,4 +2,8 @@ True NEVER NEVER - NEVER \ No newline at end of file + NEVER + True + True + True + True \ No newline at end of file