// Loads specified packages to ServerPackages
// (c) PooSH, 2012
Class PackageLoader extends Mutator
Config(PackageLoader);
var() globalconfig array<string> Packages;
event PreBeginPlay()
{
local int i;
if ( !MutatorIsAllowed() )
Destroy();
//add myself
AddToPackageMap();
for( i=0; i< Packages.Length; i++ ) {
AddToPackageMap(Packages[i]);
Log("Package" @ Packages[i] @ "added",Class.Outer.Name);
}
}
static function FillPlayInfo(PlayInfo PlayInfo)
{
Super.FillPlayInfo(PlayInfo);
PlayInfo.AddSetting("PackageLoader","Packages","Packages to Load",1,1,"Text","42",,,True);
}
static event string GetDescriptionText(string PropName)
{
switch (PropName)
{
case "Packages": return "Package list to load to ServerPackages.";
}
return Super.GetDescriptionText(PropName);
}
defaultproperties
{
bAddToServerPackages = true;
GroupName="KF-PkgLdr"
FriendlyName="Package Loader"
Description="Mutators adds specified packages to the ServerPackages"
}