Moved craft ids out of UnlockHideoutLootCrateCrafts into config

This commit is contained in:
Chomp
2025-10-04 13:32:48 +01:00
parent 49b9fa3e19
commit 99891858cb
3 changed files with 12 additions and 11 deletions
@@ -626,5 +626,10 @@
}
]
}
]
],
"hideoutLootCrateCraftIdsToUnlockInHideout": [
"66582be04de4820934746cea",
"6745925da9c9adf0450d5bca",
"67449c79268737ef6908d636"
]
}
@@ -44,6 +44,9 @@ public record HideoutConfig : BaseConfig
[JsonPropertyName("hideoutCraftsToAdd")]
public required List<HideoutCraftToAdd> HideoutCraftsToAdd { get; set; }
[JsonPropertyName("hideoutLootCrateCraftIdsToUnlockInHideout")]
public IEnumerable<MongoId> HideoutLootCrateCraftIdsToUnlockInHideout { get; set; }
}
public record HideoutCraftToAdd
@@ -93,7 +93,7 @@ public class PostDbLoadService(
AdjustHideoutCraftTimes(HideoutConfig.OverrideCraftTimeSeconds);
AdjustHideoutBuildTimes(HideoutConfig.OverrideBuildTimeSeconds);
UnlockHideoutLootCrateCrafts();
UnlockHideoutLootCrateCrafts(HideoutConfig.HideoutLootCrateCraftIdsToUnlockInHideout);
CloneExistingCraftsAndAddNew();
@@ -617,16 +617,9 @@ public class PostDbLoadService(
}
}
protected void UnlockHideoutLootCrateCrafts()
protected void UnlockHideoutLootCrateCrafts(IEnumerable<MongoId> craftIdsToUnlock)
{
var hideoutLootBoxCraftIds = new List<string>
{
"66582be04de4820934746cea",
"6745925da9c9adf0450d5bca",
"67449c79268737ef6908d636",
};
foreach (var craftId in hideoutLootBoxCraftIds)
foreach (var craftId in craftIdsToUnlock)
{
var recipe = databaseService.GetHideout().Production.Recipes.FirstOrDefault(craft => craft.Id == craftId);
if (recipe is not null)