Table of Contents

Interface IPersistenceCapability

Namespace
KeenEyes.Capabilities
Assembly
KeenEyes.Abstractions.dll

Capability interface for configuring world persistence settings.

public interface IPersistenceCapability

Examples

public void Install(IPluginContext context)
{
    if (context.TryGetCapability<IPersistenceCapability>(out var persistence))
    {
        if (config.SaveDirectory is not null)
        {
            persistence.SaveDirectory = config.SaveDirectory;
        }
    }
}

Remarks

This capability provides access to persistence configuration settings such as the save directory. Plugins that need to configure persistence should request this capability via GetCapability<T>() rather than casting to the concrete World type.

Properties

SaveDirectory

Gets or sets the directory used for save files.

string SaveDirectory { get; set; }

Property Value

string

Remarks

Defaults to a "saves" subdirectory in the current working directory. Setting this property allows plugins to customize where save data is stored.