Skip to content

Commit fe04661

Browse files
committed
Merge branch 'develop'
2 parents d2e2f04 + 96c7fef commit fe04661

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

Libraries/SPTarkov.Server.Core/Migration/AbstractProfileMigration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ public abstract class AbstractProfileMigration : IProfileMigration
88
public virtual string MigrationName { get; }
99
public virtual IEnumerable<Type> PrerequisiteMigrations { get; } = [];
1010

11+
[Obsolete("Will be removed in the next version of SPT due to this property not being used.")]
1112
public abstract string FromVersion { get; }
13+
14+
[Obsolete("Will be removed in the next version of SPT due to this property not being used.")]
1215
public abstract string ToVersion { get; }
1316

1417
public abstract bool CanMigrate(JsonObject profile, IEnumerable<IProfileMigration> previouslyRanMigrations);

Libraries/SPTarkov.Server.Core/Services/SeasonalEventService.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -628,18 +628,18 @@ protected void ReplaceBotHostility(
628628
continue;
629629
}
630630

631-
// Try to get map 'default' first if it exists
632-
if (!hostilitySettings.TryGetValue("default", out var newHostilitySettings))
631+
// Try for location-specific hostility settings first
632+
if (!hostilitySettings.TryGetValue(locationBase.Base.Id.ToLowerInvariant(), out var newHostilitySettings))
633633
{
634-
// No 'default', try for location name
635-
if (!hostilitySettings.TryGetValue(locationName, out newHostilitySettings))
634+
// If we don't have location-specific, fall back to defaults
635+
if (!hostilitySettings.TryGetValue("default", out newHostilitySettings))
636636
{
637-
// no settings for map by name, skip map
637+
// No settings by map, or default fallback, skip map
638638
continue;
639639
}
640640
}
641641

642-
if (locationWhitelist is not null && !locationWhitelist.Contains(locationName))
642+
if (locationWhitelist is not null && !locationWhitelist.Contains(locationBase.Base.Id.ToLowerInvariant()))
643643
{
644644
continue;
645645
}
@@ -823,7 +823,7 @@ protected void ConfigureZombies(ZombieSettings zombieSettings)
823823
/// Get location ids of maps with an infection above 0
824824
/// </summary>
825825
/// <param name="locationInfections">Dict of locations with their infection percentage</param>
826-
/// <returns>List of location ids</returns>
826+
/// <returns>List of lowercased location ids</returns>
827827
protected HashSet<string> GetLocationsWithZombies(Dictionary<string, double> locationInfections)
828828
{
829829
var result = new HashSet<string>();
@@ -834,7 +834,7 @@ protected HashSet<string> GetLocationsWithZombies(Dictionary<string, double> loc
834834
// Convert the infected location id into its generic location id
835835
foreach (var location in infectionKeys)
836836
{
837-
result.UnionWith(GetLocationFromInfectedLocation(location.Key));
837+
result.UnionWith(GetLocationFromInfectedLocation(location.Key.ToLowerInvariant()));
838838
}
839839

840840
return result;
@@ -850,7 +850,7 @@ protected List<string> GetLocationFromInfectedLocation(string infectedLocationKe
850850
return infectedLocationKey switch
851851
{
852852
"factory4" => ["factory4_day", "factory4_night"],
853-
"Sandbox" => ["sandbox", "sandbox_high"],
853+
"sandbox" => ["sandbox", "sandbox_high"],
854854
_ => [infectedLocationKey],
855855
};
856856
}
@@ -910,7 +910,8 @@ protected void AddEventBossesToMaps(string eventType, HashSet<string>? mapIdWhit
910910
var mapBosses = ((Location)locations[locationName]).Base.BossLocationSpawn;
911911
foreach (var boss in bossesToAdd)
912912
{
913-
if (mapBosses.All(bossSpawn => bossSpawn.BossName != boss.BossName))
913+
// Don't re-add bosses that already exist, unless they're event bosses
914+
if (mapBosses.All(bossSpawn => bossSpawn.TriggerName == "botEvent" || bossSpawn.BossName != boss.BossName))
914915
{
915916
// Boss doesn't exist in maps boss list yet, add
916917
mapBosses.Add(boss);

0 commit comments

Comments
 (0)