mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-17 05:17:43 +01:00
Use ObjectManager, Actor and Model.
This commit is contained in:
parent
5b9309a311
commit
c8216b0acc
22 changed files with 240 additions and 325 deletions
|
|
@ -12,6 +12,7 @@ using Penumbra.Collections.Manager;
|
|||
using Penumbra.Communication;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Files;
|
||||
using Penumbra.GameData.Interop;
|
||||
using Penumbra.Import.Models;
|
||||
using Penumbra.Import.Textures;
|
||||
using Penumbra.Interop.Hooks.Objects;
|
||||
|
|
@ -46,7 +47,7 @@ public partial class ModEditWindow : Window, IDisposable
|
|||
private readonly IDragDropManager _dragDropManager;
|
||||
private readonly IDataManager _gameData;
|
||||
private readonly IFramework _framework;
|
||||
private readonly IObjectTable _objects;
|
||||
private readonly ObjectManager _objects;
|
||||
private readonly CharacterBaseDestructor _characterBaseDestructor;
|
||||
|
||||
private Vector2 _iconSize = Vector2.Zero;
|
||||
|
|
@ -446,7 +447,7 @@ public partial class ModEditWindow : Window, IDisposable
|
|||
|
||||
DrawOptionSelectHeader();
|
||||
|
||||
var setsEqual = !_editor!.SwapEditor.Changes;
|
||||
var setsEqual = !_editor.SwapEditor.Changes;
|
||||
var tt = setsEqual ? "No changes staged." : "Apply the currently staged changes to the option.";
|
||||
ImGui.NewLine();
|
||||
if (ImGuiUtil.DrawDisabledButton("Apply Changes", Vector2.Zero, tt, setsEqual))
|
||||
|
|
@ -577,7 +578,7 @@ public partial class ModEditWindow : Window, IDisposable
|
|||
Configuration config, ModEditor editor, ResourceTreeFactory resourceTreeFactory, MetaFileManager metaFileManager,
|
||||
StainService stainService, ActiveCollections activeCollections, ModMergeTab modMergeTab,
|
||||
CommunicatorService communicator, TextureManager textures, ModelManager models, IDragDropManager dragDropManager,
|
||||
ChangedItemDrawer changedItemDrawer, IObjectTable objects, IFramework framework, CharacterBaseDestructor characterBaseDestructor)
|
||||
ChangedItemDrawer changedItemDrawer, ObjectManager objects, IFramework framework, CharacterBaseDestructor characterBaseDestructor)
|
||||
: base(WindowBaseLabel)
|
||||
{
|
||||
_performance = performance;
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ public sealed class PredefinedTagManager : ISavable, IReadOnlyList<string>
|
|||
foreach (var (tag, data) in tags)
|
||||
_predefinedTags.TryAdd(tag, data);
|
||||
break;
|
||||
default:
|
||||
throw new Exception($"Invalid version {version}.");
|
||||
default: throw new Exception($"Invalid version {version}.");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ using Penumbra.Collections.Manager;
|
|||
using Penumbra.GameData.Actors;
|
||||
using Penumbra.GameData.DataContainers;
|
||||
using Penumbra.GameData.Files;
|
||||
using Penumbra.GameData.Interop;
|
||||
using Penumbra.Import.Structs;
|
||||
using Penumbra.Import.Textures;
|
||||
using Penumbra.Interop.PathResolving;
|
||||
|
|
@ -90,12 +91,12 @@ public class DebugTab : Window, ITab
|
|||
private readonly RedrawService _redraws;
|
||||
private readonly DictEmote _emotes;
|
||||
private readonly Diagnostics _diagnostics;
|
||||
private readonly IObjectTable _objects;
|
||||
private readonly ObjectManager _objects;
|
||||
private readonly IClientState _clientState;
|
||||
private readonly IpcTester _ipcTester;
|
||||
private readonly CrashHandlerPanel _crashHandlerPanel;
|
||||
|
||||
public DebugTab(PerformanceTracker performance, Configuration config, CollectionManager collectionManager, IObjectTable objects,
|
||||
public DebugTab(PerformanceTracker performance, Configuration config, CollectionManager collectionManager, ObjectManager objects,
|
||||
IClientState clientState,
|
||||
ValidityChecker validityChecker, ModManager modManager, HttpApi httpApi, ActorManager actors, StainService stains,
|
||||
CharacterUtility characterUtility, ResidentResourceManager residentResources,
|
||||
|
|
@ -430,7 +431,7 @@ public class DebugTab : Window, ITab
|
|||
DrawSpecial("Current Card", _actors.GetCardPlayer());
|
||||
DrawSpecial("Current Glamour", _actors.GetGlamourPlayer());
|
||||
|
||||
foreach (var obj in _objects)
|
||||
foreach (var obj in _objects.Objects)
|
||||
{
|
||||
ImGuiUtil.DrawTableColumn($"{((GameObject*)obj.Address)->ObjectIndex}");
|
||||
ImGuiUtil.DrawTableColumn($"0x{obj.Address:X}");
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using Penumbra.Mods.Manager;
|
|||
using Penumbra.UI.ModsTab;
|
||||
using ModFileSystemSelector = Penumbra.UI.ModsTab.ModFileSystemSelector;
|
||||
using Penumbra.Collections.Manager;
|
||||
using Penumbra.GameData.Interop;
|
||||
|
||||
namespace Penumbra.UI.Tabs;
|
||||
|
||||
|
|
@ -28,7 +29,7 @@ public class ModsTab(
|
|||
IClientState clientState,
|
||||
CollectionSelectHeader collectionHeader,
|
||||
ITargetManager targets,
|
||||
IObjectTable objectTable)
|
||||
ObjectManager objects)
|
||||
: ITab
|
||||
{
|
||||
private readonly ActiveCollections _activeCollections = collectionManager.Active;
|
||||
|
|
@ -128,7 +129,7 @@ public class ModsTab(
|
|||
using var disabled = ImRaii.Disabled(clientState.LocalPlayer == null);
|
||||
ImGui.SameLine();
|
||||
var buttonWidth = frameHeight with { X = ImGui.GetContentRegionAvail().X / 5 };
|
||||
var tt = objectTable.GetObjectAddress(0) == nint.Zero
|
||||
var tt = !objects[0].Valid
|
||||
? "\nCan only be used when you are logged in and your character is available."
|
||||
: string.Empty;
|
||||
DrawButton(buttonWidth, "All", string.Empty, tt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue