UNPKG

@skyrim-platform/papyrus-util

Version:

TypeScript library for the PapyrusUtil Skyrim modding utility

42 lines (36 loc) 2.36 kB
/* ============================================== Typescript definitions for v4.2 ============================================== This file was automatically generated by Papyrus-2-Typescript.exe https://github.com/CarlosLeyvaAyala/Papyrus-2-Typescript The program has no way to know the intention of the humans that made the scripts, so it's always advisable to manually check all generated files to make sure everything is declared as it should. Take note the program assumes this script exists in some subfolder to the folder where `skyrimPlatform.ts` is found, otherwise you'll get "Cannot find module..." type of errors. If you want to have this script in some other place, just change the relative path of each `import`. */ import * as sp from "skyrimPlatform"; var sn = sp.ActorUtil; /** Override packages of actors. These overrides persist through save games. If you override package on same actor more than once then the package with highest priority will run, if multiple overrides have same priority then last added package will run. Priority ranges from 0 to 100 with 100 being highest priority. */ // This will add a package to actor that will override its normal behavior. Using this function overrides all packages added from any other location. export var AddPackageOverride = function (targetActor, targetPackage, priority, flags) { if (priority === void 0) { priority = 30; } if (flags === void 0) { flags = 0; } return sn.AddPackageOverride(targetActor, targetPackage, priority, flags); }; // Remove a previously added package override. export var RemovePackageOverride = function (targetActor, targetPackage) { return sn.RemovePackageOverride(targetActor, targetPackage); }; // Count how many package overrides are currently on this actor. It will also count ones that's condition isn't met. export var CountPackageOverride = function (targetActor) { return sn.CountPackageOverride(targetActor); }; // Remove all package overrides on this actor, including ones that were added by other mods. export var ClearPackageOverride = function (targetActor) { return sn.ClearPackageOverride(targetActor); }; // Remove this package from all actor overrides. export var RemoveAllPackageOverride = function (targetPackage) { return sn.RemoveAllPackageOverride(targetPackage); };