Moved craft ids out of UnlockHideoutLootCrateCrafts into config
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user