add short alias for mutator
This commit is contained in:
parent
6344c3b3e3
commit
7e2351c1c1
@ -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")
|
||||
}
|
||||
class LTIMut extends Mut; // backward compatibility
|
||||
|
60
LTI/Classes/Mut.uc
Normal file
60
LTI/Classes/Mut.uc
Normal file
@ -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")
|
||||
}
|
@ -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)
|
||||
[*]<Enter>.
|
||||
[/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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user