diff --git a/Classes/KFHardPatAddon.uc b/Classes/KFHardPatAddon.uc index af9615b..f0ca6a1 100644 --- a/Classes/KFHardPatAddon.uc +++ b/Classes/KFHardPatAddon.uc @@ -17,6 +17,8 @@ function Mutate(string MutateString, PlayerController Sender) { local String command, mod; local array modArray; + super.Mutate(MutateString, Sender); + // ignore empty cmds and dont go further Split(MutateString, " ", wordsArray); if (wordsArray.Length == 0) { @@ -41,60 +43,21 @@ function Mutate(string MutateString, PlayerController Sender) { i++; } - super.Mutate(MutateString, Sender); - - if (mod ~= "VAMPIRE" || mod ~= "4") { - EventNum = 4; - ActivateTimer(); - return; - } -} - -// yeah i was super dumb, didn't make this modular... -// so enjoy yet another copy-paste job -function Timer() { - if (bUseCustomMC && KFGT.MonsterCollection == class'KFGameType'.default.MonsterCollection) { - KFGT.MonsterCollection = class'HPMonstersCollection'; - log("Hard Patriarch: HPMonstersCollection is loaded!"); - } - - switch (EventNum) { - case 1: - strSeasonalPat = "KFHardPatF.HardPat_XMAS"; - break; - case 2: - strSeasonalPat = "KFHardPatF.HardPat_CIRCUS"; - break; - case 3: - strSeasonalPat = "KFHardPatF.HardPat_HALLOWEEN"; - break; - case 4: - strSeasonalPat = "KFHardPatAddon.Vampriarch"; - break; - default: - strSeasonalPat = "KFHardPatF.HardPat"; - } - log("Hard Patriarch: " $strSeasonalPat$ " is selected!"); - - KFGT.EndGameBossClass = strSeasonalPat; - - if (KFGT.MonsterCollection != none) { - KFGT.MonsterCollection.default.EndGameBossClass = strSeasonalPat; - } + if (command ~= "PAT") { + // allow only admins + if (!CheckAdmin(Sender)) { + SendMessage(Sender, "%wKFHardPatF requires %rADMIN %wprivileges!"); + return; + } - if (!bBroadcast) { - return; + if (mod ~= "VAMPIRE" || mod ~= "4") { + EventNum = 4; + ActivateTimer(); + return; + } } - - BroadcastText("%rHard Pat Mutator%w:"); - BroadcastText("%b" $ strSeasonalPat $ " %wis activated!"); - bBroadcast = false; - - SetTimer(0.0, false); - // Destroy(); } - defaultproperties { // same group so someone won't be able // to activate both mods at the same time @@ -103,4 +66,5 @@ defaultproperties { Description="Adds Vampriarch, cut from KF in 2011." bAddToServerPackages=true + SeasonalVariants(4)=(idx=4,variant=class'Vampriarch') } \ No newline at end of file