using System.Data; using System.Diagnostics.CodeAnalysis; using System.Text.RegularExpressions; using Dalamud.Plugin.Services; using LLib; using Lumina.Excel; using Lumina.Excel.CustomSheets; using Lumina.Excel.GeneratedSheets; namespace Workshoppa.GameData; internal sealed class GameStrings { public GameStrings(IDataManager dataManager, IPluginLog pluginLog) { PurchaseItemForGil = dataManager.GetRegex(3406, addon => addon.Text, pluginLog) ?? throw new ConstraintException($"Unable to resolve {nameof(PurchaseItemForGil)}"); PurchaseItemForCompanyCredits = dataManager.GetRegex(3473, addon => addon.Text, pluginLog) ?? throw new ConstraintException($"Unable to resolve {nameof(PurchaseItemForCompanyCredits)}"); ViewCraftingLog = dataManager.GetString("TEXT_CMNDEFCOMPANYMANUFACTORY_00150_MENU_CC_NOTE", pluginLog) ?? throw new ConstraintException($"Unable to resolve {nameof(ViewCraftingLog)}"); TurnInHighQualityItem = dataManager.GetString(102434, addon => addon.Text, pluginLog) ?? throw new ConstraintException($"Unable to resolve {nameof(TurnInHighQualityItem)}"); ContributeItems = dataManager.GetRegex(6652, addon => addon.Text, pluginLog) ?? throw new ConstraintException($"Unable to resolve {nameof(ContributeItems)}"); RetrieveFinishedItem = dataManager.GetRegex("TEXT_CMNDEFCOMPANYMANUFACTORY_00150_FINISH_CONF", pluginLog) ?? throw new ConstraintException($"Unable to resolve {nameof(RetrieveFinishedItem)}"); } public Regex PurchaseItemForGil { get; } public Regex PurchaseItemForCompanyCredits { get; } public string ViewCraftingLog { get; } public string TurnInHighQualityItem { get; } public Regex ContributeItems { get; } public Regex RetrieveFinishedItem { get; } [Sheet("custom/001/CmnDefCompanyManufactory_00150")] [SuppressMessage("Performance", "CA1812")] private sealed class WorkshopDialogue : QuestDialogueText { } }