diff --git a/CTI/Classes/CTIMut.uc b/CTI/Classes/CTIMut.uc index 2e603e3..0862c64 100644 --- a/CTI/Classes/CTIMut.uc +++ b/CTI/Classes/CTIMut.uc @@ -1,60 +1 @@ -class CTIMut extends KFMutator; - -var private CTI CTI; - -public simulated function bool SafeDestroy() -{ - return (bPendingDelete || bDeleteMe || Destroy()); -} - -public event PreBeginPlay() -{ - Super.PreBeginPlay(); - - if (WorldInfo.NetMode == NM_Client) return; - - foreach WorldInfo.DynamicActors(class'CTI', CTI) - { - break; - } - - if (CTI == None) - { - CTI = WorldInfo.Spawn(class'CTI'); - } - - if (CTI == None) - { - `Log_Base("FATAL: Can't Spawn 'CTI'"); - SafeDestroy(); - } -} - -public function AddMutator(Mutator Mut) -{ - if (Mut == Self) return; - - if (Mut.Class == Class) - CTIMut(Mut).SafeDestroy(); - else - Super.AddMutator(Mut); -} - -public function NotifyLogin(Controller C) -{ - CTI.NotifyLogin(C); - - Super.NotifyLogin(C); -} - -public function NotifyLogout(Controller C) -{ - CTI.NotifyLogout(C); - - Super.NotifyLogout(C); -} - -DefaultProperties -{ - GroupNames.Add("TraderItems") -} \ No newline at end of file +class CTIMut extends Mut; // backward compatibility diff --git a/CTI/Classes/Mut.uc b/CTI/Classes/Mut.uc new file mode 100644 index 0000000..c09c3c4 --- /dev/null +++ b/CTI/Classes/Mut.uc @@ -0,0 +1,60 @@ +class Mut extends KFMutator; + +var private CTI CTI; + +public simulated function bool SafeDestroy() +{ + return (bPendingDelete || bDeleteMe || Destroy()); +} + +public event PreBeginPlay() +{ + Super.PreBeginPlay(); + + if (WorldInfo.NetMode == NM_Client) return; + + foreach WorldInfo.DynamicActors(class'CTI', CTI) + { + break; + } + + if (CTI == None) + { + CTI = WorldInfo.Spawn(class'CTI'); + } + + if (CTI == None) + { + `Log_Base("FATAL: Can't Spawn 'CTI'"); + 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) +{ + CTI.NotifyLogin(C); + + Super.NotifyLogin(C); +} + +public function NotifyLogout(Controller C) +{ + CTI.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 bfbc17f..369a867 100644 --- a/PublicationContent/description.txt +++ b/PublicationContent/description.txt @@ -17,7 +17,7 @@ No. This mod is not whitelisted and will de-rank your server. Any XP gained will [*]Subscribe to this mutator; [*]Start KF2; [*]Open console (~) and input: -[b]open KF-BioticsLab?Mutator=CTI.CTIMut[/b] +[b]open KF-BioticsLab?Mutator=CTI.Mut[/b] (replace the map and add the parameters you need) [*]. [/olist] @@ -31,7 +31,7 @@ No. This mod is not whitelisted and will de-rank your server. Any XP gained will [*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist): [b]ServerSubscribedWorkshopItems=2830826239[/b] [*]Start the server and wait while the mutator is downloading; -[*]Add mutator to server start parameters: [b]?Mutator=CTI.CTIMut[/b] and restart the server. +[*]Add mutator to server start parameters: [b]?Mutator=CTI.Mut[/b] and restart the server. [/olist] [h1]Important setup information[/h1]