mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Update API 9 and add data to items.
This commit is contained in:
parent
c98ed04bf3
commit
cb0da11529
62 changed files with 524 additions and 268 deletions
|
|
@ -20,7 +20,7 @@ internal class CmpFile
|
|||
public bool Valid
|
||||
=> _file != null;
|
||||
|
||||
public CmpFile(IDataManager gameData)
|
||||
public CmpFile(IDataManager gameData, IPluginLog log)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -36,7 +36,7 @@ internal class CmpFile
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
PluginLog.Error("READ THIS\n======== Could not obtain the human.cmp file which is necessary for color sets.\n"
|
||||
log.Error("READ THIS\n======== Could not obtain the human.cmp file which is necessary for color sets.\n"
|
||||
+ "======== This usually indicates an error with your index files caused by TexTools modifications.\n"
|
||||
+ "======== If you have used TexTools before, you will probably need to start over in it to use Glamourer.", e);
|
||||
_file = null;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Penumbra.GameData.Enums;
|
||||
|
||||
|
|
@ -11,9 +12,9 @@ public class CustomizationManager : ICustomizationManager
|
|||
private CustomizationManager()
|
||||
{ }
|
||||
|
||||
public static ICustomizationManager Create(ITextureProvider textures, IDataManager gameData)
|
||||
public static ICustomizationManager Create(ITextureProvider textures, IDataManager gameData, IPluginLog log)
|
||||
{
|
||||
_options ??= new CustomizationOptions(textures, gameData);
|
||||
_options ??= new CustomizationOptions(textures, gameData, log);
|
||||
return new CustomizationManager();
|
||||
}
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ public class CustomizationManager : ICustomizationManager
|
|||
public CustomizationSet GetList(SubRace clan, Gender gender)
|
||||
=> _options!.GetList(clan, gender);
|
||||
|
||||
public ImGuiScene.TextureWrap GetIcon(uint iconId)
|
||||
public IDalamudTextureWrap GetIcon(uint iconId)
|
||||
=> _options!.GetIcon(iconId);
|
||||
|
||||
public string GetName(CustomName name)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Dalamud;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Dalamud.Utility;
|
||||
using Lumina.Excel;
|
||||
|
|
@ -34,7 +35,7 @@ public partial class CustomizationOptions
|
|||
=> _customizationSets[ToIndex(race, gender)];
|
||||
|
||||
// Get specific icons.
|
||||
internal ImGuiScene.TextureWrap GetIcon(uint id)
|
||||
internal IDalamudTextureWrap GetIcon(uint id)
|
||||
=> _icons.LoadIcon(id)!;
|
||||
|
||||
private readonly IconStorage _icons;
|
||||
|
|
@ -61,9 +62,9 @@ public partial class CustomizationOptions
|
|||
public string GetName(CustomName name)
|
||||
=> _names[(int)name];
|
||||
|
||||
internal CustomizationOptions(ITextureProvider textures, IDataManager gameData)
|
||||
internal CustomizationOptions(ITextureProvider textures, IDataManager gameData, IPluginLog log)
|
||||
{
|
||||
var tmp = new TemporaryData(gameData, this);
|
||||
var tmp = new TemporaryData(gameData, this, log);
|
||||
_icons = new IconStorage(textures, gameData);
|
||||
SetNames(gameData, tmp);
|
||||
foreach (var race in Clans)
|
||||
|
|
@ -179,10 +180,10 @@ public partial class CustomizationOptions
|
|||
}
|
||||
|
||||
|
||||
public TemporaryData(IDataManager gameData, CustomizationOptions options)
|
||||
public TemporaryData(IDataManager gameData, CustomizationOptions options, IPluginLog log)
|
||||
{
|
||||
_options = options;
|
||||
_cmpFile = new CmpFile(gameData);
|
||||
_cmpFile = new CmpFile(gameData, log);
|
||||
_customizeSheet = gameData.GetExcelSheet<CharaMakeCustomize>()!;
|
||||
_bnpcCustomize = gameData.GetExcelSheet<BNpcCustomize>()!;
|
||||
_enpcBase = gameData.GetExcelSheet<ENpcBase>()!;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Penumbra.GameData.Enums;
|
||||
|
||||
namespace Glamourer.Customization;
|
||||
|
|
@ -11,6 +12,6 @@ public interface ICustomizationManager
|
|||
|
||||
public CustomizationSet GetList(SubRace race, Gender gender);
|
||||
|
||||
public ImGuiScene.TextureWrap GetIcon(uint iconId);
|
||||
public string GetName(CustomName name);
|
||||
public IDalamudTextureWrap GetIcon(uint iconId);
|
||||
public string GetName(CustomName name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue