Plants vs. Zombies: Replanted - v1.0.3
    Preparing search index...

    Interface IDeploymentMethod

    interface IDeploymentMethod {
        activate: (
            sourcePath: string,
            sourceName: string,
            deployPath: string,
            blackList: Set<string>,
        ) => Bluebird<void>;
        cancel?: (
            gameId: string,
            dataPath: string,
            installationPath: string,
        ) => Bluebird<void>;
        compatible?: string[];
        deactivate: (
            sourcePath: string,
            dataPath: string,
            sourceName: string,
        ) => Bluebird<void>;
        description: string;
        detailedDescription: (t: any) => string;
        externalChanges: (
            gameId: string,
            installPath: string,
            dataPath: string,
            activation: IDeployedFile[],
        ) => Bluebird<IFileChange[]>;
        finalize: (
            gameId: string,
            dataPath: string,
            installationPath: string,
            progressCB?: (files: number, total: number) => void,
        ) => Bluebird<IDeployedFile[]>;
        getDeployedPath: (input: string) => string;
        id: string;
        isDeployed: (
            installPath: string,
            dataPath: string,
            file: IDeployedFile,
        ) => Bluebird<boolean>;
        isFallbackPurgeSafe: boolean;
        isSupported: (
            state: any,
            gameId: string,
            modTypeId: string,
        ) => IUnavailableReason;
        name: string;
        noRedundancy?: boolean;
        onSelected?: (api: IExtensionApi) => Bluebird<void>;
        postPurge: () => Bluebird<void>;
        prepare: (
            dataPath: string,
            clean: boolean,
            lastActivation: IDeployedFile[],
            normalize: Normalize,
        ) => Bluebird<void>;
        prePurge: (installPath: string) => Bluebird<void>;
        priority: number;
        purge: (
            installPath: string,
            dataPath: string,
            gameId?: string,
            onProgress?: (num: number, total: number) => void,
        ) => Bluebird<void>;
        userGate: () => Bluebird<void>;
    }
    Index

    Properties

    activate: (
        sourcePath: string,
        sourceName: string,
        deployPath: string,
        blackList: Set<string>,
    ) => Bluebird<void>

    activate the specified mod in the specified location

    Type Declaration

      • (
            sourcePath: string,
            sourceName: string,
            deployPath: string,
            blackList: Set<string>,
        ): Bluebird<void>
      • Parameters

        • sourcePath: string

          source where the mod is installed

        • sourceName: string

          name to be stored as the source of files. usually the path of the mod subdirectory

        • deployPath: string

          relative path within the data path where mods are installed to

        • blackList: Set<string>

        Returns Bluebird<void>

    IDeploymentMethod

    cancel?: (
        gameId: string,
        dataPath: string,
        installationPath: string,
    ) => Bluebird<void>

    if defined, this gets called instead of finalize if an error occurred since prepare was called. This allows the deployment method to reset all state without actually doing anything in case things went wrong. If this is not defined, nothing gets called. In this case the deployment method can't have any state set up in prepare that would cause issues if finalize doesn't get called.

    compatible?: string[]

    if set, lists ids of other deployment methods that this is compatible to. Compatible means we can switch between methods without requiring a purge or a need to warn the user.

    deactivate: (
        sourcePath: string,
        dataPath: string,
        sourceName: string,
    ) => Bluebird<void>

    deactivate the specified mod, removing all files it has deployed to the destination

    Type Declaration

      • (sourcePath: string, dataPath: string, sourceName: string): Bluebird<void>
      • Parameters

        • sourcePath: string

          source where the mod is installed

        • dataPath: string

          relative path within the data path where mods are installed to

        • sourceName: string

          name of the source mod

        Returns Bluebird<void>

    sorry about the stupid parameter order, sourceName was added after release so to remain backwards compatible we have to append it

    description: string

    Short description of the activator and it's pros/cons

    IDeploymentMethod

    detailedDescription: (t: any) => string

    returns more extensive description/explanation of the activator.

    IDeploymentMethod

    externalChanges: (
        gameId: string,
        installPath: string,
        dataPath: string,
        activation: IDeployedFile[],
    ) => Bluebird<IFileChange[]>

    retrieve list of external changes, that is: files that were installed by this activator but have been changed since then by an external application.

    Type Declaration

      • (
            gameId: string,
            installPath: string,
            dataPath: string,
            activation: IDeployedFile[],
        ): Bluebird<IFileChange[]>
      • Parameters

        • gameId: string
        • installPath: string

          Vortex path where mods are installed from (source)

        • dataPath: string

          game path where mods are installed to (destination)

        • activation: IDeployedFile[]

        Returns Bluebird<IFileChange[]>

    IDeploymentMethod

    finalize: (
        gameId: string,
        dataPath: string,
        installationPath: string,
        progressCB?: (files: number, total: number) => void,
    ) => Bluebird<IDeployedFile[]>

    called after an activate call was made for all active mods, in case this activator needs to do postprocessing

    Type Declaration

      • (
            gameId: string,
            dataPath: string,
            installationPath: string,
            progressCB?: (files: number, total: number) => void,
        ): Bluebird<IDeployedFile[]>
      • Parameters

        • gameId: string
        • dataPath: string
        • installationPath: string
        • OptionalprogressCB: (files: number, total: number) => void

        Returns Bluebird<IDeployedFile[]>

        a promise of activation results. These results will be used for a "purge" in case the activator isn't available for the regular purge op. If a purge isn't necessary, i.e. because the links are transient anyway, please just return an empty list. Please note that this purge will happen with a regular file deletion call, if this could lead to data loss do NOT return anything here. In that case you should provide another way for the user to clean up the game directory even when your activator is not available for some reason.

    IDeploymentMethod

    getDeployedPath: (input: string) => string

    given a file path (relative to a staging path), return the name under which the file would be deployed. This is used in cases where the deployment method may rename files during deployment for whatever reason. An example would be move deployment where the file that remains in the staging folder is just a (differently named) placeholder.

    id: string

    id of the activator for lookup in code

    IDeploymentMethod

    isDeployed: (
        installPath: string,
        dataPath: string,
        file: IDeployedFile,
    ) => Bluebird<boolean>

    test if the specified file is deployed through this methed

    Type Declaration

      • (installPath: string, dataPath: string, file: IDeployedFile): Bluebird<boolean>
      • Parameters

        • installPath: string

          Vortex path where mods are installed from (source)

        • dataPath: string

          game path where mods are installed to (destination)

        • file: IDeployedFile

        Returns Bluebird<boolean>

    isFallbackPurgeSafe: boolean

    true if it's "safe" to purge files from this method from another instance, that is: without knowing where the "original" files are.

    IDeploymentMethod

    isSupported: (
        state: any,
        gameId: string,
        modTypeId: string,
    ) => IUnavailableReason

    determine if this activator is supported in the current environment If the activator is supported, returns undefined. Otherwise a string that explains why the activator isn't available.

    synchronous 'cause lazy.

    IDeploymentMethod

    name: string

    name of this activator as presented to the user

    IDeploymentMethod

    noRedundancy?: boolean

    if true, no redundancy check is made for this deployment. For cases where the redundancy check wouldn't work correctly

    onSelected?: (api: IExtensionApi) => Bluebird<void>

    called before the deployment method is selected. Primary use is to show usage instructions the user needs to know before using it

    postPurge: () => Bluebird<void>

    called after mods were purged. If multiple mod types wer purged, this is only called after they are all done. Like prePurge, this is intended for optimizations

    prepare: (
        dataPath: string,
        clean: boolean,
        lastActivation: IDeployedFile[],
        normalize: Normalize,
    ) => Bluebird<void>

    called before any calls to activate/deactivate, in case the activator needs to do pre-processing

    Type Declaration

      • (
            dataPath: string,
            clean: boolean,
            lastActivation: IDeployedFile[],
            normalize: Normalize,
        ): Bluebird<void>
      • Parameters

        • dataPath: string

          the path where files will be deployed to

        • clean: boolean

          whether the activate commands should be treated as deltas (false) to the existing activation or whether we're deploying from scratch (true)

        • lastActivation: IDeployedFile[]

          previous deployment state to be used as the reference for newly deployed files

        • normalize: Normalize

          a path normalization function. This needs to be used when comparing strings against the blacklist or when storing relative path into the deployment manifest

        Returns Bluebird<void>

    IDeploymentMethod

    prePurge: (installPath: string) => Bluebird<void>

    called before mods are being purged. If multiple mod types are going to be purged, this is only called once. This is primarily useful for optimization, to avoid work being done redundantly for every modtype-purge

    priority: number

    low value means: prefer this method over those with higher value

    purge: (
        installPath: string,
        dataPath: string,
        gameId?: string,
        onProgress?: (num: number, total: number) => void,
    ) => Bluebird<void>

    deactivate all mods at the destination location

    Type Declaration

      • (
            installPath: string,
            dataPath: string,
            gameId?: string,
            onProgress?: (num: number, total: number) => void,
        ): Bluebird<void>
      • Parameters

        • installPath: string

          Vortex path where mods are installed from (source)

        • dataPath: string

          game paths where mods are installed to (destination)

        • OptionalgameId: string

          id for the game to purge

        • OptionalonProgress: (num: number, total: number) => void

          progress callback. Doesn't have to be used, won't always be supplied Vortex itself does not keep track which files were installed by the activator so if the activator can not discover those automatically it it has to do its own bookkeeping. The LinkingActivator base-class does implement such bookkeeping however.

        Returns Bluebird<void>

    IDeploymentMethod

    userGate: () => Bluebird<void>

    if mod deployment in some way requires user interaction we should give the user control over the process, even if he has auto-deploy active

    IDeploymentMethod