Apply most of Api10ToDo (#1782)

This commit is contained in:
srkizer 2024-04-21 15:25:33 +09:00 committed by GitHub
parent 8ff4662f1f
commit bd2c9b2258
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 115 additions and 561 deletions

View file

@ -52,7 +52,7 @@ public sealed class DalamudPluginInterface : IDisposable
var dataManager = Service<DataManager>.Get();
var localization = Service<Localization>.Get();
this.UiBuilder = new UiBuilder(plugin.Name, plugin);
this.UiBuilder = new UiBuilder(plugin.Name);
this.configs = Service<PluginManager>.Get().PluginConfigs;
this.Reason = reason;

View file

@ -6,8 +6,8 @@ using System.Threading;
using System.Threading.Tasks;
using Dalamud.Configuration.Internal;
using Dalamud.Interface.ImGuiNotification;
using Dalamud.Interface.ImGuiNotification.Internal;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Logging.Internal;
using Dalamud.Plugin.Internal.Types.Manifest;

View file

@ -4,11 +4,9 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Dalamud.Common.Game;
using Dalamud.Configuration.Internal;
using Dalamud.Game;
using Dalamud.Game.Gui.Dtr;
using Dalamud.Interface.GameFonts;
using Dalamud.Interface.Internal;
using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
@ -629,12 +627,6 @@ internal class LocalPlugin : IDisposable
config.LoadInMemory = true;
config.PreferSharedTypes = false;
// Pin Lumina and its dependencies recursively (compatibility behavior).
// It currently only pulls in System.* anyway.
// TODO(api10): Remove this. We don't want to pin Lumina anymore, plugins should be able to provide their own.
config.SharedAssemblies.Add((typeof(Lumina.GameData).Assembly.GetName(), true));
config.SharedAssemblies.Add((typeof(Lumina.Excel.ExcelSheetImpl).Assembly.GetName(), true));
// Make sure that plugins do not load their own Dalamud assembly.
// We do not pin this recursively; if a plugin loads its own assembly of Dalamud, it is always wrong,
// but plugins may load other versions of assemblies that Dalamud depends on.

View file

@ -1,16 +1,13 @@
using System.Collections.Generic;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Utility;
namespace Dalamud.Plugin.Services;
/// <summary>
/// This collection represents the currently spawned FFXIV game objects.
/// </summary>
[Api10ToDo(
"Make it an IEnumerable<GameObject> instead. Skipping null objects make IReadOnlyCollection<T>.Count yield incorrect values.")]
public interface IObjectTable : IReadOnlyCollection<GameObject>
public interface IObjectTable : IEnumerable<GameObject>
{
/// <summary>
/// Gets the address of the object table.