diff --git a/LTI/Classes/LTIMut.uc b/LTI/Classes/LTIMut.uc index e16b579..aaa3c84 100644 --- a/LTI/Classes/LTIMut.uc +++ b/LTI/Classes/LTIMut.uc @@ -1,60 +1 @@ -class LTIMut extends KFMutator; - -var private LTI LTI; - -public simulated function bool SafeDestroy() -{ - return (bPendingDelete || bDeleteMe || Destroy()); -} - -public event PreBeginPlay() -{ - Super.PreBeginPlay(); - - if (WorldInfo.NetMode == NM_Client) return; - - foreach WorldInfo.DynamicActors(class'LTI', LTI) - { - break; - } - - if (LTI == None) - { - LTI = WorldInfo.Spawn(class'LTI'); - } - - if (LTI == None) - { - `Log_Base("FATAL: Can't Spawn 'LTI'"); - SafeDestroy(); - } -} - -public function AddMutator(Mutator Mut) -{ - if (Mut == Self) return; - - if (Mut.Class == Class) - LTIMut(Mut).SafeDestroy(); - else - Super.AddMutator(Mut); -} - -public function NotifyLogin(Controller C) -{ - LTI.NotifyLogin(C); - - Super.NotifyLogin(C); -} - -public function NotifyLogout(Controller C) -{ - LTI.NotifyLogout(C); - - Super.NotifyLogout(C); -} - -DefaultProperties -{ - GroupNames.Add("TraderItems") -} \ No newline at end of file +class LTIMut extends Mut; // backward compatibility diff --git a/LTI/Classes/Mut.uc b/LTI/Classes/Mut.uc new file mode 100644 index 0000000..c0437fe --- /dev/null +++ b/LTI/Classes/Mut.uc @@ -0,0 +1,60 @@ +class Mut extends KFMutator; + +var private LTI LTI; + +public simulated function bool SafeDestroy() +{ + return (bPendingDelete || bDeleteMe || Destroy()); +} + +public event PreBeginPlay() +{ + Super.PreBeginPlay(); + + if (WorldInfo.NetMode == NM_Client) return; + + foreach WorldInfo.DynamicActors(class'LTI', LTI) + { + break; + } + + if (LTI == None) + { + LTI = WorldInfo.Spawn(class'LTI'); + } + + if (LTI == None) + { + `Log_Base("FATAL: Can't Spawn 'LTI'"); + SafeDestroy(); + } +} + +public function AddMutator(Mutator M) +{ + if (M == Self) return; + + if (M.Class == Class) + Mut(M).SafeDestroy(); + else + Super.AddMutator(M); +} + +public function NotifyLogin(Controller C) +{ + LTI.NotifyLogin(C); + + Super.NotifyLogin(C); +} + +public function NotifyLogout(Controller C) +{ + LTI.NotifyLogout(C); + + Super.NotifyLogout(C); +} + +DefaultProperties +{ + GroupNames.Add("TraderItems") +} \ No newline at end of file diff --git a/PublicationContent/description.txt b/PublicationContent/description.txt index 802159d..31c8999 100644 --- a/PublicationContent/description.txt +++ b/PublicationContent/description.txt @@ -21,7 +21,7 @@ https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-m [*]Subscribe to this mutator; [*]Start KF2; [*]Open console (~) and input: -[b]open KF-BioticsLab?Mutator=LTI.LTIMut[/b] +[b]open KF-BioticsLab?Mutator=LTI.Mut[/b] (replace the map and add the parameters you need) [*]. [/olist] @@ -35,7 +35,7 @@ https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-m [*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist): [b]ServerSubscribedWorkshopItems=2864857909[/b] [*]Start the server and wait until the mutator is downloading; -[*]Add mutator to server start parameters: [b]?Mutator=LTI.LTIMut[/b] and restart the server. +[*]Add mutator to server start parameters: [b]?Mutator=LTI.Mut[/b] and restart the server. [/olist] [h1]Important setup information[/h1]