mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Add resolving file paths and obtaining files through Penumbra to the API.
This commit is contained in:
parent
9f5a72d21a
commit
a1504046c2
3 changed files with 94 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Dalamud.Game.ClientState.Actors.Types;
|
||||
using Lumina.Data;
|
||||
|
||||
namespace Penumbra.Api
|
||||
{
|
||||
|
|
@ -21,11 +22,33 @@ namespace Penumbra.Api
|
|||
|
||||
public interface IPenumbraApi : IPenumbraApiBase
|
||||
{
|
||||
// Triggered when the user hovers over a listed changed object in a mod tab.
|
||||
// Can be used to append tooltips.
|
||||
public event ChangedItemHover? ChangedItemTooltip;
|
||||
// Triggered when the user clicks a listed changed object in a mod tab.
|
||||
public event ChangedItemClick? ChangedItemClicked;
|
||||
|
||||
// Queue redrawing of all actors of the given name with the given RedrawType.
|
||||
public void RedrawActor( string name, RedrawType setting );
|
||||
|
||||
// Queue redrawing of the specific actor with the given RedrawType. Should only be used when the actor is sure to be valid.
|
||||
public void RedrawActor( Actor actor, RedrawType setting );
|
||||
|
||||
// Queue redrawing of all currently available actors with the given RedrawType.
|
||||
public void RedrawAll( RedrawType setting );
|
||||
|
||||
// Resolve a given gamePath via Penumbra using the Default and Forced collections.
|
||||
// Returns the given gamePath if penumbra would not manipulate it.
|
||||
public string ResolvePath(string gamePath);
|
||||
|
||||
// Resolve a given gamePath via Penumbra using the character collection for the given name (if it exists) and the Forced collections.
|
||||
// Returns the given gamePath if penumbra would not manipulate it.
|
||||
public string ResolvePath( string gamePath, string characterName );
|
||||
|
||||
// Try to load a given gamePath with the resolved path from Penumbra.
|
||||
public T? GetFile< T >( string gamePath ) where T : FileResource;
|
||||
|
||||
// Try to load a given gamePath with the resolved path from Penumbra.
|
||||
public T? GetFile<T>( string gamePath, string characterName ) where T : FileResource;
|
||||
}
|
||||
}
|
||||
|
|
@ -33,5 +33,9 @@
|
|||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lumina">
|
||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue