Compare commits
1 Commits
gri-advice
...
short-name
Author | SHA1 | Date | |
---|---|---|---|
7e2351c1c1
|
@ -1,60 +1 @@
|
|||||||
class LTIMut extends KFMutator;
|
class LTIMut extends Mut; // backward compatibility
|
||||||
|
|
||||||
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")
|
|
||||||
}
|
|
||||||
|
@ -13,12 +13,6 @@ var private localized String IncompatibleGRI;
|
|||||||
var const String IncompatibleGRIWarningDefault;
|
var const String IncompatibleGRIWarningDefault;
|
||||||
var private localized String IncompatibleGRIWarning;
|
var private localized String IncompatibleGRIWarning;
|
||||||
|
|
||||||
var const String NoneGRIDefault;
|
|
||||||
var private localized String NoneGRI;
|
|
||||||
|
|
||||||
var const String NoneGRIWarningDefault;
|
|
||||||
var private localized String NoneGRIWarning;
|
|
||||||
|
|
||||||
var const String SecondsShortDefault;
|
var const String SecondsShortDefault;
|
||||||
var private localized String SecondsShort;
|
var private localized String SecondsShort;
|
||||||
|
|
||||||
@ -31,8 +25,6 @@ enum E_LTI_LocalMessageType
|
|||||||
LTI_WaitingGRI,
|
LTI_WaitingGRI,
|
||||||
LTI_IncompatibleGRI,
|
LTI_IncompatibleGRI,
|
||||||
LTI_IncompatibleGRIWarning,
|
LTI_IncompatibleGRIWarning,
|
||||||
LTI_NoneGRI,
|
|
||||||
LTI_NoneGRIWarning,
|
|
||||||
LTI_SecondsShort,
|
LTI_SecondsShort,
|
||||||
LTI_PleaseWait
|
LTI_PleaseWait
|
||||||
};
|
};
|
||||||
@ -60,12 +52,6 @@ public static function String GetLocalizedString(
|
|||||||
case LTI_IncompatibleGRIWarning:
|
case LTI_IncompatibleGRIWarning:
|
||||||
return (default.IncompatibleGRIWarning != "" ? default.IncompatibleGRIWarning : default.IncompatibleGRIWarningDefault);
|
return (default.IncompatibleGRIWarning != "" ? default.IncompatibleGRIWarning : default.IncompatibleGRIWarningDefault);
|
||||||
|
|
||||||
case LTI_NoneGRI:
|
|
||||||
return (default.NoneGRI != "" ? default.NoneGRI : default.NoneGRIDefault);
|
|
||||||
|
|
||||||
case LTI_NoneGRIWarning:
|
|
||||||
return (default.NoneGRIWarning != "" ? default.NoneGRIWarning : default.NoneGRIWarningDefault);
|
|
||||||
|
|
||||||
case LTI_SecondsShort:
|
case LTI_SecondsShort:
|
||||||
return (default.SecondsShort != "" ? default.SecondsShort : default.SecondsShortDefault);
|
return (default.SecondsShort != "" ? default.SecondsShort : default.SecondsShortDefault);
|
||||||
|
|
||||||
@ -82,8 +68,6 @@ defaultproperties
|
|||||||
WaitingGRIDefault = "Waiting GRI..."
|
WaitingGRIDefault = "Waiting GRI..."
|
||||||
IncompatibleGRIDefault = "Incompatible GRI:"
|
IncompatibleGRIDefault = "Incompatible GRI:"
|
||||||
IncompatibleGRIWarningDefault = "You can enter the game, but the trader may not work correctly.";
|
IncompatibleGRIWarningDefault = "You can enter the game, but the trader may not work correctly.";
|
||||||
NoneGRIDefault = "GRI is not initialized!"
|
|
||||||
NoneGRIWarningDefault = "It is recommended to reconnect. If you enter the game right now, the trader may not work correctly.";
|
|
||||||
SecondsShortDefault = "s"
|
SecondsShortDefault = "s"
|
||||||
PleaseWaitDefault = "Please wait"
|
PleaseWaitDefault = "Please wait"
|
||||||
}
|
}
|
@ -150,16 +150,9 @@ private simulated function Finished()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
`Log_Error("Incompatible Game Replication info:" @ String(GRI));
|
`Log_Error("Incompatible Replication info:" @ String(GRI));
|
||||||
if (GRI == None)
|
|
||||||
{
|
|
||||||
NotifyNoneGRI();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NotifyIncompatibleGRI();
|
NotifyIncompatibleGRI();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ShowReadyButton();
|
ShowReadyButton();
|
||||||
ClientCleanup();
|
ClientCleanup();
|
||||||
@ -315,7 +308,6 @@ private simulated function KeepNotification()
|
|||||||
|
|
||||||
private simulated function ClientCleanup()
|
private simulated function ClientCleanup()
|
||||||
{
|
{
|
||||||
`Log_Debug("Cleanup");
|
|
||||||
ServerCleanup();
|
ServerCleanup();
|
||||||
SafeDestroy();
|
SafeDestroy();
|
||||||
}
|
}
|
||||||
@ -371,16 +363,6 @@ private simulated function NotifyIncompatibleGRI()
|
|||||||
class'KFLocalMessage'.default.InteractionColor);
|
class'KFLocalMessage'.default.InteractionColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private simulated function NotifyNoneGRI()
|
|
||||||
{
|
|
||||||
WriteToChatLocalized(
|
|
||||||
LTI_NoneGRI,
|
|
||||||
class'KFLocalMessage'.default.InteractionColor);
|
|
||||||
WriteToChatLocalized(
|
|
||||||
LTI_NoneGRIWarning,
|
|
||||||
class'KFLocalMessage'.default.InteractionColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
bAlwaysRelevant = false
|
bAlwaysRelevant = false
|
||||||
|
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")
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
@ -21,7 +21,7 @@ https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-m
|
|||||||
[*]Subscribe to this mutator;
|
[*]Subscribe to this mutator;
|
||||||
[*]Start KF2;
|
[*]Start KF2;
|
||||||
[*]Open console (~) and input:
|
[*]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)
|
(replace the map and add the parameters you need)
|
||||||
[*]<Enter>.
|
[*]<Enter>.
|
||||||
[/olist]
|
[/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):
|
[*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist):
|
||||||
[b]ServerSubscribedWorkshopItems=2864857909[/b]
|
[b]ServerSubscribedWorkshopItems=2864857909[/b]
|
||||||
[*]Start the server and wait until the mutator is downloading;
|
[*]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]
|
[/olist]
|
||||||
|
|
||||||
[h1]Important setup information[/h1]
|
[h1]Important setup information[/h1]
|
||||||
|
Reference in New Issue
Block a user