Merge branch 'develop' of https://github.com/sp-tarkov/server-csharp into develop
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
namespace SPTarkov.DI.Annotations;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace SPTarkov.DI.Annotations;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
||||
[MeansImplicitUse]
|
||||
public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? typeOverride = null, int typePriority = int.MaxValue)
|
||||
: Attribute
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
namespace SPTarkov.Reflection.Patching;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace SPTarkov.Reflection.Patching;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchPrefixAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchPostfixAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchTranspilerAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchFinalizerAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchIlManipulatorAttribute : Attribute { }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HarmonyX" Version="2.15.0" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SPTarkov.DI\SPTarkov.DI.csproj" />
|
||||
|
||||
@@ -12,7 +12,7 @@ public record Globals
|
||||
public required Config Configuration { get; init; }
|
||||
|
||||
[JsonPropertyName("LocationInfection")]
|
||||
public required LocationInfection LocationInfection { get; init; }
|
||||
public required Dictionary<string, int> LocationInfection { get; init; }
|
||||
|
||||
[JsonPropertyName("bot_presets")]
|
||||
public required IEnumerable<BotPreset> BotPresets { get; init; }
|
||||
@@ -85,39 +85,6 @@ public record RadioStation
|
||||
public RadioStationType Station { get; set; }
|
||||
}
|
||||
|
||||
public record LocationInfection
|
||||
{
|
||||
[JsonPropertyName("Interchange")]
|
||||
public double Interchange { get; set; }
|
||||
|
||||
[JsonPropertyName("Lighthouse")]
|
||||
public double Lighthouse { get; set; }
|
||||
|
||||
[JsonPropertyName("RezervBase")]
|
||||
public double RezervBase { get; set; }
|
||||
|
||||
[JsonPropertyName("Sandbox")]
|
||||
public double Sandbox { get; set; }
|
||||
|
||||
[JsonPropertyName("Shoreline")]
|
||||
public double Shoreline { get; set; }
|
||||
|
||||
[JsonPropertyName("TarkovStreets")]
|
||||
public double TarkovStreets { get; set; }
|
||||
|
||||
[JsonPropertyName("Woods")]
|
||||
public double Woods { get; set; }
|
||||
|
||||
[JsonPropertyName("bigmap")]
|
||||
public double BigMap { get; set; }
|
||||
|
||||
[JsonPropertyName("factory4")]
|
||||
public double Factory4 { get; set; }
|
||||
|
||||
[JsonPropertyName("laboratory")]
|
||||
public double Laboratory { get; set; }
|
||||
}
|
||||
|
||||
public record ArtilleryShelling
|
||||
{
|
||||
[JsonPropertyName("ArtilleryMapsConfigs")]
|
||||
|
||||
@@ -738,7 +738,7 @@ public class SeasonalEventService(
|
||||
infectionHalloween.DisplayUIEnabled = true;
|
||||
infectionHalloween.Enabled = true;
|
||||
|
||||
var globalInfectionDict = globals.LocationInfection.GetAllPropertiesAsDictionary();
|
||||
var globalInfectionDict = globals.LocationInfection;
|
||||
foreach (var (locationId, infectionPercentage) in zombieSettings.MapInfectionAmount)
|
||||
{
|
||||
// calculate a random value unless the rate is 100
|
||||
@@ -758,7 +758,7 @@ public class SeasonalEventService(
|
||||
}
|
||||
|
||||
// Globals data needs value updated too
|
||||
globalInfectionDict[locationId] = randomInfectionPercentage;
|
||||
globalInfectionDict[locationId] = Convert.ToInt32(randomInfectionPercentage);
|
||||
}
|
||||
|
||||
foreach (var locationId in zombieSettings.DisableBosses)
|
||||
|
||||
Reference in New Issue
Block a user