using Penumbra.Api.Enums;
namespace Penumbra.Api.Api;
/// API methods pertaining to the currently tracked game state.
public interface IPenumbraApiGameState
{
///
/// The game object associated with the given draw object
/// and the GUID and name of the collection associated with this game object.
public (nint GameObject, (Guid Id, string Name) Collection) GetDrawObjectInfo(nint drawObject);
///
/// Obtain the parent game object index for an unnamed cutscene actor by its index.
///
///
/// The parent game object index.
public int GetCutsceneParentIndex(int actorIdx);
///
/// Set the cutscene parent of in Penumbras internal state to a new value.
///
/// The index of the cutscene actor to be changed.
/// The new index of the cutscene actors parent or -1 for no parent.
/// Success when the new parent could be set, or InvalidArgument if either index is out of its respective range.
///
/// Checks that the new parent exists as a game object if the value is not -1 before assigning. If it does not, InvalidArgument is given, too.
/// Please only use this for good reason and if you know what you are doing, probably only for actor copies you actually create yourself.
///
public PenumbraApiEc SetCutsceneParentIndex(int copyIdx, int newParentIdx);
///
/// Triggered when a character base is created and a corresponding gameObject could be found,
/// before the Draw Object is actually created, so customize and equipdata can be manipulated beforehand.
///
///
public event CreatingCharacterBaseDelegate? CreatingCharacterBase;
///
/// Triggered after a character base was created if a corresponding gameObject could be found,
/// so you can apply flag changes after finishing.
///
///
public event CreatedCharacterBaseDelegate? CreatedCharacterBase;
///
/// Triggered whenever a resource is redirected by Penumbra for a specific, identified game object.
/// Does not trigger if the resource is not requested for a known game object.
///
///
public event GameObjectResourceResolvedDelegate? GameObjectResourceResolved;
}