Refactored pre spt mod loader to user IOnLoad, moved Watermark to IOnLoad as well (#313)

Co-authored-by: Alex <alex@dm-me-for-questions.com>
This commit is contained in:
clodanSPT
2025-05-30 11:03:08 +01:00
committed by GitHub
parent 1aa9bc3f2f
commit ee51e1fcab
27 changed files with 127 additions and 166 deletions
@@ -20,7 +20,7 @@ public class HideoutCraftQuestIdGenerator(
DatabaseServer _databaseServer,
LocaleService _localeService,
ItemHelper _itemHelper,
IEnumerable<IOnLoad> _onLoadComponents
DatabaseImporter _databaseImporter
)
{
private static readonly HashSet<string> _blacklistedProductions =
@@ -43,9 +43,7 @@ public class HideoutCraftQuestIdGenerator(
public async Task Run()
{
// We only need the DB for this, other OnLoad events alter the data
var dbOnload = _onLoadComponents.FirstOrDefault(x => x.GetRoute() == "spt-database");
await dbOnload.OnLoad();
await _databaseImporter.OnLoad();
// Build up our dataset
BuildQuestProductionList();